fix(forms): stop long pathway step codes overflowing the decision context#824
fix(forms): stop long pathway step codes overflowing the decision context#824BigSimmo wants to merge 1 commit into
Conversation
…text
The before/parallel/after lists in the decision-context card render each
step code in a fixed-width column. `pathwayItems` keeps the raw string as
the code when it matches a form-code shape — which includes qualified
codes like "6B attachment" (form 6B lists it as a parallel step) — so the
code cell overflowed into the title.
Add a PathwayStepCode helper that renders only the split head ("6B") in
that compact cell (reusing the shared splitFormCode), with truncation. The
full code is exposed to assistive tech via an sr-only label with the
decorative head marked aria-hidden, and to sighted users via a tooltip,
matching FormCodeBadge's pattern; the adjacent title column already shows
the full label, so nothing is lost.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJY1EzEXiBayz13Q6p2GwL
|
Warning Review limit reached
Next review available in: 24 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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 Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Pull request was closed
Summary
Re-opens the final piece of the form-code overflow cleanup (previously #742, which was closed before landing; #728 and #734 are already merged). The decision-context "Pathway" card on the form detail page renders each before/parallel/after step code in a fixed-width column.
pathwayItemskeeps the raw string as the code when it matches a form-code shape — which includes qualified codes like6B attachment(form 6B lists it as a parallel step) — so the code cell overflowed into the title.PathwayStepCodehelper that renders only the split head (6B) in the compact code cell, reusing the sharedsplitFormCodefromform-code-badge, with truncation.sr-onlylabel (the decorative head isaria-hidden) and to sighted users via a tooltip — matchingFormCodeBadge's pattern. The adjacent title column already shows the full label, so nothing is lost.Scope note: presentational only — one component (
form-detail-page.tsx), no data/routing/retrieval/answer/governance behaviour touched. This is a clean single commit rebased onto the currentmain.Verification
npx eslint src/components/forms/form-detail-page.tsx— cleannpx prettier --check— cleannode scripts/check-type-scale.mjs --strict— passesnpx vitest run tests/forms.test.ts tests/forms-clipboard-fallback.test.ts— 6/6 passnpm run typecheck— no new errors in the changed file (pre-existing failures are missing@testing-library/@axe-core/playwrightdev deps intests/, identical on base)/forms/form-6bdecision-context, whose parallel step is6B attachment— the code cell shows6Bwith6B attachmentin the title column, fully contained;1A/6A/Steprows unaffectednpm run verify:uigate requires@axe-core/playwright, not installed in this environment; verified visually with the pre-installed Chromium viaplaywright-coreinstead.Risk and rollout
Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
Clinical de-escalation) already resolve to theStephead, so they render unchanged.main).🤖 Generated with Claude Code
Generated by Claude Code