Skip to content

Improve mobile evidence sheet UX: clarify purpose, replace decorative circle, and tighten layout - #1820

Merged
BigSimmo merged 7 commits into
mainfrom
codex/review-and-optimize-page-design-and-logic
Aug 11, 2026
Merged

Improve mobile evidence sheet UX: clarify purpose, replace decorative circle, and tighten layout#1820
BigSimmo merged 7 commits into
mainfrom
codex/review-and-optimize-page-design-and-logic

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Motivation

  • The mobile evidence sheet used a decorative white circle with no semantic meaning, reserved excessive vertical space, and presented feedback copy that described internal evaluation rather than the user-facing action, reducing clarity and accessibility.
  • The change scopes a small, high-value UX/ARIA fix: make the claim-support signal meaningful, reduce dead space, and make the feedback flow explicitly understandable to clinicians and reviewers.

Description

  • Replace the decorative left circle with a semantic SupportStatusIcon that shows Direct/Partial/Unsupported support, includes an accessible aria-label, and uses the design-system tones for color and borders (src/components/clinical-dashboard/visual-evidence.tsx).
  • Improve claims list layout by removing the duplicated status-dot column, reducing per-row padding/min-height, and allowing the tab panel to size to content rather than a fixed 220px reserve (src/components/clinical-dashboard/visual-evidence.tsx).
  • Reframe the feedback area header and copy to the user-facing question Is the answer supported?, make the feedback buttons a centered two-column grid on mobile, and ensure the copy clearly states feedback is recorded for review and does not change the answer (src/components/clinical-dashboard/evidence-panels.tsx).
  • Clarify the evidence sheet description to read Check how well sources support this answer., add an explanatory paragraph above mobile tabs, add a focused DOM test, and update the branch review ledger entry (src/components/clinical-dashboard/answer-result-surface.tsx, tests/visual-evidence-tabs.dom.test.tsx, docs/branch-review-ledger.md).

Testing

  • Ran the focused unit/dom test npm run test -- --run tests/visual-evidence-tabs.dom.test.tsx and it passed (7 tests passed).
  • Ran the focused Playwright smoke journey (npm run test:e2e for the demo answer flow reaches a source-backed answer case) on Chromium and it passed for the built production artifact.
  • Ran the offline RAG validation npm run eval:rag:offline and it passed (23 suites, 574 tests across 36 golden cases).
  • Ran npm run ensure to verify the local app and npm run format to normalize formatting; git and the ledger guard checks succeeded locally, and a ledger row documenting the review was appended (no remaining high-confidence defects).

Notes: GitHub PR creation was not performed because the environment lacks an authenticated gh session; live provider/production-readiness gates (Supabase/OpenAI) were intentionally not run as they require explicit authorization.


Codex Task

Summary by CodeRabbit

  • New Features

    • Added clear indicators for direct, partial, and unsupported claim support.
    • Improved the mobile evidence sheet with explanatory guidance and compact layouts.
    • Clarified feedback options and review guidance.
  • Accessibility

    • Added semantic icons and accessible labels for support statuses.
    • Improved readability and responsive controls on smaller screens.
  • Bug Fixes

    • Removed unnecessary spacing and decorative placeholders.
    • Improved wrapping and alignment on mobile layouts.
  • Tests

    • Added coverage for evidence guidance, support statuses, and feedback messaging.

@supabase

supabase Bot commented Aug 11, 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 ↗︎.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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: 11 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: f00bc68e-a8f2-4f52-ac4f-7bf22e3aa5a0

📥 Commits

Reviewing files that changed from the base of the PR and between 9267af6 and bbeb08c.

📒 Files selected for processing (2)
  • docs/branch-review-ledger.md
  • src/components/clinical-dashboard/visual-evidence.tsx
📝 Walkthrough

Walkthrough

The clinical evidence UI now shows semantic support-status icons, clearer review guidance, responsive mobile layouts, and feedback wording that explains submissions do not change answers. A DOM test validates the updated evidence sheet content.

Changes

Evidence sheet UX

