fix(ui): give the search progress Stop pill vertical clearance - #1638
Conversation
The documents/library search progress banner has `px-3` and no vertical padding, so the `min-h-tap` (48px) Stop button filled the container's entire 48px content box and its border sat 1px off the banner border on every side — the pill read as welded into the banner edge on phones. Split the control into the repo's existing hit/face pattern (`sourceCapsuleHit` / `sourceCapsule`, ui-primitives.tsx:110-118): the button stays a 48px tap target with no visible chrome, and an inner span carries the visible 32px pill. Hover and focus chrome move to the face via `group-hover:` / `group-focus-visible:`. Measured on a 440px viewport, banner height unchanged at 50px: before face 48px tall, clearance 1px top / 1px bottom after face 32px tall, clearance 9px top / 9px bottom The focus ring is now contained by the banner too; at 48px + 2px offset it previously overflowed the 50px banner. Right-hand clearance (13px) and the 48px tap target are unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CBZ7E174oFHfrW6VqcNRDF
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:53 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Comment |
This pull request has been ignored for the connected project Preview Branches by Supabase. |
`check:maintainability-budgets` failed on the previous commit: ClinicalDashboard.tsx grew to 4143 lines against its 4140-line no-growth budget. The guard's remedy is extraction rather than trimming the diff, so lift the library-search progress banner into `answer-status.tsx` beside its siblings AnswerProgressStepper / AnswerSkeleton / AnswerEmptyState, which already own this module's loading surfaces. ClinicalDashboard.tsx: 4143 -> 4122 lines (4122/4140), i.e. 14 lines below where the file started before the fix. `Loader2` is no longer referenced there and is dropped from the lucide import. Behaviour and markup are unchanged; re-measured in Chromium at 440px: banner 50px, tap target 48px, visible face 32px, clearance 9px top / 9px bottom / 13px right, focus ring 2px solid at 2px offset on the face, Enter on the focused button still stops the search, no horizontal overflow. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CBZ7E174oFHfrW6VqcNRDF
Uh oh!
There was an error while loading. Please reload this page.
Summary
e1d856f— fix the Stop pill spacing. In the documents/library search progress banner the Stop pill was visually welded into the banner's top and bottom edges on phones. The banner usespx-3with no vertical padding, so themin-h-tap(48px) Stop button filled the container's entire 48px content box and its border sat 1px off the banner border. Split the control into the pattern this repo already documents for exactly this problem —sourceCapsuleHit/sourceCapsule(src/components/ui-primitives.tsx:110-118): thebuttonelement stays an invisible 48px tap target, and an innerspancarries the compact visible 32px pill. Hover and focus chrome move onto the face viagroup-hover:/group-focus-visible:.5caf771— extractSearchProgressBanner. The first commit trippedcheck:maintainability-budgets(ClinicalDashboard.tsx: 4143 lines exceeds the 4140-line no-growth budget). That guard asks for extraction rather than a trimmed diff, so the banner moved intoclinical-dashboard/answer-status.tsxbeside its siblingsAnswerProgressStepper/AnswerSkeleton/AnswerEmptyState, which already own this module's loading surfaces.ClinicalDashboard.tsxgoes 4143 → 4122 lines (4122/4140), 14 lines below where the file started.Loader2is no longer referenced there and is dropped from the lucide import.Presentational only. No behaviour, wiring, retrieval, or copy change; the
stopSearchhandler, thestop-answertest id, and the 48px tap target are all unchanged.Measured in Chromium at a 440px viewport (
deviceScaleFactor: 3), banner outer height unchanged at 50px:The focus ring is now contained by the banner as well — on the old 48px button a 2px ring at 2px offset needed 56px inside a 50px banner, so it overflowed. Geometry was re-measured after the extraction and is identical to the post-fix row above.
The answer-mode
AnswerProgressStepperis a separate component and is not touched by this diff; its container already carriespy-2.RAG impact: no retrieval behaviour change — this is a presentational change to a progress-banner button's box model, plus a pure move of that banner between files. No retrieval, ranking, selection, scoring, or ordering surface is read or written.
classifyPullRequestFilesreturnsragRanking: false,clinicalRisk: false,operationalRisk: false,ui: truefor both changed paths.Verification
npm run verify:pr-localverify:pr-localhalts in this container atcheck:installed-lock-parityon pre-existing environment drift (playwrightinstalled 1.62.0 vs locked 1.62.1), and the documented remediationnpm ci --include=devcannot run here: the container has Node 24.13.0 but the lockfile'sjsdom@30.0.1requires^24.15.0(EBADENGINE). Neither is caused by this diff, and no force/legacy flag was used to push past the engine check. Every other check in the gate's own plan was run individually instead, re-run after the extraction, all green:npm run check:runtime—PASS: Node runtime 24.13.0 matches required Node 24.x./PASS: npm runtime 11.6.2 matches required npm 11.x.npm run format:changed—All matched files use Prettier code style!npm run lint— exit 0, no findingsnpm run typecheck— exit 0, no findingsnpm run test—Test Files 509 passed (509)/Tests 5374 passed | 4 skipped (5378)npm run build— exit 0, throughClient bundle secret surface check passed.npm run check:rag:fixtures—Offline RAG fixture and manifest validation passed (36 golden cases, 23 suites).npm run check:maintainability-budgets—[maintainability] src/components/ClinicalDashboard.tsx: 4123/4140 lines…Maintainability hotspot budgets passed.(this is the CI check that caught the first commit; 4122 after the unused-import removal)npm run check:knip— exit 0, no unused/unlisted/unresolved findings for the new exportUI verification not run:
npm run verify:uiwas not run. Per the repo's verification principle, the changed failure class here is the box model of one leaf presentational control, and it was proven directly in Chromium against the running dev server rather than inferred — the before/after geometry in the table above was measured fromgetBoundingClientRect()on the live element, plus a keyboard check (focusing the button and pressing Enter removes it, sostopSearchstill fires), agroup-focus-visiblecheck (the ring resolves to2px solidat2pxoffset on the visible face), and a horizontal-overflow check (scrollWidth > clientWidthis false on the document element). All four were re-run against the extracted component with identical results. No shared chrome, token, reserve, or CSS foundation changed, so the broad Chromium gate covers no additional plausible regression from this diff — and CI's ownProduction UI criticaljob runs the Chromium journeys on this head regardless.npm run verify:releasebefore release or handoff confidence claims — not run; no release or handoff confidence is claimed, and it is provider-backed.Risk and rollout
git revertthe two commits, newest first. No migration, data, config, or generated artefact is involved.Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)This section is completed for completeness;
classifyPullRequestFilesreturnsclinicalRisk: falsefor this diff, which changes no clinical, source-governance, or document-access behaviour.Notes
min-h-tap(48px) control placed inside a container with zero vertical padding will always fill that container's content box exactly. The repo'ssourceCapsuleHit/sourceCapsulepair is the intended answer, and this diff just applies it. There is no automated guard for that combination today, and this banner has no Playwright coverage — which is why the defect shipped. Happy to add a phone-width geometry assertion as a follow-up if you want the guard; it was left out here to avoid adding a new CI journey for a cosmetic fix.