Skip to content

fix(ui): give the search progress Stop pill vertical clearance - #1638

Merged
BigSimmo merged 6 commits into
mainfrom
claude/search-bar-stop-spacing-xi3y5d
Aug 6, 2026
Merged

fix(ui): give the search progress Stop pill vertical clearance#1638
BigSimmo merged 6 commits into
mainfrom
claude/search-bar-stop-spacing-xi3y5d

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Aug 6, 2026

Copy link
Copy Markdown
Owner

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 uses px-3 with 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. Split the control into the pattern this repo already documents for exactly this problem — sourceCapsuleHit / sourceCapsule (src/components/ui-primitives.tsx:110-118): the button element stays an invisible 48px tap target, and an inner span carries the compact visible 32px pill. Hover and focus chrome move onto the face via group-hover: / group-focus-visible:.
  • 5caf771 — extract SearchProgressBanner. The first commit tripped check: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 into clinical-dashboard/answer-status.tsx beside its siblings AnswerProgressStepper / AnswerSkeleton / AnswerEmptyState, which already own this module's loading surfaces. ClinicalDashboard.tsx goes 4143 → 4122 lines (4122/4140), 14 lines below where the file started. Loader2 is no longer referenced there and is dropped from the lucide import.

Presentational only. No behaviour, wiring, retrieval, or copy change; the stopSearch handler, the stop-answer test id, and the 48px tap target are all unchanged.

Measured in Chromium at a 440px viewport (deviceScaleFactor: 3), banner outer height unchanged at 50px:

visible pill heightclearance topclearance bottomclearance right
before48px1px1px13px
after32px9px9px13px

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 AnswerProgressStepper is a separate component and is not touched by this diff; its container already carries py-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. classifyPullRequestFiles returns ragRanking: false, clinicalRisk: false, operationalRisk: false, ui: true for both changed paths.

Verification

  • npm run verify:pr-local

verify:pr-local halts in this container at check:installed-lock-parity on pre-existing environment drift (playwright installed 1.62.0 vs locked 1.62.1), and the documented remediation npm ci --include=dev cannot run here: the container has Node 24.13.0 but the lockfile's jsdom@30.0.1 requires ^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:runtimePASS: Node runtime 24.13.0 matches required Node 24.x. / PASS: npm runtime 11.6.2 matches required npm 11.x.
  • npm run format:changedAll matched files use Prettier code style!
  • npm run lint — exit 0, no findings
  • npm run typecheck — exit 0, no findings
  • npm run testTest Files 509 passed (509) / Tests 5374 passed | 4 skipped (5378)
  • npm run build — exit 0, through Client bundle secret surface check passed.
  • npm run check:rag:fixturesOffline RAG fixture and manifest validation passed (36 golden cases, 23 suites).
  • npm run check:maintainability-budgets[maintainability] src/components/ClinicalDashboard.tsx: 4123/4140 linesMaintainability 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 export

UI verification not run: npm run verify:ui was 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 from getBoundingClientRect() on the live element, plus a keyboard check (focusing the button and pressing Enter removes it, so stopSearch still fires), a group-focus-visible check (the ring resolves to 2px solid at 2px offset on the visible face), and a horizontal-overflow check (scrollWidth > clientWidth is 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 own Production UI critical job runs the Chromium journeys on this head regardless.

  • npm run verify:release before release or handoff confidence claims — not run; no release or handoff confidence is claimed, and it is provider-backed.

Risk and rollout

  • Risk: Low. One presentational control, plus a same-module move of the component that renders it. The worst realistic regression is cosmetic (pill reads smaller than intended); the tap target, handler, and test id are unchanged, so the Stop affordance itself cannot regress silently.
  • Rollback: git revert the two commits, newest first. No migration, data, config, or generated artefact is involved.
  • Provider or production effects: None.

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

This section is completed for completeness; classifyPullRequestFiles returns clinicalRisk: false for this diff, which changes no clinical, source-governance, or document-access behaviour.

Notes

  • The root cause is a general shape worth watching: a min-h-tap (48px) control placed inside a container with zero vertical padding will always fill that container's content box exactly. The repo's sourceCapsuleHit / sourceCapsule pair 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.

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
@coderabbitai

coderabbitaiBot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 361137dc-ede2-41bc-91a7-b9251410b737

📥 Commits

Reviewing files that changed from the base of the PR and between d289abf and 3e3f42c.

📒 Files selected for processing (2)
  • src/components/ClinicalDashboard.tsx
  • src/components/clinical-dashboard/answer-status.tsx

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

@supabase

supabaseBot commented Aug 6, 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 ↗︎.

`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
@BigSimmo
BigSimmo marked this pull request as ready for review August 6, 2026 13:03

@devin-ai-integrationdevin-ai-integrationBot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@BigSimmo
BigSimmo enabled auto-merge (squash) August 6, 2026 13:56
@BigSimmo
BigSimmo merged commit 624843f into mainAug 6, 2026
26 checks passed
@BigSimmo
BigSimmo deleted the claude/search-bar-stop-spacing-xi3y5d branch August 6, 2026 15:16
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.

2 participants

@BigSimmo@claude