Add three phone mockups for the therapy comparison picker - #2339
Add three phone mockups for the therapy comparison picker#2339BigSimmo wants to merge 13 commits into
Conversation
The phone compare screen opens with four empty A/B/C/D slot cards, a `Change therapies` button and an `Add therapies to compare` empty state — three affordances for one outcome, with the primary one pushed below the fold by ~1,100px of placeholders. The toolbar (density, Copy set, Clear) renders disabled above it all, and the payoff is a 720px-minimum table in a horizontal scroller. Three design-scratch directions, each a live phone prototype: - A `therapy-compare-progressive` — Add as you go. Empty slots are never drawn; one button and three starter pairs, then a row per therapy chosen. - B `therapy-compare-sheet` — Build the set in one sheet. Full-height multi-select with search, category chips and a draft that commits once. - C `therapy-compare-tray` — Carry a compare tray. Selection leaves the page body for a persistent bottom tray filled from search and records. All three share the same fixtures, a per-field stacked comparison in place of the sideways table, and the same six-defect brief. Mockup-only arbitrary Tailwind values are inlined: globals.css excludes `*mockup*` sources, so a utility used nowhere else in `src` is never emitted and silently collapses the frame (the shipped therapy-navigation mockups have the same issue). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKxKU17WQqryM8iNhpyJk7
|
Warning Review limit reachedNext included review available in 16 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 95 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (11)
Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
Bugbot Autofix prepared fixes for both issues found in the latest run.
- ✅ Fixed: Compare view stays empty
- Empty and per-row remove now switch back to browse when the tray drops below two, so the compare surface cannot stay mounted empty.
- ✅ Fixed: Full tray ignores adds
- Unused Plus controls now dim and use aria-disabled at the four-therapy ceiling, matching Direction B so a fifth tap no longer looks live.
You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 341c3c9. Configure here.
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Leave compare when Empty or a row remove drops the tray below two, and dim leftover Plus controls at the four-therapy ceiling so they no-op visibly instead of looking live.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 341c3c9dd1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@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 claude/therapy-comparison-mobile-design-z0dagr at starting commit 767f388; 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:claude/therapy-comparison-mobile-design-z0dagr, 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. |
Both confirmed against the running prototype before fixing.
1. Emptying or trimming the tray below two while reading a comparison left
the compare view mounted over a `ComparisonPreview` that renders null —
a blank screen, in the one direction whose whole claim is that an empty
compare screen is unreachable. The view is now derived (`showCompare`)
rather than latched, so dropping below two falls back to browse.
2. At four, the result-row plus controls still looked live and `add`
silently no-opped. They now carry `aria-disabled`, an explanatory title
and label, and 40% opacity, matching what the sheet and progressive
pickers already did; the tray heading reads `4 of 4 · full`. Focus order
is preserved — no native `disabled`, per the repo's wiring convention.
Also replaces the bare `opacity-40`/`opacity-45` dimming in all three
directions with inline styles. Production only ever uses those utilities
behind `disabled:`, so the bare form was never emitted and every "blocked"
row rendered at full strength — the same mockup-only utility trap as the
frame heights. Verified in Chromium: 0.4 / 0.4 / 0.45 computed, tabIndex 0,
`aria-disabled=true`, and Playwright refuses to click the tray's fifth
control ("element is not enabled").
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WKxKU17WQqryM8iNhpyJk7
Both commits fix the same Bugbot findings; this keeps whichever half is
actually correct rather than either wholesale.
Kept from the autofix: the `blocked` local, and the muted border tokens on
a control at the ceiling.
Kept from mine, and why:
- The compare view is derived (`showCompare = view === "compare" && count >= 2`)
rather than reset at each call site. The autofix patched `Empty` and the
per-row remove to also `setView("browse")`, which works but leaves
`if (count <= 2)` reading a pre-removal count and only looking
load-bearing; any later removal path would have to remember to repeat it.
With the guard derived, both side effects are redundant, so they are
dropped.
- The blocked control's dimming is an inline style, not `opacity-40`.
Production only ever uses that utility behind `disabled:`, so the bare
class is never emitted for a mockup-only source and the autofix's blocked
rows would have rendered at full strength — the finding's own symptom.
- The explanatory `title` and the "already holds 4" label, so the ceiling
states its reason rather than only looking inert.
Verified in Chromium on the merged tree: Empty and per-row remove both
return to browse with the list intact; the fifth control computes opacity
0.4, `aria-disabled=true`, tabIndex 0, title "Tray full — remove one to add
DBT"; no page or console errors.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WKxKU17WQqryM8iNhpyJk7
There was a problem hiding this comment.
Approved. Cursor Bugbot is not running on this head; its prior two findings were marked fixed by Bugbot Autofix and the current tray code derives compare visibility and disables adds at the four-therapy ceiling. No reviewers were assigned.
Sent by Cursor Approval Agent: Pull Request Router and Approver
Direction C's own notes say the tray has to negotiate the bottom-chrome contract with the edge-to-edge composer, but neither of its frames rendered `PhoneComposer` — unlike Directions A and B. The prototype therefore hid the single collision the direction most needs judging on, and showed it with more viewport than production would allow. The tray now sits in flow directly above the composer in both frames, to scale, so the ~134 px of permanent bottom chrome is visible rather than assumed away. The list padding drops from `pb-28` to `pb-4` because the tray no longer overlays the content it sat on top of. The `warn` note is rewritten to point at what the frames now show instead of describing it. Re-verified in Chromium: composer present, compare view still reachable at two, Empty still returns to browse, no page or console errors. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKxKU17WQqryM8iNhpyJk7
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Records the Run-PR-style sweep check on PR #2339 (therapy comparison mobile design mockups): already fully green, only needed a main sync. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C4RHy24AtgPobEQQwrj7u1
* Add branch review record for PR #2342 sweep Records the Run-PR-style sweep check on PR #2342 (Improve Therapy best-match visibility): review comments already fixed, branch synced from main, CI green on completed checks. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C4RHy24AtgPobEQQwrj7u1 * docs(ledger): record Run PR sweep of Dependabot PRs #2296, #2297, #2325, #2326 Immutable review records for the four-PR dependency sweep: CI fix on #2325, clean main-syncs on #2296/#2297, and diagnosis-only on #2326 (Node 26 Docker bump incompatible with the engine-strict Node 24 pin). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C4RHy24AtgPobEQQwrj7u1 * Add branch review record for PR #2339 sweep Records the Run-PR-style sweep check on PR #2339 (therapy comparison mobile design mockups): already fully green, only needed a main sync. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C4RHy24AtgPobEQQwrj7u1 * Add branch review records for PR #2341, #2347 sweep Records the Run-PR-style sweep checks on #2341 (dictionary filter band, fixed via main sync, unrelated flake confirmed) and #2347 (browser test gate handoff, fixed stale generated file + doc-link allowlist entries; owner closed the PR mid-sweep for unrelated reasons). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C4RHy24AtgPobEQQwrj7u1 --------- Co-authored-by: Claude <noreply@anthropic.com>
* Add branch review record for PR #2342 sweep Records the Run-PR-style sweep check on PR #2342 (Improve Therapy best-match visibility): review comments already fixed, branch synced from main, CI green on completed checks. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C4RHy24AtgPobEQQwrj7u1 * docs(ledger): record Run PR sweep of Dependabot PRs #2296, #2297, #2325, #2326 Immutable review records for the four-PR dependency sweep: CI fix on #2325, clean main-syncs on #2296/#2297, and diagnosis-only on #2326 (Node 26 Docker bump incompatible with the engine-strict Node 24 pin). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C4RHy24AtgPobEQQwrj7u1 * Add branch review record for PR #2339 sweep Records the Run-PR-style sweep check on PR #2339 (therapy comparison mobile design mockups): already fully green, only needed a main sync. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C4RHy24AtgPobEQQwrj7u1 * Add branch review records for PR #2341, #2347 sweep Records the Run-PR-style sweep checks on #2341 (dictionary filter band, fixed via main sync, unrelated flake confirmed) and #2347 (browser test gate handoff, fixed stale generated file + doc-link allowlist entries; owner closed the PR mid-sweep for unrelated reasons). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C4RHy24AtgPobEQQwrj7u1 * Add branch review records for PR #2338, #2337, #2333 sweep Records the Run-PR-style sweep checks: #2337 fixed a design-token ratchet failure, #2333 fixed a tap-target size regression and resolved a concurrent-push merge, #2338 was only a main sync. #2333 and #2338 still have an open PR-policy failure (missing Clinical Governance Preflight section) left for the PR author to fill in. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C4RHy24AtgPobEQQwrj7u1 --------- Co-authored-by: Claude <noreply@anthropic.com>
The tray was the strongest of the three ideas and the weakest execution. This is the same model with its three real costs removed, added as a fourth direction rather than replacing the original so the two can be compared. - The tray does not exist until something is in it. An empty Therapy screen is exactly what it is today: one composer and nothing more. The original drew a 68px bar with four hollow dots before any choice had been made — permanent furniture advertising a feature nobody was using yet. - Tray and composer are one bottom stack that translates off together on scroll-down and returns on scroll-up, with the content reserve going to zero while hidden. That is the `docs/search-chrome-behaviour.md` contract the original only described in prose. - You can add from a therapy record, not just from a list. Tapping a name opens the record and its primary action fills the tray without losing your place. That is the entire argument for carrying a set, and the original never showed it. - Arrival is legible: the filled slot marks itself as it lands and the row control flips to a tick, so a state change 600px from the thumb still reads. Dropped entirely under `prefers-reduced-motion`. The fixture list grows from 10 to 20 records because a short list cannot demonstrate scroll-hide honestly — releasing the reserve shortens the content, which un-scrolls a short list, which reveals the chrome again. The real catalogue is 205 records and never does this; an 8-row mockup did, and the loop was visible before the list was lengthened. Verified in Chromium: no tray at zero; reserve 138px -> 12px and the stack translating 126px on scroll-down, both restored on scroll-up; record-add moving the tray to 3 of 4; compare reachable at two and unreachable below it; no page or console errors. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKxKU17WQqryM8iNhpyJk7
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #13855 (success). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
…ison-mobile-design-z0dagr
Fixes the Static PR checks failure on 022021d: [repo-awareness] The committed snapshot is behind the repository: - routes differs from the repository `data/repo-awareness-snapshot.json` records every route in the repository and the four `/mockups/therapy-compare-*` pages were missing from it. The regenerated snapshot adds exactly those four and nothing else. Why it passed locally and failed in CI: the branch was 12 commits behind main, and `snapshot:repo-awareness` / `check:repo-awareness-snapshot` were added to package.json on main after this branch was cut. CI evaluates the merge of the head with the current base, so it ran a gate whose npm script this branch did not yet contain — `npm run snapshot:repo-awareness` failed with "Missing script" here while the same check ran and failed there. The gate is also outside the `verify:cheap` set, so a clean local broad run said nothing about it. Merging main in resolves both halves. Verified on the merged tree: check:repo-awareness-snapshot in step (192 pages), sitemap:check clean, lint and typecheck green, and the three tests that guard the snapshot and route reachability passing (22 tests). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKxKU17WQqryM8iNhpyJk7
Main advanced to cf7a873 and GitHub reported a real conflict, in `data/repo-awareness-snapshot.json` only. Both sides had regenerated the same committed inventory, which is what that file is for and also what makes it a contention magnet. Resolved the way the repo requires for generated files — take the base version and re-run the generator, never hand-merge the hunks: git checkout origin/main -- data/repo-awareness-snapshot.json npm run snapshot:repo-awareness The result is main's snapshot plus this branch's four mockup routes, which is exactly the intended union of the two sides. Verified: check:repo-awareness-snapshot in step (192 pages), sitemap:check clean, whole-tree Prettier clean, lint and typecheck green, and the three tests covering the snapshot, its gate and route reachability passing (22). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKxKU17WQqryM8iNhpyJk7
Main advanced to 069058a and `data/repo-awareness-snapshot.json` conflicted for the second time in twelve hours, on the same generated inventory and for the same reason: both sides regenerated it. Resolved the same way — take the base version and re-run the generator, never hand-merge: git checkout origin/main -- data/repo-awareness-snapshot.json npm run snapshot:repo-awareness Verified: snapshot in step (193 pages), sitemap:check clean, whole-tree Prettier clean, lint and typecheck green. This is the third problem that one generated file has caused on a PR whose substance is four design-scratch mockup routes — a clinical-risk classification it does not deserve, and now two merge conflicts. Dropping it from this branch is with the owner as a decision; the file rebuilds on the next generator run, so nothing is lost by removing it here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKxKU17WQqryM8iNhpyJk7
data/repo-awareness-snapshot.json conflicts on every main merge because it records a repository-wide inventory that moves with each landed PR. Resolved the documented way for a generated file: take main's version, regenerate. Reviews 2610 -> 2613; routes unchanged from this branch's four mockup routes.



