Skip to content

Design follow-ups: On Call hospital change in the hero, square Clinical chips, readable small labels - #3564

Merged
BigSimmo merged 7 commits into
mainfrom
claude/unified-design-system-6zlw0d
Oct 16, 2026
Merged

BigSimmo merged 7 commits into
mainfrom
claude/unified-design-system-6zlw0d

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

User description

Summary

Before: On Call named the hospital twice, once in the summary card and again on a line below that held the Change button. Some Clinical chips (the search prompt chips and the "Show all" chip) were rounded pills, a Work-mode shape. Small labels on the CPD and Admin heroes, the My Day ring legend and the Roster legend were faint or 10 px. Admin had no date line over its title. Favourites could split a drug name mid-word ("Acamprosa te"). The safety plan's step counts looked like empty boxes to type into. The Work search "New" note could sit over CPD's Customise button until dismissed.

After: On Call's hero carries a quiet "Change hospital" pill, and the duplicate hospital line is gone. Clinical chips use the Clinical square-ish corners, and Work keeps its pills. Hero and legend labels are 12 px at full contrast. Admin shows the date line like every other Work page. Favourites names wrap only at spaces and end in an ellipsis. Safety plan counts are a quiet tinted number that a screen reader hears as "3 entries". The Work search note shows once per device and goes by itself after 8 seconds, or at the first tap, key or scroll.

These are the agreed follow-ups from the 15 Oct 2026 design critique. Presentation only, with no clinical content, data, auth or provider changes. Josh saw the before and after picture and approved it on 16 Oct 2026.

Areas touched: Personal practice, App experience, Answer engine

RAG impact: no retrieval behaviour change. answer-suggestion-chips.tsx gains a corner-shape option only. No ranking, retrieval or ordering file was touched.

Verification

  • Checks run:
    • Typecheck: TSC_EXIT 0. ESLint clean on every changed file. Prettier: "All matched files use Prettier code style!"
    • npm run test:focused on all 22 changed files: "Test Files 112 passed (112)", "Tests 1419 passed (1419)".
    • Browser suites left to CI.

Risk and rollout

  • Risk: low. Styling and small component props only.
  • Rollback: revert the single commit.
  • Provider or production effects: None.

Notes

  • The branch was rebuilt on main after PR 3559 merged. The On Call signed-out and roster-error wording and the phone focus fix from 3559 are kept.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TexgR3MMbRJjXTT2C5PoPw


CodeAnt-AI Description

Improve clarity across On Call, Clinical tools, and Work pages

What Changed

  • On Call names the hospital once in the hero and places “Change hospital” beside the call action when multiple hospitals are available.
  • Clinical chips use square-ish corners while Work prompt chips keep their pill shape; Medicines suggestions follow the Clinical style.
  • Admin shows the date above its title, and small labels across CPD, My Day, and Roster are easier to read.
  • Favourite names no longer split mid-word, and safety-plan counts look like counts and are announced with their labels.
  • The Work search “New” note clears after 8 seconds or when the reader interacts elsewhere, and does not return once shown.

Impact

✅ Hospital changes without duplicate hospital names
✅ Easier-to-read Work page labels
✅ Favourite names stay intact
✅ Search tip clears the page automatically

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • New Features

    • Added a “Change hospital” action to the on-call hero when multiple hospitals are available.
    • Added clearer entry and reason counts to patient safety plans, including accessible count labels.
    • Added optional control-shaped suggestion chips for Clinical prompts.
  • Style

    • Improved text legibility in roster and shift legends, favourite names, and selected hero labels.
    • Updated corner shapes for Clinical controls and medicine search suggestions.
  • Bug Fixes

    • Refined the timing and dismissal behavior of the Work Search “New” note.
    • Kept the Admin Today date visible in the mode heading.

…ne, square Clinical chips, 12 px legends, Work search and safety plan polish

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TexgR3MMbRJjXTT2C5PoPw
@supabase

supabase Bot commented Oct 15, 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 Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Next included review available in 40 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 95 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: BigSimmo/PsychSift/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Team
  • Run ID: d9ae1ed6-7c26-474d-8959-e4fb068cfe3c
📥 Commits

Reviewing files that changed from the base of the PR and between 64d6128 and f5be679.

