Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/redesign/03-decision-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,17 @@ Entries are appended as work lands. Format: what changed / why better / consider
**Why better here:** Decomposition is move-only and changes zero pixels — it's maintainability hygiene. Within one session, spending the largest token/risk budget on an invisible refactor (14 commits × full Playwright verification) trades directly against delivering the visible premium upgrade that is the actual mission. Editing the monolith in place for the targeted sections (guide, scope picker, answer, bottom nav, viewer) reaches the same user-facing result without that churn.
**Rejected:** Doing the full split first (high risk/cost, no visual payoff this session); a partial split (leaves the file half-migrated — worse than either end state).
**Verification:** n/a (not performed); tracked in deferred items with a concrete restart point.

## D6 — Reconcile merge-integration regressions on `main` (header compaction)

**Context:** My redesign branch was merged into `main` alongside several parallel branches. One of them (`2fc9cf0` "Refactor database app routing and UI flows") replaced the compact header with a taller command-style header (two-row mobile search form ≈251px), added a duplicate **hidden** query-mode/filters block (merge debris), and did not update the `≤180/185` header-height smoke budget (`8c0996d`, which is in my base). A separate merged branch added a `mobile-section-fab-menu` whose "Search documents" label collided with the documents-mode heading (strict-locator failure at `:778`). All 7 `main` smoke failures traced to these parallel branches, not the redesign (git topology: `2fc9cf0` is not an ancestor of my base `846943d`).

**What (per user decision "reconcile to green, compact header"):**

1. Made the mobile search form single-row again (`grid-cols-[minmax(0,1fr)_auto_auto]`, `whitespace-nowrap` controls) — recovers ~56px; kept the command-style input and the desktop query-mode + filters.
2. Tightened header rhythm: `space-y-3→2`, `pb-3→2`, mode-bar `p-1.5→1`, unified `sm:py-2.5`. Mobile header back under 180px, sm under 185px.
3. Removed the duplicate hidden query-mode/filters block (dead `display:none` debris) and the now-orphaned `batches` prop on `MasterSearchHeader` (+ its call-site).
4. Scoped the `:778` locator to `getByRole("main").getByText("Search documents")` — a test update for the structurally-added FAB menu (logged here, not deleted).

**Why better:** restores the ≤180 budget the project already enforces, keeps the newer command-style features, and clears merge debris. **Rejected:** raising the test budget (would bless an over-tall mobile header); deleting the FAB menu (other branch's feature).
**Verification:** the 6 header-height tests + the `:778` doc-search test pass on a warm server; typecheck, lint (no warnings), prettier clean; full chromium smoke re-run.
49 changes: 49 additions & 0 deletions docs/redesign/06-verification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Verification Report

Scope: ultra-premium mobile-first redesign — token system, component layer, dashboard + document-viewer mobile surfaces, plus reconciliation of merge-integration regressions that landed in `main` from parallel branches. Checks were run in `C:\Dev\Apps\Database` on the reconciliation branch after isolating the final `main` fixes.

## 1. Technical checks (main checkout) — all green

| Check | Command | Result |
| ---------------- | --------------------------------------------------------------- | -------------------- |
| Types | `npm run typecheck` | ✅ pass |
| Unit tests | `npm run test` (vitest) | ✅ **341/341 pass** |
| Format | `npm run format:check` (prettier) | ✅ pass |
| Lint | `npm run lint` (eslint 9.39.4) | ✅ pass, no warnings |
| Smoke (chromium) | `npx playwright test tests/ui-smoke.spec.ts --project=chromium` | ✅ **22/22 pass** |

Clean-install caveat resolved in the reconciliation branch: `eslint` was pinned back to the latest compatible 9.x range because `eslint-config-next@16.2.7` pulls `eslint-plugin-react@7.37.5`, whose peer range supports ESLint 9 but not ESLint 10. `npm ci` now completes and `npm run lint` passes under Node 22.22.3.

## 2. Smoke detail

The first full run on `main` had 7 failures — all traced to **parallel branches merged into `main`**, not the redesign (git topology: `2fc9cf0` is not an ancestor of my base `846943d`):

- 6× header height 251 > 180 budget — a taller command-style header from `2fc9cf0` ("Refactor database app routing and UI flows") that did not update the `≤180/185` test (`8c0996d`, in my base).
- 1× `:778` strict-locator collision — a merged `mobile-section-fab-menu` duplicating the "Search documents" label.

Per the user's decision ("reconcile to green, compact header"), these were fixed (decision log D6): the mobile search form was made single-row again and header rhythm tightened (back under 180/185), the duplicate hidden query-mode/filters block + orphaned `batches` prop were removed, and the `:778` locator was scoped to `main`. After the fixes the full suite is **22/22**, including the three tests that had looked "pre-existing" at the very first baseline (they were cold-compile timeouts, confirmed by warm reruns).

## 3. Responsive & device pass (Preview MCP, during build)

- Mobile (375) light + dark: header, cards, answer empty-state, bottom nav — clean; tokens resolve per theme.
- Scope bottom sheet (375): rises with scrim + drag grip, rows fully legible in light mode (the previous dark-only colours are fixed), tabular counts, teal focus ring. Anchored popover retained from `sm:` up.
- Tablet / laptop / large-desktop covered by the header-height + overflow smoke tests at 768/1280 (pass).

## 4. Design & accessibility pass

- Spacing/radius/type/colour come from tokens; new components use the `@theme` bridge utilities.
- New interactive components (`Sheet`, `Button`, `IconButton`, `Skeleton`) ship default/hover/focus-visible/pressed/disabled/loading states; global focus-visible ring preserved.
- `Sheet` traps focus, returns it to the opener, closes on Escape/backdrop — exercised by the guide + rename/delete flows; guide smoke tests pass through the new component.
- Reduced motion: removed the `transform: none !important` blanket that broke optical centring; animations/transitions/scroll-behaviour still zeroed; all entrance animations are `motion-safe:`-gated.
- Contrast: light primary `#0c8278` (≥4.5:1 with white button text and as text on white); semantic triads tuned ≥4.5:1 text-on-bg; muted/soft text ≥4.5:1 on surface. Forced-colors and print blocks retained.

## 5. Regression vs Phase 1 map

Every capability from the audit map is present and reachable: search (answer/documents), streaming answer + citations + evidence drawers, quotes/images/sources, document scope (mobile sheet), upload & indexing, setup checklist, guide (sheet), document viewer (pages, in-doc search, related docs, rename/delete sheets), plus the parallel-branch additions kept intact (query-mode, clinical filters, mobile section FAB menu). No routes, APIs, or data shapes changed; no dependencies added.

## 6. Unverified / declared

- Full 3-browser smoke (firefox + webkit) not run this session — chromium only. Recommend before release.
- `prefers-reduced-motion` and forced-colors verified by code/token review, not an automated emulation pass.
- `npm audit --audit-level=high` still reports one high-severity `esbuild` advisory. No audit fix was applied because that would broaden the dependency change beyond the ESLint compatibility repair.
- ClinicalDashboard decomposition deferred (`04-deferred.md`, decision log D5).
Loading