Skip to content

Unify answer recovery states with shared EmptyState primitive#755

Closed
BigSimmo wants to merge 2 commits into
mainfrom
codex/improve-clinical-user-journey-alignment
Closed

Unify answer recovery states with shared EmptyState primitive#755
BigSimmo wants to merge 2 commits into
mainfrom
codex/improve-clinical-user-journey-alignment

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Motivation

  • The Answer workflow had three different ad-hoc recovery surfaces (cancelled, no-results, error) that produced inconsistent visual hierarchy, discovery of next actions, and ARIA semantics.
  • The change aims to reduce interaction cost and improve accessibility by consolidating recovery messaging into a single design-system primitive while preserving existing actions and behaviors.

Description

  • Extended the EmptyState primitive in src/components/ui-primitives.tsx to accept actions, live, tone, and testId props and used only existing design tokens and control primitives.
  • Replaced ad-hoc cancelled/no-results/error blocks in the Answer surface with EmptyState (in src/components/ClinicalDashboard.tsx), keeping the same retry/rephrase/document-search actions but colocating them inside the announced state surface.
  • Added a small DOM-level test tests/ui-primitives.dom.test.tsx that asserts live-region announcement roles and presence/visibility of recovery actions.
  • No raw colours, z-index, or bespoke focus behaviour were introduced; changes reuse primaryControl, floatingControl, tone tokens, LoadingPanel, and other existing primitives.

Testing

  • Ran focused unit checks with npm run test:focused -- --files src/components/ui-primitives.tsx,src/components/ClinicalDashboard.tsx and they passed.
  • Executed the new DOM test via npx vitest run tests/ui-primitives.dom.test.tsx and it passed.
  • Ran npm run format:check and code was formatted successfully with prettier.
  • Attempted a full test (npm run test) and a full typecheck; the full test run produced environment-specific RAG parse warnings in stderr and the broader typecheck run was temporarily blocked by a heavyweight-run lock left by a parallel Vitest process, so full-suite typecheck/CI-level verification and live npm run ensure browser QA were not completed in this session.

Codex Task

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@BigSimmo, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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 Plus

Run ID: 0435f3c3-52cd-4056-838a-194047170b37

📥 Commits

Reviewing files that changed from the base of the PR and between b04c95f and 5f06e77.

📒 Files selected for processing (3)
  • src/components/ClinicalDashboard.tsx
  • src/components/ui-primitives.tsx
  • tests/ui-primitives.dom.test.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/improve-clinical-user-journey-alignment

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

@supabase

supabase Bot commented Jul 17, 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 ↗︎.

@BigSimmo
BigSimmo marked this pull request as ready for review July 17, 2026 19:36
@BigSimmo
BigSimmo enabled auto-merge July 17, 2026 19:36
@BigSimmo BigSimmo closed this Jul 17, 2026
auto-merge was automatically disabled July 17, 2026 20:12

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant