Skip to content

Phone Choose mode sheet: review + two large YES mockups - #1618

Merged
BigSimmo merged 14 commits into
mainfrom
cursor/phone-mode-sheet-yes-05c0
Aug 5, 2026
Merged

Phone Choose mode sheet: review + two large YES mockups#1618
BigSimmo merged 14 commits into
mainfrom
cursor/phone-mode-sheet-yes-05c0

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Design-scratch study at /mockups/phone-mode-sheet-yes reviewing the shipping phone Choose mode bottom sheet.
  • YES 01 perfected (shipping recommendation) — sectioned clinical list with every review finding closed:
    • Current mode folded into the non-scrolling sheet header (Currently · {mode})
    • Single sticky layer (section labels at top-0) — no fragile offset / duplicate “Now in” card
    • min-h-12 rows, 44 px wells, two-line descriptions, readable inactive titles
    • Interactive selection; Rest / Scrolled / Switched proof frames
    • Preview scroll constrained to the sheet body (no document yank)
    • Unique useId() section heading ids across multiple frames
    • Arrow / Home / End roving keyboard focus for inactive modes
    • Live selection lifted into the phone frame so the top-bar mode pill tracks picks
    • Scrolled proof frame no longer re-anchors on mode taps
  • YES 02 remains the icon-deck overview alternate.
  • Shared mockup chrome suppressed; sitemap + mockups README updated.