Summary
/therapy-compass/compare, each a live, tappable phone prototype rather than a static picture, undersrc/app/mockups/therapy-compare-{progressive,sheet,tray}with their components insrc/components/therapy-compare-picker-mockups/.therapy-compare-progressive— Add as you go. Empty slots are never drawn. An empty screen is a heading, one sentence, one primary button and three starter pairs; each therapy chosen becomes a row, and the add control moves below it and quietens. At four it becomes a plain sentence rather than a disabled control.therapy-compare-sheet— Build the set in one sheet. Selection is a full-height mode: search, a category chip row over the sixteen catalogue groups, multi-select with a draft that only commits onCompare N, so cancelling cannot destroy the current set. The page body shrinks to one wrapping row of pills plus the comparison.therapy-compare-tray— Carry a compare tray. Selection leaves the page body entirely for a persistent bottom tray filled from search results and therapy records; the compare route is only ever reached with something in it. Notes flag thedocs/search-chrome-behaviour.mdcollision this direction has to resolve (one bottom-chrome owner, edge-to-edge composer, zero reserve when hidden).min-w-[720px]table in a horizontal scroller./mockups/therapy-compare-prefix inmockups-layout-client.tsxso shared chrome is suppressed — each frame draws its own universal header and edge-to-edge composer, and the surface under study is defined by what sits between them.docs/site-map.mdfor the three new routes.Mockup-only arbitrary Tailwind values are written as inline styles.
globals.csscarries@source not "../components/**/*mockup*", so a utility used nowhere else insrcis never emitted and silently collapses the frame — the shipped therapy-navigation mockups render at content height rather than their declaredh-[28rem]for this reason. Not fixed here; flagged for a separate change.Design-scratch only:
src/app/mockups/**404s in production, and these routes are exempt from the button-wiring and route-reachability gates and nothing else. Comparison copy in the fixtures is placeholder text for layout, stated as such on each page; every record carriesneeds_review, matching the real catalogue.Verification
npm run lint— pass ([gate-receipts] recorded a pass for "lint:internal" (5241 input files))npm run typecheck— pass ([gate-receipts] recorded a pass for "typecheck:internal" (5241 input files))npx vitest run tests/route-reachability.test.ts—Test Files 1 passed (1) · Tests 5 passed (5)npm run sitemap:check— pass, clean after regenerationnpm run docs:check-index—coverage OK: all 63 repository roots/modules/routes and all schema tables are indexednpm run format— run and committed;prettier --checkon the changed paths reportsAll matched files use Prettier code style!Rendered proof: all three routes return 200 on the local dev server and were driven through their states with Chromium (add/remove, picker, sheet multi-select and commit, tray expand/collapse) with zero page errors and zero console errors; the phone frame measures 390 × 736 as designed.
npm run verify:pr-local— Verification not run: superseded by the gates above. The change is design-scratch mockup routes plus one generated doc;lint,typecheckand the reachability test are the failure classes this diff can plausibly break, and all three ran green. CI's own routing remains the authority.npm run verify:ui— UI verification not run: no production route, shared component, or token changed.src/app/mockups/**404s in production and no Playwright journey covers these routes. Browser proof above is Chromium interaction against the live dev server.npm run verify:release— not a release or handoff-confidence claim.npm run eval:retrieval:quality— no retrieval, ranking, selection, chunking or scoring behaviour changed.npm run eval:rag -- --limit 15+npm run eval:quality -- --rag-only— no answer generation, synthesis prompt or post-processing changed.npm run check:production-readiness— no clinical workflow, privacy, environment, Supabase, source governance or deployment behaviour changed.npm run check:deployment-readiness— no deployment startup, hosting or rollout behaviour changed.Risk and rollout
mockups-layout-client.tsx, where a new path-prefix flag is added and ANDed into the existingsearchComposerVisibleandchromeVisibleexpressions; it can only affect paths starting/mockups/therapy-compare-, all of which are new in this PR.docs/site-map.mdis generated.git revertthe single commit. Nothing is imported by production code — the ESLint no-restricted-imports rule blocks that by construction.Notes
src/components/compare/is shared by therapy, dictionary, DSM, formulation and specifiers, so the empty-slot problem these mockups target is present on all five. Direction A would land on all of them at once.Generated by Claude Code
Note
Low Risk
Mockup-only routes plus a path-prefix chrome flag; no production compare, picker, or clinical data paths change.
Overview
Adds three live, tappable phone prototypes for the therapy comparison picker on
/therapy-compass/compare, targeting empty slots, duplicate add controls, and a sideways-scrolling table.A · Add as you go never draws empty slots: one primary button and starter pairs, then a row per chosen therapy. B · Build the set in one sheet is a full-height multi-select with category chips and a draft that only commits on Compare. C · Carry a compare tray moves selection into a persistent bottom tray filled from browse/search so compare is never opened empty.
Shared fixtures, a six-defect brief, and a stacked per-field comparison preview live in
therapy-compare-picker-mockups. Shared mockup chrome is suppressed for/mockups/therapy-compare-*so each frame owns header and composer. Design-scratch only (404 in production).Reviewed by Cursor Bugbot for commit 341c3c9. Configure here.