📒 Files selected for processing: 25
  • data/repo-awareness-snapshot.json
  • docs/decisions/2026-10-16-admin-shows-the-date-line.md
  • src/components/admin/admin-today-page.tsx
  • src/components/admin/admin-work.module.css
  • src/components/clinical-dashboard/answer-suggestion-chips.tsx
  • src/components/clinical-dashboard/universal-search-command-surface.tsx
  • src/components/cme/cme-work.css
  • src/components/favourites/favourites-shelf.tsx
  • src/components/formulation/formulation-home-page.tsx
  • src/components/medicines/medicines-home.tsx
  • src/components/my-day/my-day-today-cards.tsx
  • src/components/on-call/kit/hospital-line.tsx
  • src/components/on-call/now/on-call-hero.tsx
  • src/components/on-call/on-call-home.tsx
  • src/components/patient-safety-plan.tsx
  • src/components/roster/roster-month-grid.tsx
  • src/components/show-all-chip.tsx
  • src/components/work-search/work-search-button.tsx
  • tests/admin-today-page.dom.test.tsx
  • tests/clinical-chip-corners.dom.test.tsx
  • tests/my-day-favourites-shelf.dom.test.tsx
  • tests/on-call-now-hero.dom.test.tsx
  • tests/on-call-now.dom.test.tsx
  • tests/patient-safety-plan.dom.test.tsx
  • tests/work-search-coach.dom.test.tsx
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@codeant-ai

codeant-ai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: f5be6796
Scan Time: 2026-10-16 05:34:11 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality Gate Status Details
Secrets ✅ PASSED 0 secrets found
Duplicate Code ✅ PASSED 0.0% duplicated
SAST ✅ PASSED No security issues
Bugs ✅ PASSED Rating S: No bugs
IAC ✅ PASSED Rating S: No issues

View Full Results

gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 15, 2026

@gitar-bot gitar-bot 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.

Gitar has auto-approved this PR (configure)

@BigSimmo
BigSimmo marked this pull request as ready for review October 16, 2026 05:07

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BigSimmo has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@codeant-ai

codeant-ai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 0d8c36a Oct 16, 2026 · 05:07 05:13

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T05:14:10.171676Z 0d8c36a Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codeant-ai

codeant-ai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@claude

claude Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Claude encountered an error after 2s —— View job


I'll analyze this and get back to you.

@codeant-ai codeant-ai Bot added the size:L This PR changes 100-499 lines, ignoring generated files label Oct 16, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Polish Work heroes, Clinical chips, and small-label readability

✨ Enhancement 🐞 Bug fix 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Move On Call’s hospital switcher into the hero and add Admin’s missing date line.
• Give Clinical chips consistent corners and improve small labels, favourites, and safety-plan
 counts.
• Make Work search’s one-time note dismiss automatically or on interaction.
Diagram