Layer / File(s) Summary
Support status and claim layout
src/components/clinical-dashboard/visual-evidence.tsx
Claim rows now use SupportStatusIcon for Direct, Partial, and Unsupported states. The layout has tighter spacing and responsive header wrapping.
Mobile sheet and feedback flow
src/components/clinical-dashboard/answer-result-surface.tsx, src/components/clinical-dashboard/evidence-panels.tsx, src/components/clinical-dashboard/visual-evidence.tsx, tests/visual-evidence-tabs.dom.test.tsx, docs/branch-review-ledger.md
The mobile evidence sheet adds review guidance and removes its fixed tab-panel height. Feedback wording and button layout are updated. DOM coverage validates the displayed guidance, status, and feedback text. The review ledger records the validation results.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers motivation, implementation, and testing but omits required Risk and rollout and Clinical Governance Preflight sections. Add the required template sections, including risk, rollback, provider effects, governance confirmations, and explicit reasons for any verification gates not run.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main UX, accessibility, and layout changes in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/review-and-optimize-page-design-and-logic

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

Comment thread src/components/clinical-dashboard/visual-evidence.tsx

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
src/components/clinical-dashboard/visual-evidence.tsx (1)

366-383: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add a non-color cue for Partial and Unsupported.

Icon selects CircleAlert for both labels. Claim rows show the icon but not the status text. Users who cannot distinguish the theme colors cannot tell these statuses apart. Use distinct iconography or render a short visible status label. Verify the selected Lucide icons against the pinned dependency version.

🤖 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/clinical-dashboard/visual-evidence.tsx` around lines 366 -
383, Update SupportStatusIcon so Partial and Unsupported use distinct non-color
cues instead of sharing CircleAlert; select separate Lucide icons verified
against the pinned dependency version, or render short visible status text.
Preserve the existing Direct styling and aria-label behavior while ensuring
claim rows can distinguish all support levels without relying on color.
tests/visual-evidence-tabs.dom.test.tsx (1)

63-70: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Assert that the legacy placeholder is absent.

The test title claims that decorative placeholders are removed, but the assertions only check the new content and one status image. The test can pass if the old placeholder remains in the claim row. Add an absence or structure assertion using the existing placeholder selector or test ID.

🤖 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 `@tests/visual-evidence-tabs.dom.test.tsx` around lines 63 - 70, Update the
test named “explains the review purpose and identifies claim support without
decorative placeholders” to assert that the legacy decorative placeholder is
absent, using the existing placeholder selector or test ID. Keep the current
visibility assertions unchanged.
🤖 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/clinical-dashboard/visual-evidence.tsx`:
- Line 451: Update the linked row’s accessible name near SupportStatusIcon and
the link’s aria-label so it includes the row’s support status (Direct, Partial,
or Unsupported), using existing support-level labeling and preserving the
current source-name text.
- Line 451: Update claimRowsForEvidencePanel so sourceStrength "none" is not
rewritten to "partial"; map it to "unsupported" or the existing separate unknown
state consistently with supportLabel and the source-review behavior. Update
SupportStatusIcon usage as needed to preserve that classification, and add a
test covering the "none" fallback path.
- Line 409: Update the evidence-row class string in the visual evidence
component to replace the hardcoded min-h-[72px] with the theme-backed min-h-18
token, preserving the existing 72px minimum height and all other layout classes.

---

Nitpick comments:
In `@src/components/clinical-dashboard/visual-evidence.tsx`:
- Around line 366-383: Update SupportStatusIcon so Partial and Unsupported use
distinct non-color cues instead of sharing CircleAlert; select separate Lucide
icons verified against the pinned dependency version, or render short visible
status text. Preserve the existing Direct styling and aria-label behavior while
ensuring claim rows can distinguish all support levels without relying on color.

In `@tests/visual-evidence-tabs.dom.test.tsx`:
- Around line 63-70: Update the test named “explains the review purpose and
identifies claim support without decorative placeholders” to assert that the
legacy decorative placeholder is absent, using the existing placeholder selector
or test ID. Keep the current visibility assertions unchanged.
🪄 Autofix

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

Run ID: 554ee755-ee52-409f-956b-2f9e75365206

📥 Commits

Reviewing files that changed from the base of the PR and between f3dbe8a and f9fc38b.

📒 Files selected for processing (5)
  • docs/branch-review-ledger.md
  • src/components/clinical-dashboard/answer-result-surface.tsx
  • src/components/clinical-dashboard/evidence-panels.tsx
  • src/components/clinical-dashboard/visual-evidence.tsx
  • tests/visual-evidence-tabs.dom.test.tsx

Comment thread src/components/clinical-dashboard/visual-evidence.tsx Outdated
Comment thread src/components/clinical-dashboard/visual-evidence.tsx

Copilot AI 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.

Pull request overview

Improves the mobile evidence sheet’s clarity, accessibility, and layout.

Changes:

  • Adds semantic claim-support indicators and tighter claim rows.
  • Clarifies evidence feedback and sheet guidance.
  • Adds focused DOM coverage and records the review.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
visual-evidence.tsx Adds status icons and compacts the evidence sheet.
evidence-panels.tsx Clarifies feedback copy and mobile layout.
answer-result-surface.tsx Updates the evidence-sheet description.
visual-evidence-tabs.dom.test.tsx Tests guidance, status, and feedback text.
branch-review-ledger.md Records the completed review.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/components/clinical-dashboard/visual-evidence.tsx
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

CI triage

CI failed on this PR. Automated classification of the 2 failed job(s):

  • Production UI (1)needs investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #9764 (cancelled).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

@BigSimmo
BigSimmo enabled auto-merge August 11, 2026 17:07
@BigSimmo

Copy link
Copy Markdown
Owner Author

PR review summary (review-and-fix)

  • Snapshot: PR Improve mobile evidence sheet UX: clarify purpose, replace decorative circle, and tighten layout #1820, branch codex/review-and-optimize-page-design-and-logic, head 897ff11a4cdb13ae1c01f5eb149007847028f5aa.
  • Local merge snapshot vs origin/main at push time: clean merge-tree on my side; PR remote mergeability remains BLOCKED due in-flight checks.
  • PR merge state check now: BLOCKED, MERGEABLE, headRefName=codex/review-and-optimize-page-design-and-logic.
  • Required checks on this head: PR policy ✅, PR mergeability ✅, Semgrep ⏳, Gitleaks ⏳, Semgrep ingestion gate ⏳, Static PR checks queued, Safety and config checks queued, Unit coverage queued, Build queued, Production UI critical queued, Lighthouse budget queued, GitGuardian ✅.
  • Fixed threads (resolved):
    • PRRT_kwDOSh5Fis6YSJ2Z — distinct Partial icon now uses CircleDashed.
    • PRRT_kwDOSh5Fis6YSSdj — evidence row uses min-h-18 token.
    • PRRT_kwDOSh5Fis6YSSdu — row aria-label now includes support status and none mapping fixed.
    • PRRT_kwDOSh5Fis6YSS8bsupportLabel now treats Not classified/none as unsupported.
  • Local proof: npx eslint src/components/clinical-dashboard/visual-evidence.tsx (pass). Push-guard format checks passed after formatting + amend.
  • Residual risk: PR-level CI remains in progress (queued/in progress checks below) before merge.

I also attempted inline thread replies, but those APIs were rejected for this GraphQL-ID style thread/comment format; all threads are resolved and dispositions are posted here.

Ledger entry appended:

  • scope: review-and-fix
  • outcome: fixed
  • checks: Semgrep:IN_PROGRESS, Gitleaks:IN_PROGRESS, Semgrep ingestion gate:IN_PROGRESS, Static PR checks:QUEUED, Safety and config checks:QUEUED, Unit coverage:QUEUED, Build:QUEUED, Production UI critical:QUEUED, Lighthouse budget:QUEUED

@BigSimmo

Copy link
Copy Markdown
Owner Author

Babysit sweep summary\n\n- PR head reviewed: �beb08c642b7e0d61c6cf5cde3df0fc683ec54a0 (after one sync merge from origin/main)\n- Mergeability snapshot: merge-tree clean\n- Ahead/behind: origin/main...HEAD = 0/7\n- Merge-state: BLOCKED, mergeable is MERGEABLE\n- Actionable review threads: none\n- Required checks:\n - Prior required run was blocked by Production UI (1) failure:\n ests/ui-route-coverage.spec.ts :: previously uncovered production routes › DSM comparison renders responsively and removes a selected diagnosis\n (page.waitForURL(//dsm/compare?ids=bipolar-ii-disorder$/) timed out)\n - Current checks are running after the pushed sync commit\n- Fixes/applicable edits: one unblock sync merge of origin/main pushed to branch\n- Decision: no PR-introduced actionable defects identified in this review sweep; I’m dispositioning the blocking UI failure as pre-existing/outside this PR's changed path until the current run pinpoints a fresh head-specific signal.

@BigSimmo
BigSimmo merged commit fb54b4d into main Aug 11, 2026
26 checks passed
@BigSimmo
BigSimmo deleted the codex/review-and-optimize-page-design-and-logic branch August 11, 2026 22:15
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.

2 participants