Clinical Governance Preflight

  • Not a clinical-risk product change — design-scratch mockups only (/mockups/* 404 in production)
  • No answer generation, retrieval/ranking, ingestion, source rendering, document access, or privacy behaviour changed
  • Rollback: revert this PR; no production surface is affected

Test plan

  • npm run sitemap:check / format guard
  • npx eslint on changed TSX files
  • npm run ensure/mockups/phone-mode-sheet-yes loads
  • Browser proof: Rest / Scrolled / Switched frames; tap Documents updates header + aria-checked
  • CI green on head (PR required success)
  • Review threads resolved (Devin scroll/id; Codex keyboard; Devin scrolled re-anchor)

RAG impact

RAG impact: no retrieval behaviour change — mockups-only design scratch; no RAG surfaces touched.

Open in WebOpen in Cursor

Summary by CodeRabbit

  • New Features

    • Added a phone mode sheet mockup with three design variants: flat list, sectioned clinical list, and icon deck.
    • Added live mode selection with synchronized headers, keyboard navigation, and accessible radio-menu behavior.
    • Added preview scrolling and sticky clinical sections for improved browsing.
  • Documentation

    • Added the new mockup route to the sitemap.
    • Documented the phone mode sheet variants and presentation details.

Design-scratch study for the shipping phone mode switcher: review findings
plus large sectioned-list and icon-deck comps using clinical Find/Diagnose/Care
lanes, sticky current-mode context, and min-h-12 targets.
@coderabbitai

coderabbitaiBot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a dedicated phone mode-sheet mockup route. It includes shipping, sectioned-list, and icon-deck variants with synchronized selection, focus, scrolling, accessibility behavior, review findings, and route-specific layout handling.

Changes

Phone mode sheet mockup

Layer / File(s)Summary
Mode sheet foundation
src/components/phone-mode-sheet-yes-mockups.tsx
Defines mode data, shared phone UI primitives, accessibility structure, and the baseline shipping sheet.
Interactive sheet variants
src/components/phone-mode-sheet-yes-mockups.tsx
Adds sectioned-list and icon-deck variants with active selection, synchronized headers, sticky sections, scrolling, focus handling, and accessible controls.
Mockup composition and review panels
src/components/phone-mode-sheet-yes-mockups.tsx
Composes phone frames, preview states, variant rendering, review findings, resolution notes, and comparison layouts.
Route integration and documentation
src/app/mockups/phone-mode-sheet-yes/page.tsx, src/app/mockups/mockups-layout-client.tsx, docs/site-map.md, mockups/README.md, docs/branch-review-ledger.md
Adds route metadata, disables shared search and chrome for the route, documents the mockup, and appends review ledger records.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
participant Browser
participant PhoneModeSheetYesMockupPage
participant PhoneModeSheetYesMockups
participant SectionedModeSheet
Browser->>PhoneModeSheetYesMockupPage: Open mockup route
PhoneModeSheetYesMockupPage->>PhoneModeSheetYesMockups: Render comparison page
PhoneModeSheetYesMockups->>SectionedModeSheet: Render interactive variant
SectionedModeSheet->>PhoneModeSheetYesMockups: Update selected mode and preview state
Loading

Possibly related PRs

Suggested labels:codex

Suggested reviewers:cursoragent

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly identifies the Choose mode sheet review and the two YES mockup variants.
Description check✅ PassedThe description covers scope, verification, governance, rollback, and RAG impact; only minor template heading differences remain.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@supabase

supabaseBot commented Aug 5, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@github-actions

github-actionsBot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

CI triage

CI failed on this PR. Automated classification of the 7 failed job(s):

  • Static PR checksneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Production UI criticalneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Buildneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Visual baselines (advisory)needs investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Lighthouse budget (advisory)needs investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Advisory UIneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #8077 (cancelled).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

Lead with a side-by-side large YES pair, and drop the redundant Current pill
on sectioned rows so selection cues stay calm.
cursoragentand others added 5 commits August 5, 2026 12:47
Fold current mode into the sheet header, keep a single sticky section
layer, make selection interactive, and prove Rest/Scrolled/Switched
states with every review finding closed.
Pre-push format guard requires Prettier on the committed blob.
The DSM-5 switched proof opened at Find with selection off-screen;
center the active row on mount so header and selection stay visible together.
`appModeDefinitions.filter((mode) => !mode.devOnly)` does not typecheck:
`devOnly` is optional on the app-mode union, so reading it off every member is
TS2339. This failed `Build` on PR #1618 and took `Static PR checks`,
`Production UI critical`, `Advisory UI` and `Lighthouse` down with it:
./src/components/phone-mode-sheet-yes-mockups.tsx:213:59
Type error: Property 'devOnly' does not exist on type '{ readonly id: "answer"; … }'
src/lib/app-modes.ts already exports the correct guard and uses it internally at
lines 400 and 406. Passing "production" reproduces this call site's intent — the
shipping mode list — without duplicating the `"devOnly" in mode` check.
`appModeDefinitions` stays imported: modeOf() also does a plain `.find()` by id,
which never touches the optional property.
Verified: tsc --noEmit exit 0, eslint clean, prettier clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T97Kqdj9Xh1Cubv5ms3KVy
@BigSimmo
BigSimmo marked this pull request as ready for review August 5, 2026 15:20
devin-ai-integration[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. The only repository destination is BigSimmo/Database, and the only branch destination is the pull request head branch cursor/phone-mode-sheet-yes-05c0 at starting commit 022beba; never publish fixes to a detached or synthetic work branch and never create a stacked pull request. Use the authenticated GitHub connector to commit each approved fix to BigSimmo/Database:cursor/phone-mode-sheet-yes-05c0, then verify that the pull request head contains the published commit before reporting success. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. For a fixed thread, reply with as the first line and as the second line. For a no-code disposition, use followed by . These result markers authorize the workflow to close that exact thread only after it verifies a fixed commit is the pull request head; a local-only commit is not a fix. If publication or verification fails, do not use either result marker, do not claim success, and leave the thread open with the blocker. If human input or new authorization is required, do the same. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation.

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

Publication status

  • Created one local commit on cursor/phone-mode-sheet-yes-05c0: 35822306652641a491d1915dd12a257bfa29b5a9.
  • ❌ Could not publish the fix to BigSimmo/Database:cursor/phone-mode-sheet-yes-05c0: git push origin HEAD:cursor/phone-mode-sheet-yes-05c0 failed because this shell has no GitHub credentials (fatal: could not read Username for 'https://github.com': No such device or address).
  • Because publication and remote-head verification failed, I did not post any thread-resolution markers or claim the PR head contains the fix.
  • The make_pr tool requested by the repository/developer instructions is not available in this environment, and this PR task explicitly forbids creating a stacked PR.

Testing

  • npm run format
  • npx eslint src/components/phone-mode-sheet-yes-mockups.tsx
  • npm run typecheck
  • npm run ensure
  • node - <<'NODE' ... require('@playwright/test') ... NODE — failed because @playwright/test is not installed/resolvable in this environment.
  • git push origin HEAD:cursor/phone-mode-sheet-yes-05c0 — failed because GitHub shell authentication is unavailable.

View task →

Keep scrolled/switched proof frames from yanking the document via
scrollIntoView by setting the sheet body's scrollTop instead. Uniquify
section heading ids with useId, add Arrow/Home/End roving focus so
inactive modes are reachable, and lift selection into the phone frame so
the top-bar mode pill tracks live picks.
devin-ai-integration[bot]

This comment was marked as resolved.

The proof-frame scroll effect only needs the mount selection. Depending on
selectedIndex re-ran it after every pick and yanked the Scrolled frame
back to Diagnose.
coderabbitai[bot]

This comment was marked as resolved.

@BigSimmo
BigSimmo enabled auto-merge (squash) August 5, 2026 18:24

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/branch-review-ledger.md`:
- Around line 644-645: Correct the branch history using the permitted repair
workflow, removing the prohibited main-based updates without editing or deleting
the existing ledger rows. Preserve the append-only behavior of
docs/branch-review-ledger.md and use its established command or mechanism to
record the correction.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 347b0c4f-2a95-4514-8377-166a702b963b

📥 Commits

Reviewing files that changed from the base of the PR and between b579d68 and e842d6e.

📒 Files selected for processing (2)
  • docs/branch-review-ledger.md
  • docs/site-map.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/site-map.md

Comment threaddocs/branch-review-ledger.md
@coderabbitaicoderabbitaiBot mentioned this pull request Aug 5, 2026
14 tasks
@BigSimmo
BigSimmo merged commit 3e65f4c into mainAug 5, 2026
34 checks passed
@BigSimmo
BigSimmo deleted the cursor/phone-mode-sheet-yes-05c0 branch August 5, 2026 18:40
cursorBot pushed a commit that referenced this pull request Aug 5, 2026
* fix(gates): catch lint and type errors before push, not in CI
Two open PRs burned full CI cycles this week on defects a single local
command would have caught: #1606 on a react-hooks/set-state-in-effect lint
error, #1618 on a TS2339 for `mode.devOnly` (a union member that lacks the
property, where app-modes.ts already exports the correct `"devOnly" in mode`
guard). Neither lint nor typecheck was in the pre-push path.
Typecheck could not simply be added, because it was already unusable
(outstanding-issues #210). tsconfig.json's `include` carries
`.next/types/**/*.ts` and `.next/dev/types/**/*.ts` — gitignored build
artifacts — so deleting a page leaves the stale generated validator importing
a removed module. Reproduced rather than inferred: a planted
`.next/dev/types/validator.ts` referencing a removed mockup page yields
`error TS2307: Cannot find module .../mockups/deleted-mockup-route/page.js`,
base config exit 2, source-only config exit 0. Full source typecheck is clean
(71s cold, 8.8s warm). Red locally and green in CI is how the gate got
abandoned, which is how the real type error then reached CI.
- tsconfig.typecheck.json + `typecheck:source`: identical compiler options,
minus the `.next` globs, with a separate tsbuildinfo so the two incremental
caches cannot invalidate each other. Route-signature validation is not lost;
`next build` still covers it in CI.
- guard-push.mjs gains a fourth guard running eslint over the pushed files and
this typecheck. Verified to reproduce both defects above with CI-identical
messages. Scoped to the lint roots and to pushes that touch TS, skips loudly
when node_modules is absent rather than pushing people to
GUARD_PUSH_DISABLE=1, and overridable with SKIP_STATIC_GUARD=1.
Also corrects a doc claim that made #1580 surprising: "mockups are exempt"
was being read as blanket. Mockups are exempt from the wiring and reachability
gates and nothing else — they are still typechecked, and their client chunks
still count toward check:bundle-budget, which totals every built chunk rather
than the initial production bundle. That the budget's scope contradicts
ledger #13's "not an initial production bundle" position is a real unmade
decision, now recorded as #237 rather than papered over.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T97Kqdj9Xh1Cubv5ms3KVy
* docs(issues): capture the phone Category soft-menu fix salvaged from PR #1606#1606 is closed, but it carried the one fix nothing else in the queue provides:
MobileResultFilterControl's native <select> paints a harsh system-blue highlight
on phones, and #1615 keeps that native select (its change is the iOS 16px
anti-zoom rule). So the fix does not survive #1615 landing.
Records it as #238 with the two defects the redo must not repeat: the unresolved
keyboard trap on disabled options, and the set-state-in-effect lint error that
PR #1620's new pre-push guard would now catch.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T97Kqdj9Xh1Cubv5ms3KVy
* issues: capture #239 stale Cloud acceptance pin on PR #1617, #240 remote-container browser gate drift
* Tighten guard coordinator test
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
* fix(gates): shared source-typecheck lease and safer static pre-push
Treat typecheck:source:internal as a shared read-only coordinator lease with
a distinct per-worktree buildinfo file, drop the pinned in-repo cache path,
and harden staticGuard: acquire a short exclusive lease (fail-open when busy),
use a private eslint cache, escalate lint on eslint policy changes, fail closed
when the push tip is not HEAD, cover eslint-rules, and add Vitest coverage.
Align hook/docs wording with the fourth guard and point CLAUDE.md at #252.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
* fix(gates): keep tsBuildInfoFile when run-heavy has no npm_execpath
Pre-push invokes run-heavy via plain node, so the npm_execpath spawn path
was skipped and the fallback dropped effectiveForwarded — undoing the
per-worktree buildinfo injection. Also warn when staticGuard passes on a
dirty working tree.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
* docs: refresh scripts-index for lint:changed:internal
Keep docs:check-inventory green after adding the pre-push eslint wrapper
script to package.json.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
* fix(gates): address Devin findings on static pre-push guard
- Treat "Database focused-test capacity is full" as coordinator busy so
shared typecheck slot exhaustion fails open instead of faking a type error.
- Skip source typecheck when every changed .ts path is excluded by
tsconfig.typecheck.json (edge functions, archive, scratch, worktrees).
- Restore check-github-shell-access.mjs (and its Role notes) in the scripts index.
* chore(ledger): record PR #1620 babysit
* fix(gates): emit structured heavy-run admission-busy signal
Prefer exit 75 + DATABASE_HEAVY_RUN_ADMISSION_BUSY over prose matching so
tsc/eslint output that quotes busy strings cannot false-pass the static guard.
* fix(gates): tip-check only when static work runs; isolate typecheck cache
Addresses follow-up Devin on PR #1620:
- Reorder staticGuard so tip-vs-HEAD fails closed only when lint/typecheck
will actually read the working tree; ignore tag refs in the tip check.
- Pin a distinct tsBuildInfoFile on tsconfig.typecheck.json so direct tsc
does not collide with the base config cache (run-heavy still overrides).
* fix(gates): keep lint failures when typecheck admission is busy
Addresses Devin on PR #1620 — a prior eslint failure must still block the
push if the follow-up source typecheck cannot get a coordinator slot.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@BigSimmo@cursoragent@claude