graph TD
  A["Mode grouping"] --> B["Search surface"] --> C["Suggestion chips"]
  D["On Call home"] --> E["Now hero"] --> F["Hospital change"]
  G["Work search"] --> H["New note"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Scope chip corners through mode CSS
  • ➕ Avoids passing a shape prop through the search surface.
  • ➖ Couples shared chips to page-level mode styling and could change unrelated answer-thread chips.

Recommendation: Keep the explicit chip-shape option. It limits the Clinical change to intended callers while preserving the shared component’s existing pill default for Work and answer-thread uses.

Files changed (22) +469 / -51

Enhancement (9) +78 / -15
admin-today-page.tsxAdd the date above Admin’s band title +2/-1

Add the date above Admin’s band title

• Passes the formatted local date as the Admin mode band’s eyebrow, matching other Work pages.

src/components/admin/admin-today-page.tsx

answer-suggestion-chips.tsxSupport control-cornered suggestion chips +8/-1

Support control-cornered suggestion chips

• Adds an opt-in chip shape while retaining the pill default for existing callers.

src/components/clinical-dashboard/answer-suggestion-chips.tsx

universal-search-command-surface.tsxSelect prompt-chip shape by mode +13/-1

Select prompt-chip shape by mode

• Uses Clinical control corners for home prompt chips in Clinical modes and keeps pills in Work modes.

src/components/clinical-dashboard/universal-search-command-surface.tsx

medicines-home.tsxSquare Medicines suggestion corners +2/-2

Square Medicines suggestion corners

• Changes Try suggestion links and their faces to Clinical control corners without reducing their tap targets.

src/components/medicines/medicines-home.tsx

my-day-today-cards.tsxEnlarge the My Day shift legend +1/-1

Enlarge the My Day shift legend

• Raises shift legend text from the smaller size to 12 px.

src/components/my-day/my-day-today-cards.tsx

on-call-hero.tsxPlace hospital identity and change action in the hero +25/-2

Place hospital identity and change action in the hero

• Marks the hospital name within the hero eyebrow and accepts a hospital-change action alongside the switchboard action.

src/components/on-call/now/on-call-hero.tsx

patient-safety-plan.tsxMake safety-plan counts read as counts +20/-3

Make safety-plan counts read as counts

• Replaces bordered count pills with tinted numbers and supplies screen-reader labels with the appropriate singular or plural noun.

src/components/patient-safety-plan.tsx

roster-month-grid.tsxEnlarge the Roster legend +1/-1

Enlarge the Roster legend

• Raises month-grid legend text to 12 px for readability.

src/components/roster/roster-month-grid.tsx

show-all-chip.tsxUse Clinical corners for Show all chips +6/-3

Use Clinical corners for Show all chips

• Gives the chip a control-cornered face and its icon well a smaller matching corner while retaining the tap target.

src/components/show-all-chip.tsx

Bug fix (5) +46 / -12
admin-work.module.cssRestore full contrast to Admin hero labels +2/-1

Restore full contrast to Admin hero labels

• Removes reduced opacity from the small window labels on the Admin hero.

src/components/admin/admin-work.module.css

cme-work.cssIncrease contrast of CPD hero secondary text +6/-1

Increase contrast of CPD hero secondary text

• Raises the contrast of small hero text in light and dark themes using their respective ink colors.

src/components/cme/cme-work.css

favourites-shelf.tsxPrevent mid-word breaks in favourite names +7/-1

Prevent mid-word breaks in favourite names

• Keeps drug names intact at word boundaries and ellipsizes names that exceed the two-line tile space.

src/components/favourites/favourites-shelf.tsx

on-call-home.tsxRemove On Call’s duplicate hospital line +12/-6

Remove On Call’s duplicate hospital line

• Passes the hospital-change control into the Now hero when multiple hospitals are available and removes the repeated line beneath it.

src/components/on-call/on-call-home.tsx

work-search-button.tsxLimit the Work search New note to one brief display +19/-3

Limit the Work search New note to one brief display

• Marks the note seen when shown and dismisses it after eight seconds or the first outside tap, key, or scroll.

src/components/work-search/work-search-button.tsx

Refactor (1) +49 / -24
hospital-line.tsxExtract a reusable hospital-change control +49/-24

Extract a reusable hospital-change control

• Separates the chooser button and sheet from the named hospital line. Adds a quiet hero variant while preserving the line variant for other surfaces.

src/components/on-call/kit/hospital-line.tsx

Tests (7) +296 / -0
admin-today-page.dom.test.tsxVerify Admin’s band date +20/-0

Verify Admin’s band date

• Checks that the Admin page passes its formatted date and title to the mode band.

tests/admin-today-page.dom.test.tsx

clinical-chip-corners.dom.test.tsxCover Clinical and Work chip shapes +131/-0

Cover Clinical and Work chip shapes

• Checks the shared chip default, mode-specific prompt chips, Show all corners, and Medicines suggestion corners and tap targets.

tests/clinical-chip-corners.dom.test.tsx

my-day-favourites-shelf.dom.test.tsxGuard against split favourite names +11/-0

Guard against split favourite names

• Checks that favourite tile names retain two-line truncation without word-breaking classes.

tests/my-day-favourites-shelf.dom.test.tsx

on-call-now-hero.dom.test.tsxVerify hospital controls in the On Call hero +25/-0

Verify hospital controls in the On Call hero

• Checks that the hero names the hospital and can show its change action beside the switchboard link.

tests/on-call-now-hero.dom.test.tsx

on-call-now.dom.test.tsxCover On Call hospital-switcher placement +33/-0

Cover On Call hospital-switcher placement

• Checks that the hospital name appears once, the hero switcher opens the chooser, and single-hospital users see no switcher.

tests/on-call-now.dom.test.tsx

patient-safety-plan.dom.test.tsxCheck count styling and accessible names +17/-0

Check count styling and accessible names

• Verifies seven unboxed counts on a blank plan and their screen-reader entry or reason labels.

tests/patient-safety-plan.dom.test.tsx

work-search-coach.dom.test.tsxCover Work search note dismissal +59/-0

Cover Work search note dismissal

• Tests one-time storage, eight-second expiry, and dismissal on scroll or an outside tap.

tests/work-search-coach.dom.test.tsx

@qodo-code-review

qodo-code-review Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

No findings for this group


Remediation recommended

No findings for this group


Informational

No findings for this group

Grey Divider


Resolved findings

1. The "New" search note can vanish on any re-render ✓ Resolved
Description
The coach effect now calls markCoachSeen() as soon as the note shows. But seen comes from
useSyncExternalStore(subscribeNever, coachSeen, ...), which runs coachSeen() again on every
render, so the next render of WorkSearchButton gets seen === true and coach turns false. Any
parent header re-render, not just the 8 s timer or the first tap, key or scroll, can then hide the
note within moments. Because it is already stored as seen, the reader never gets it back on that
device.
Code

src/components/work-search/work-search-button.tsx[R106-107]

+    markCoachSeen();
+    const setAsideNow = () => setSetAside(true);
Relevance

●●● Strong

Immediate localStorage mutation can change the external-store snapshot on parent rerenders, hiding
the note prematurely.

PR-#3499

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
seen is read on each render from localStorage through useSyncExternalStore with a subscribe
function that never fires, and coach = !seen && .... The new effect writes the key as soon as the
note appears, so the value the next render reads has already changed to "seen". Only the separate
setAside state was meant to control hiding during this visit.

src/components/work-search/work-search-button.tsx[20-35]
src/components/work-search/work-search-button.tsx[90-121]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
WorkSearchButton writes the coach key to localStorage when the note appears. `seen` is read from localStorage on every render through useSyncExternalStore, so any re-render hides the note before the 8 s timeout.

## Fix Focus Areas
- src/components/work-search/work-search-button.tsx[90-121]

## Recommended Fix
Read the stored value once after hydration and keep it in component state (for example `const [seen, setSeen] = useState(true); useEffect(() => setSeen(coachSeen()), []);`), or keep the hydration-safe read but remember the first client value in a ref. Then `markCoachSeen()` in the effect only affects later visits, and only the timer, tap, key or scroll (`setAside`) hides the note now. Add a test that re-renders the button after the note appears and checks that it is still visible.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Desktop readers miss search guidance ✓ Resolved
Description
WorkSearchButton calls markCoachSeen() when the coach becomes active, even at phone widths where
the explanatory note is hidden and only the ring is visible. A reader who first opens Work on a
phone will not see the note if the same device later reaches desktop width, including during the
same visit.
Code

src/components/work-search/work-search-button.tsx[106]

+    markCoachSeen();
Relevance

●●● Strong

The persistent seen flag is consumed while the note is CSS-hidden on phones, preventing later
desktop guidance.

PR-#3355
PR-#2186

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The effect writes the persistent seen flag whenever the coach is active without checking viewport
width, while the note’s hidden ... lg:grid classes keep it invisible below the desktop breakpoint.
Subsequent renders use that flag to suppress the coach, so a phone visit can consume the note before
it is displayed.

src/components/work-search/work-search-button.tsx[99-111]
src/components/work-search/work-search-button.tsx[186-204]
src/components/work-search/work-search-button.tsx[20-34]
src/components/work-search/work-search-button.tsx[93-107]
src/components/work-search/work-search-button.tsx[185-192]
Skill: ux-review

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The coach is recorded as seen on narrow screens even though its explanatory note is hidden there, preventing it from appearing when the viewport later reaches desktop width.

## Fix Focus Areas
- src/components/work-search/work-search-button.tsx[99-121]
- src/components/work-search/work-search-button.tsx[185-215]

## Recommended Fix
Mark the coach seen when the explanatory note is actually displayed at desktop width, or when the reader explicitly opens or dismisses search. Keep the phone-only ring from consuming the one-time note, account for a viewport growing to desktop width during the visit, and add a responsive regression check.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Formulation prompts stay pill-shaped ✓ Resolved
Description
AnswerSuggestionChips defaults chipShape to "pill", and the Formulation page does not pass the
new control shape for its search presets. Those Clinical prompts therefore retain the global pill
radius while the other search prompt chips receive square-ish corners.
Code

src/components/clinical-dashboard/answer-suggestion-chips.tsx[118]

+  chipShape = "pill",
Relevance

●●● Strong

PR explicitly makes Clinical prompts square-ish; Formulation omits the required control shape.

PR-#3550

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The Formulation call omits chipShape; the component adds its square-corner override only for
"control", and its base CSS otherwise sets a 999px radius.

src/components/formulation/formulation-home-page.tsx[276-287]
src/components/clinical-dashboard/answer-suggestion-chips.tsx[108-118]
src/components/clinical-dashboard/answer-suggestion-chips.tsx[173-176]
src/app/globals.css[3579-3588]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The Formulation page's Clinical search preset chips still use the pill default instead of the new Clinical control shape.

## Fix Focus Areas
- src/components/formulation/formulation-home-page.tsx[276-287]
- src/components/clinical-dashboard/answer-suggestion-chips.tsx[173-176]

## Recommended Fix
Pass `chipShape="control"` to the Formulation page's `AnswerSuggestionChips` call, leaving answer-thread follow-ups on their existing default.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 9 rules
Review mode: Auto: ⏭️ Skipped: Generated repository snapshot metadata with no behavioral changes.

Grey Divider

Tip of the day
💡 Did you know, you can pick a display mode instead of tweaking every Display option by hand

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit f5be679

Results up to commit 0d8c36a 🧠 Deep


🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Action required

No findings for this group


Remediation recommended

No findings for this group


Informational

No findings for this group


Resolved findings

1. The "New" search note can vanish on any re-render ✓ Resolved
Description
The coach effect now calls markCoachSeen() as soon as the note shows. But seen comes from
useSyncExternalStore(subscribeNever, coachSeen, ...), which runs coachSeen() again on every
render, so the next render of WorkSearchButton gets seen === true and coach turns false. Any
parent header re-render, not just the 8 s timer or the first tap, key or scroll, can then hide the
note within moments. Because it is already stored as seen, the reader never gets it back on that
device.
Code

src/components/work-search/work-search-button.tsx[R106-107]

+    markCoachSeen();
+    const setAsideNow = () => setSetAside(true);
Relevance

●●● Strong

Immediate localStorage mutation can change the external-store snapshot on parent rerenders, hiding
the note prematurely.

PR-#3499

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
seen is read on each render from localStorage through useSyncExternalStore with a subscribe
function that never fires, and coach = !seen && .... The new effect writes the key as soon as the
note appears, so the value the next render reads has already changed to "seen". Only the separate
setAside state was meant to control hiding during this visit.

src/components/work-search/work-search-button.tsx[20-35]
src/components/work-search/work-search-button.tsx[90-121]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
WorkSearchButton writes the coach key to localStorage when the note appears. `seen` is read from localStorage on every render through useSyncExternalStore, so any re-render hides the note before the 8 s timeout.

## Fix Focus Areas
- src/components/work-search/work-search-button.tsx[90-121]

## Recommended Fix
Read the stored value once after hydration and keep it in component state (for example `const [seen, setSeen] = useState(true); useEffect(() => setSeen(coachSeen()), []);`), or keep the hydration-safe read but remember the first client value in a ref. Then `markCoachSeen()` in the effect only affects later visits, and only the timer, tap, key or scroll (`setAside`) hides the note now. Add a test that re-renders the button after the note appears and checks that it is still visible.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Desktop readers miss search guidance ✓ Resolved
Description
WorkSearchButton calls markCoachSeen() when the coach becomes active, even at phone widths where
the explanatory note is hidden and only the ring is visible. A reader who first opens Work on a
phone will not see the note if the same device later reaches desktop width, including during the
same visit.
Code

src/components/work-search/work-search-button.tsx[106]

+    markCoachSeen();
Relevance

●●● Strong

The persistent seen flag is consumed while the note is CSS-hidden on phones, preventing later
desktop guidance.

PR-#3355
PR-#2186

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The effect writes the persistent seen flag whenever the coach is active without checking viewport
width, while the note’s hidden ... lg:grid classes keep it invisible below the desktop breakpoint.
Subsequent renders use that flag to suppress the coach, so a phone visit can consume the note before
it is displayed.

src/components/work-search/work-search-button.tsx[99-111]
src/components/work-search/work-search-button.tsx[186-204]
src/components/work-search/work-search-button.tsx[20-34]
src/components/work-search/work-search-button.tsx[93-107]
src/components/work-search/work-search-button.tsx[185-192]
Skill: ux-review

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The coach is recorded as seen on narrow screens even though its explanatory note is hidden there, preventing it from appearing when the viewport later reaches desktop width.

## Fix Focus Areas
- src/components/work-search/work-search-button.tsx[99-121]
- src/components/work-search/work-search-button.tsx[185-215]

## Recommended Fix
Mark the coach seen when the explanatory note is actually displayed at desktop width, or when the reader explicitly opens or dismisses search. Keep the phone-only ring from consuming the one-time note, account for a viewport growing to desktop width during the visit, and add a responsive regression check.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Formulation prompts stay pill-shaped ✓ Resolved
Description
AnswerSuggestionChips defaults chipShape to "pill", and the Formulation page does not pass the
new control shape for its search presets. Those Clinical prompts therefore retain the global pill
radius while the other search prompt chips receive square-ish corners.
Code

src/components/clinical-dashboard/answer-suggestion-chips.tsx[118]

+  chipShape = "pill",
Relevance

●●● Strong

PR explicitly makes Clinical prompts square-ish; Formulation omits the required control shape.

PR-#3550

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The Formulation call omits chipShape; the component adds its square-corner override only for
"control", and its base CSS otherwise sets a 999px radius.

src/components/formulation/formulation-home-page.tsx[276-287]
src/components/clinical-dashboard/answer-suggestion-chips.tsx[108-118]
src/components/clinical-dashboard/answer-suggestion-chips.tsx[173-176]
src/app/globals.css[3579-3588]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The Formulation page's Clinical search preset chips still use the pill default instead of the new Clinical control shape.

## Fix Focus Areas
- src/components/formulation/formulation-home-page.tsx[276-287]
- src/components/clinical-dashboard/answer-suggestion-chips.tsx[173-176]

## Recommended Fix
Pass `chipShape="control"` to the Formulation page's `AnswerSuggestionChips` call, leaving answer-thread follow-ups on their existing default.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

- Preserve the search coach note for the current visit
- Only mark visible desktop search guidance as seen
@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo Fixer

✅ Committed (3) · ☑ Fixed (3)

Grey Divider

Commits pushed directly to this PR — no separate fix PR opened.

Process — 3 fixed
  • ☑ Fixed: The "New" search note can vanish on any re-render
  • ☑ Fixed: Desktop readers miss search guidance
  • ☑ Fixed: Formulation prompts stay pill-shaped

@BigSimmo
BigSimmo enabled auto-merge (squash) October 16, 2026 05:12
gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 16, 2026

@gitar-bot gitar-bot 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.

Gitar has auto-approved this PR (configure)

@cubic-dev-ai cubic-dev-ai 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.

2 issues found and verified against the latest diff

Confidence score: 4/5

  • my-day-today-cards.tsx still renders the legend at 12px because text-2xs and text-xs resolve to the same size. Use a genuinely larger type token if the labels are meant to grow.
  • roster-month-grid.tsx has the same issue: text-3xs and text-xs both resolve to 12px, so the month legend does not get larger. Use a genuinely larger type token if that is the intent.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/components/my-day/my-day-today-cards.tsx">

<violation number="1" location="src/components/my-day/my-day-today-cards.tsx:869">
P3: This class change does not increase the legend text size because both `text-2xs` and `text-xs` resolve to 12px here. Use a genuinely larger type token if this follow-up is meant to enlarge the labels.</violation>
</file>

<file name="src/components/roster/roster-month-grid.tsx">

<violation number="1" location="src/components/roster/roster-month-grid.tsx:140">
P3: This class change does not increase the month legend text size because both `text-3xs` and `text-xs` resolve to 12px here. Use a genuinely larger type token if the labels are intended to become larger.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Auto-fix isn't included in your plan ↗

Upgrade to Team

@codeant-ai

codeant-ai Bot commented Oct 16, 2026

Copy link
Copy Markdown

CodeAnt Nitpicks

3 code suggestions

1. In large-text mode, the shared stylesheet disables line clamping and exposes overflow. A long single-word name then spills across neighboring tiles because wrapping is disabled.

Css layout issue · src/components/favourites/favourites-shelf.tsx:57


2. markCoachSeen() runs while the note is CSS-hidden below lg, so a first visit on a phone consumes the one-time notice before the reader can see it on desktop.

Cache · src/components/work-search/work-search-button.tsx:106


3. readyHandbook defaults hospitals to [], so this tests zero hospital options, not one; a regression showing the button for exactly one hospital would pass.

Incomplete implementation · tests/on-call-now.dom.test.tsx:146

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d8c36a77c

ℹ️ 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".

@codeant-ai

codeant-ai Bot commented Oct 16, 2026

Copy link
Copy Markdown

CodeAnt PR Risk: Low Risk

  • The PR appears safe to merge; most changes refine visual consistency across existing pages and controls.
  • The hospital chooser remains limited to readers with multiple hospitals, and the updated tests cover its new placement in the hero.
  • The search note now dismisses on scroll, outside interaction, or timeout, with tests covering those behaviors.

Assessed commit: d08426b55534

…wed; square Formulation prompt chips

Storing the note as read the moment it appeared hid it at the next re-render, because
the stored value is read on every render. It is now stored when it goes (timer, tap,
key or scroll), and only at desktop width, where the note is on screen, so a phone
visit that shows only the ring does not use it up. Formulation's "Try another
pattern" chips take the Clinical control corners like the other Clinical prompts.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TexgR3MMbRJjXTT2C5PoPw
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TexgR3MMbRJjXTT2C5PoPw

Copy link
Copy Markdown
Owner Author

Qodo findings handled in f6d298e:

  1. Note hidden on re-render: fixed. The note is now stored as read when it goes (timer, tap, key or scroll), not when it appears. That way the per-render storage read no longer hides it early. A re-render test was added.
  2. A phone uses up the note: fixed. It is stored as read only at desktop width (64rem), where the note is actually on screen. A phone test was added.
  3. Formulation chips stayed pills: fixed with chipShape="control".

Qodo also pushed its own fix for these (9d4da4a, d08426b). It was merged in, but the work search button keeps the version above. Qodo's version set state inside an effect and called matchMedia without a guard, and it also wrote the read flag as the note appeared.


Generated by Claude Code

gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 16, 2026

@gitar-bot gitar-bot 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.

Gitar has auto-approved this PR (configure)

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo findings handled in f6d298e:

  1. Note hidden on re-render: fixed. The note is now stored as read when it goes (timer, tap, key or scroll), not when it appears. That way the per-render storage read no longer hides it early. A re-render test was added.
  2. A phone uses up the note: fixed. It is stored as read only at desktop width (64rem), where the note is actually on screen. A phone test was added.
  3. Formulation chips stayed pills: fixed with chipShape="control".

Qodo also pushed its own fix for these (9d4da4a, d08426b). It was merged in, but the work search button keeps the version above. Qodo's version set state inside an effect and called matchMedia without a guard, and it also wrote the read flag as the note appeared.


Generated by Claude Code

Thanks for the update. The current review shows all three findings as resolved:

  • finding 1 — re-render no longer hides the note prematurely.
  • finding 2 — phone visits no longer consume the desktop guidance.
  • finding 3 — Formulation chips now use the Clinical control shape.

The changes in f6d298e11 address the reported issues, and the retained Work Search implementation avoids the concerns noted with the alternative fix.

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit f6d298e

… as the owner's decision, real one-hospital test

- Favourites: at large text the two-line clamp lifts, so a long single word may break
  there rather than spill past its tile.
- Admin: the page comment still said the owner had dropped the date line. The owner
  brought it back on 16 Oct 2026 after seeing the picture; comment updated and the
  decision indexed in docs/decisions.
- On Call: the "only one hospital" test now gives the reader exactly one hospital,
  not none.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TexgR3MMbRJjXTT2C5PoPw
gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 16, 2026

@gitar-bot gitar-bot 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.

Gitar has auto-approved this PR (configure)

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 09d6244

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TexgR3MMbRJjXTT2C5PoPw

@gitar-bot gitar-bot 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.

Gitar has auto-approved this PR (configure)

@gitar-bot

gitar-bot Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor
Code Review ✅ Approved

🟡 Medium risk · The search coach now disappears and persists after interaction, so users could miss its guidance; hospital selection also moves into the hero.

Design follow-up PR that moves the On Call hospital change action into the hero, squares Clinical chip corners, raises small hero and legend labels to 12 px at full contrast, and adds the Admin date line. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Approved

For more verification details, comment gitar display:verbose.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Important

Your trial ends in 5 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit f5be679

@BigSimmo
BigSimmo merged commit ce25490 into main Oct 16, 2026
35 checks passed
@BigSimmo
BigSimmo deleted the claude/unified-design-system-6zlw0d branch October 16, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔴 Large blast radius size:L This PR changes 100-499 lines, ignoring generated files 🕐 40+ Minutes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants