Improve Safety Snapshot density on phone diagnosis detail - #1758
Conversation
Flatten the header, prefer Watch-for tags over redundant summaries, and render equal value-first metric cells so the emergent card no longer leaves empty grid holes or duplicate copy on mobile. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
📝 WalkthroughWalkthroughThe differential detail page now provides a responsive Safety Snapshot with redundancy filtering, compact labels, cleaned tags, accessible fact lists, and responsive review actions. The branch review ledger also contains additional and reordered review records from August 7–8, 2026. ChangesSafety Snapshot redesign
Branch review ledger maintenance
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant DifferentialDetailPage
participant differential_detail_helpers
participant SafetySnapshot_DOM
DifferentialDetailPage->>differential_detail_helpers: Check summary against Watch-for tags
differential_detail_helpers-->>DifferentialDetailPage: Return redundancy result and compact labels
DifferentialDetailPage->>SafetySnapshot_DOM: Render responsive summary, tags, facts, and review CTA
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:7e672224fa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…om/BigSimmo/Database into cursor/safety-snapshot-mobile-4ab3 Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Keep the Watch-for label on its own row so chips wrap cleanly without leaving a sparse first-line gap beside the label. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
isRedundantSafetySummary only treated the summary as redundant when every summary token is already covered by Watch-for tags. Tags being a subset of the summary no longer hides unique risks such as unsafe living. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Compact visual labels stay abbreviated below sm, but the metric row keeps fact.label via aria-label so screen readers are not limited to short names. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
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 `@docs/branch-review-ledger.md`:
- Around line 703-716: The ledger changes must preserve append-only history:
restore all existing rows and their original ordering in the affected sections,
including the ranges around the referenced entries, and retain the merge driver.
Add only genuinely new records via the ledger command; after synchronizing with
main, run deduplication and then check:branch-review-ledger.
🪄 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: 7ec767d2-1674-4899-b259-e9940fdbc098
📒 Files selected for processing (4)
docs/branch-review-ledger.mdsrc/components/differentials/differential-detail-page.tsxsrc/lib/differential-detail.tstests/differential-detail.test.ts
Uh oh!
There was an error while loading. Please reload this page.
Summary
isRedundantSafetySummaryso comma-list summaries that overlap tags (e.g. Dementia apathy) do not repeat the same content.min-h-tap, and existing must-not-miss wiring.Verification
npm run test -- tests/differential-detail.test.ts— 21 passednpm run format:changed— All matched files use Prettier code stylenpm run check:rag:fixtures— Offline RAG fixture and manifest validation passed (36 golden cases, 23 suites)npm run verify:pr-local— lint/typecheck/full unit suite passed (529 files / 5716 tests); initialbuildblocked by runningnpm run ensureserver; rebuilt withALLOW_BUILD_WITH_DEV_SERVER=1— build PASS (client bundle secret surface check passed)/differentials/diagnoses/dementia-apathy-neurocognitive-disorder— flat header, no duplicate summary, compact labels (High-risk/Actions/Related), equal 3-col value-first metrics, full-width CTASafety Snapshot phone 390
Risk and rollout
Notes
verify:uinot run: change is scoped to one diagnosis-detail card; phone visual proof covered the owner journey.To show artifacts inline, enable in settings.
Summary by CodeRabbit
New Features
Documentation