fix: unify answer recovery states with shared EmptyState#802
Conversation
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthrough
ChangesAnswer recovery UI
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/ClinicalDashboard.tsx`:
- Around line 3648-3655: Update the error EmptyState branch in ClinicalDashboard
to distinguish errors by activeModeResultKind instead of always presenting
“Answer unavailable.” Use the appropriate title and icon for document-search and
clipboard errors, while preserving the answer-specific presentation for answer
errors.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: dc1fddb3-1808-42b7-802d-9563fea5fb17
📒 Files selected for processing (3)
src/components/ClinicalDashboard.tsxsrc/components/ui-primitives.tsxtests/ui-primitives.dom.test.tsx
| ) : error ? ( | ||
| <EmptyState | ||
| icon={CircleAlert} | ||
| title="Answer unavailable" | ||
| body={error} | ||
| live="assertive" | ||
| tone="danger" | ||
| testId="answer-error" |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Do not label every dashboard error as an answer failure.
This branch also handles document-search and clipboard errors, so those modes now display “Answer unavailable.” Select the title/icon based on activeModeResultKind, or restrict this EmptyState to answer errors.
Proposed fix
- title="Answer unavailable"
+ title={activeModeResultKind === "answer" ? "Answer unavailable" : "Search unavailable"}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ) : error ? ( | |
| <EmptyState | |
| icon={CircleAlert} | |
| title="Answer unavailable" | |
| body={error} | |
| live="assertive" | |
| tone="danger" | |
| testId="answer-error" | |
| ) : error ? ( | |
| <EmptyState | |
| icon={CircleAlert} | |
| title={activeModeResultKind === "answer" ? "Answer unavailable" : "Search unavailable"} | |
| body={error} | |
| live="assertive" | |
| tone="danger" | |
| testId="answer-error" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/components/ClinicalDashboard.tsx` around lines 3648 - 3655, Update the
error EmptyState branch in ClinicalDashboard to distinguish errors by
activeModeResultKind instead of always presenting “Answer unavailable.” Use the
appropriate title and icon for document-search and clipboard errors, while
preserving the answer-specific presentation for answer errors.
Pull request was closed
CodeRabbit residual from superseded #802: non-answer modes should not show "Answer unavailable" for document-search/clipboard failures. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
#812) * fix: place Also matches after mode hubs and always show error focus Keep tools/favourites Also matches after primary hub content so the panel matches the post-results placement landed from the screenshot queue, and use focus: styles on the route error heading so recovery focus remains visible after pointer-driven failures. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * fix: distinguish answer vs search EmptyState error titles CodeRabbit residual from superseded #802: non-answer modes should not show "Answer unavailable" for document-search/clipboard failures. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Summary
Verification
npm run verify:uievidence via hosted UI gates on predecessor heads.Risk and rollout
Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Summary by CodeRabbit
New Features
Accessibility