Skip to content

On Call overhaul: four clear jobs, Refer inside Contacts, no link list on Now - #3480

Merged
gitar-bot[bot] merged 6 commits into
mainfrom
claude/work-mode-simplify-plan-0hr9zi
Oct 12, 2026
Merged

gitar-bot[bot] merged 6 commits into
mainfrom
claude/work-mode-simplify-plan-0hr9zi

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

User description

Requested by Josh · project thread

Summary

Before: On Call spread one job over eleven pages. The tabs were Now, People and Refer, and More held 12 entries. Refer was a near-empty page of its own. Now ended with "More for this shift", a seven-link list (My shifts, Pocket card, Calendar, Shift lists, Systems down, First night, On site), most of which belonged to other areas. Your usual showed a round phone icon and a label but no number. The Handbook still showed all three crisis lines in full when signed out. Handover and Check these dropped the band and showed their title twice. Check these drew a separate card for every entry, each with a greyed-out button in demo mode. The page-actions button on Playbook was labelled "More", which sat right under the band's More tab.

After: four jobs. Now is the shift. Contacts (was People) covers who and where, with a new Refer tab beside Hospital, Outside and Mine, so one search covers numbers and referrals. Playbook is what to do. The Handbook (first in More, so it joins the tab row when there is room) is how the hospital works, and now also holds Who's who and the Pocket card. More is down to seven: Handbook, Starting here, Handover, Who's on, Help, Check these and Manage service (editors only). Now has no link list. The shift lists sit in one card with Log a call and Handover, and each usual number is printed under its name. The Handbook folds the crisis lines to 000 plus "More crisis lines", like every other page. Handover and Check these get the normal band and one Back. Check these is one compact list. The page-actions button reads "Options".

Old addresses still work. /on-call/refer opens Contacts on its Refer tab in the current work mode, and the classic work mode keeps its own Refer page.

How: navigation and layout only. Refer's lists became OnCallReferSections, which both the old Refer page and the Contacts tab render. NowFooter is now unused but kept under the 30-day dead-code rule.

Areas touched: Personal practice, App experience, Knowledge and records

Verification

  • Focused unit tests over every tests/on-call*, tests/work-frame*, route, work-search, navigation and sitemap suite: Tests 2890 passed (2890). tsc --noEmit clean, eslint clean on changed files, prettier clean.
  • Browser: the three On Call specs are running locally against the demo hospital; result to follow in a comment. The full suite is left to CI.
  • Screenshots (390 px phone and 1440 px computer, demo hospital, before and after) are shared with Josh in the project thread.

Risk and rollout

  • Risk: On Call is safety-adjacent. No phone number, crisis line, escalation step, caveat or source wording changed. The emergency route, Right now and the crisis lines keep their safety order on Now. The one change in what shows is the Handbook's signed-out crisis block, which now folds to 000 plus "More crisis lines", the same as Contacts, Who's on and Starting here.
  • Rollback: revert this PR.
  • Provider or production effects: None

Notes

  • This is stream 1 of Josh's approved Work mode simplify plan (12 Oct 2026). My Day, Roster, Teaching, CPD, Admin and Open shifts are separate threads and PRs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TKaduMkUZJSfvFH9L1yWuz


Generated by Claude Code


Summary by cubic

Restructures On Call into four clear jobs: Now shows the shift, Contacts (was People) covers who and where, Playbook is what to do, and the Handbook is how the hospital works. Refer moves inside Contacts as a Refer tab, so one search covers numbers and referrals. The old /on-call/refer address redirects to that tab in the new work mode and keeps its own page, with the original People tabs, for classic readers. Work search lists Refer on its own, so searching "referral" opens the routes rather than Hospital. The Refer tab keeps the public crisis lines, and a search that matches only a referral counts as a result. A search on Refer covers every team, so the count matches Contacts, while the team filter applies only to browsing.

Now drops the seven-link "More for this shift" list, keeps the shift lists with Log a call and Handover in one card, and prints each usual number under its name. The Handbook now holds Who's who and the Pocket card, and folds its signed-out crisis lines to 000 plus "More crisis lines". Handover and Check these get the normal band and one Back, Check these becomes a single compact list, the who-to-call situations become one grouped list of rows instead of chips, and the page-actions button is renamed "Options". No phone number, crisis line, escalation step, caveat, or source wording changed.

  • Navigation and layout only; Refer's lists became OnCallReferSections, rendered by both the old Refer page and the Contacts tab.
  • The chosen Contacts tab is written to and read from ?show=, so refresh reopens the same tab and the redirect lands on it.
  • NowFooter is unused but kept under the 30-day dead-code rule.
  • Rollback: revert this PR.

Written for commit 96bb948. Summary will update on new commits.

View guided diff Turn on auto-fix


CodeAnt-AI Description

Organize On Call around Now, Contacts, Playbook and the Handbook

What Changed

  • Now, Contacts and Playbook are the main tabs; the Handbook leads the More menu and now contains Who's who and the Pocket card.
  • Contacts adds a Refer tab, bringing numbers and referral information together under one search. The old Refer address opens that tab.
  • Now drops its extra link list. Log a call, Handover and shift lists share one card, while other links stay with the pages they belong to.
  • Usual call numbers appear beneath their names, and Numbers to check uses a compact grouped list without disabled confirmation buttons in demo mode.

Impact

✅ One search for numbers and referrals
✅ Usual call numbers visible at a glance
✅ Fewer links on the shift overview

💡 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.

Tabs are Now, Contacts and Playbook, with the Handbook first in More.
Contacts gains a Refer tab (the old Refer address lands there in the
current work mode). Now drops the seven-link footer, keeps the shift
lists inside the shift tools card, and shows each usual number. The
Handbook holds Who's who and the Pocket card and folds its crisis
lines like every other page. Handover and Check these get the normal
band, and Check these becomes a compact list. No number, crisis line,
step or caveat wording changed.

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

supabase Bot commented Oct 12, 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 self-assigned this Oct 12, 2026
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 83729134-f6e7-4f43-a3dc-40ac6e1127d7

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codeant-ai

codeant-ai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: 96bb948d
Scan Time: 2026-10-12 08:40:22 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 No IAC issues

View Full Results

@codspeed

codspeed Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 29.47%

⚠️ 1 benchmark spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

ℹ️ 1 benchmark has no flame graph

The flamegraph could not be generated because too much time was spent in runtime internals, making the visualization not useful for performance analysis.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 7 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ answer-ranking: rankAnswerEvidence 40 results 32.1 ms 24.8 ms +29.47%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing claude/work-mode-simplify-plan-0hr9zi (96bb948) with main (c92fb84)

Open in CodSpeed

gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 12, 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)

Chips stacked unevenly at 320px; one row per situation reads cleaner.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKaduMkUZJSfvFH9L1yWuz
@BigSimmo
BigSimmo marked this pull request as ready for review October 12, 2026 08:08
@gitar-bot
gitar-bot Bot enabled auto-merge (squash) October 12, 2026 08:08

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

gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 12, 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)

@codeant-ai

codeant-ai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR de4afa8 Oct 12, 2026 · 08:08 08:14

@codeant-ai

codeant-ai Bot commented Oct 12, 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 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-12T08:20:31.482834Z de4afa8 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.

@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude encountered an error after 2s —— View job


I'll analyze this and get back to you.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKaduMkUZJSfvFH9L1yWuz
@codeant-ai codeant-ai Bot added the size:L This PR changes 100-499 lines, ignoring generated files label Oct 12, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Simplify On Call navigation and move Refer into Contacts

✨ Enhancement 🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Organizes On Call around Now, Contacts, Playbook, and Handbook, with fewer More entries.
• Moves referrals into Contacts while preserving the classic Refer page and its old address.
• Removes Now’s link list, consolidates shift tools, and makes supporting pages easier to scan.
Diagram

graph TD
  Frame["On Call navigation"] --> Now["Now"]
  Frame --> Contacts["Contacts"] --> Sections["Referral sections"]
  Frame --> Playbook["Playbook"]
  Frame --> Handbook["Handbook"]
  ReferURL["Old Refer URL"] -->|current mode| Contacts
  ReferURL -->|classic mode| Classic["Classic Refer page"] --> Sections
Loading
High-Level Assessment

Keep the shared referral sections and mode-dependent route: they consolidate search in the current mode without duplicating referral lists or removing the classic rollback path. Retaining two separate referral implementations would make those lists harder to keep consistent.

Files changed (25) +349 / -257

Enhancement (9) +206 / -155
page.tsxRoute Refer according to work mode +7/-1

Route Refer according to work mode

• Redirects current-mode visitors to Contacts with Refer selected while retaining the standalone page for classic mode.

src/app/(search-app)/on-call/refer/page.tsx

call-page.tsxAdd referrals to Contacts +21/-19

Add referrals to Contacts

• Adds a Refer tab and renders shared referral lists under the existing search. Shortens tab labels and removes reference links relocated to the Handbook.

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

find-page.tsxMake the Handbook the home for reference links +35/-4

Make the Handbook the home for reference links

• Adds Who's who and Pocket card links and uses the compact crisis-line presentation when hospital details are unavailable.

src/components/on-call/find/find-page.tsx

shift-shortcuts.tsxLet shift shortcuts contain the shift lists +44/-38

Let shift shortcuts contain the shift lists

• Wraps Log a call and Handover in a shared tools card with a slot for the shift-list row.

src/components/on-call/now/shift-shortcuts.tsx

systems-down.tsxPresent call situations as rows +14/-13

Present call situations as rows

• Replaces unevenly wrapping situation chips with a grouped list. Leaves the now-unused footer implementation in place under the dead-code rule.

src/components/on-call/now/systems-down.tsx

your-usual.tsxShow usual numbers at a glance +7/-0

Show usual numbers at a glance

• Prints the applicable dialling number beneath each eligible usual contact’s name.

src/components/on-call/now/your-usual.tsx

on-call-check-page.tsxCompact the Check these queue +35/-25

Compact the Check these queue

• Groups due entries into list cards with edit links and confirmation actions. Omits disabled confirmation buttons in demo mode.

src/components/on-call/on-call-check-page.tsx

on-call-home.tsxRemove Now’s link footer +9/-4

Remove Now’s link footer

• Moves shift lists into the shift tools card and stops rendering the seven-link footer.

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

areas.tsReorganize On Call work navigation +34/-51

Reorganize On Call work navigation

• Defines Now, Contacts, and Playbook as tabs; puts Handbook first in More; and regroups the remaining destinations. Associates related URLs with their owning navigation entries and restores band navigation for Handover and Check these.

src/lib/work-frame/areas.ts

Bug fix (2) +8 / -2
handover-page.tsxAvoid a duplicate Handover title +6/-1

Avoid a duplicate Handover title

• Keeps the page heading available to screen readers without displaying it twice beneath the work-mode band.

src/components/on-call/handover/handover-page.tsx

on-call-page-menu.tsxDistinguish page actions from More +2/-1

Distinguish page actions from More

• Renames the in-page action trigger to Options so it does not repeat the work band’s More label.

src/components/on-call/on-call-page-menu.tsx

Refactor (1) +44 / -26
refer-page.tsxExtract reusable referral sections +44/-26

Extract reusable referral sections

• Separates referral lists from the standalone page frame and search field so Contacts and classic Refer can render the same content.

src/components/on-call/refer/refer-page.tsx

Tests (11) +85 / -70
on-call-call-page.dom.test.tsxCover the Contacts referral tab +20/-8

Cover the Contacts referral tab

• Tests referral content within Contacts and updates assertions for renamed tabs, search text, and relocated reference links.

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

on-call-home.dom.test.tsxAssert Now has no link footer +15/-15

Assert Now has no link footer

• Updates layout and link expectations to place shift tools after usual contacts and remove footer destinations from Now.

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

on-call-hub-routes.dom.test.tsxKeep classic Refer in hub-page tests +5/-1

Keep classic Refer in hub-page tests

• Renders the retained Refer component directly now that its route can redirect by work mode.

tests/on-call-hub-routes.dom.test.tsx

on-call-mockup-conformance.test.tsUpdate Now conformance markers +3/-4

Update Now conformance markers

• Replaces obsolete footer test IDs with the consolidated shift tools marker.

tests/on-call-mockup-conformance.test.ts

on-call-now.dom.test.tsxCheck Now’s revised safety order +14/-17

Check Now’s revised safety order

• Asserts the shift tools and lists replace the footer while preserving the page’s ordering.

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

on-call-page-menu.dom.test.tsxExpect the Options trigger +3/-2

Expect the Options trigger

• Updates the page-menu label assertion to distinguish it from the work band’s More tab.

tests/on-call-page-menu.dom.test.tsx

on-call-shift-shortcuts.dom.test.tsxTest the enclosing shift tools card +3/-1

Test the enclosing shift tools card

• Checks that Log a call and Handover sit inside the new shared card.

tests/on-call-shift-shortcuts.dom.test.tsx

ui-on-call-boards.spec.tsAlign board checks with the new Now layout +11/-15

Align board checks with the new Now layout

• Updates browser assertions for the missing footer, shift tools, and Options label, including narrow-width coverage.

tests/ui-on-call-boards.spec.ts

ui-on-call-call.spec.tsExercise the old Refer address in current mode +6/-3

Exercise the old Refer address in current mode

• Checks that the address opens Contacts with Refer selected and that referral detail still opens.

tests/ui-on-call-call.spec.ts

ui-on-call-now.spec.tsCheck shift tools in Now’s browser layout +1/-1

Check shift tools in Now’s browser layout

• Uses the shift tools card in place of the removed footer for vertical-order assertions.

tests/ui-on-call-now.spec.ts

work-frame-navigation.test.tsAssert removal of the On Call Admin-numbers link +4/-3

Assert removal of the On Call Admin-numbers link

• Updates navigation expectations so only Admin exposes its Numbers entry through that destination.

tests/work-frame-navigation.test.ts

Documentation (2) +6 / -4
mockup-conformance.mdRecord approved Now-page deviations +5/-4

Record approved Now-page deviations

• Marks the removed footer links as design deviations and records the consolidated shift tools card.

docs/on-call/design/mockup-conformance.md

site-map.mdDocument the Refer redirect +1/-0

Document the Refer redirect

• Adds the current-mode destination of the old Refer address to the generated site map.

docs/site-map.md

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo Fixer

No findings are available for this PR yet. Findings appear here once Qodo has reviewed the PR.

gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 12, 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

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

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (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. Referral search opens the wrong tab ✗ Dismissed
Description
call:call owns the referral search keywords, but work search links those results to
/on-call/call without ?show=refer. When a reader opens a result for “refer” or “referral,”
peopleTabFor(null) selects Hospital, requiring another tab selection to reach Refer.
Code

src/lib/work-search/pages.ts[116]

+  "call:call": ["phone", "numbers", "switchboard", "pager", "contacts", "ring", "referral", "referrals", "refer"],
Relevance

●●● Strong

PR #3459 explicitly accepted preserving tab-specific destinations for search keywords.

PR-#3459

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Work search attaches referral keywords to the Contacts page and renders its configured href without
a tab parameter. Contacts selects Hospital when show is absent, whereas the old Refer route
explicitly redirects to ?show=refer; this shows why the result does not reach the requested tab. A
past merged fix addressed the same search-result-versus-tab mismatch for privacy queries.

src/lib/work-search/pages.ts[115-117]
src/lib/work-frame/areas.ts[1167-1172]
src/components/on-call/call/call-page.tsx[96-99]
src/lib/work-search/pages.ts[157-172]
src/components/work-search/work-search-sheet.tsx[700-712]
src/lib/work-frame/areas.ts[1163-1171]
src/components/on-call/call/call-page.tsx[90-99]
src/app/(search-app)/on-call/refer/page.tsx[12-17]
PR-#3459
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
Referral work-search results open Contacts on Hospital instead of the matching Refer tab.

## Fix Focus Areas
- src/lib/work-search/pages.ts[115-117]
- src/components/work-search/work-search-sheet.tsx[700-712]
- src/components/on-call/call/call-page.tsx[90-99]

## Recommended Fix
Link referral-keyword work-search results to `/on-call/call?show=refer` while retaining the ordinary Contacts address for number and contact searches. Add a focused search-result navigation test.

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


2. Contacts counts hidden referral routes ✓ Resolved
Description
onCallReferralMatchCount searches routes across all teams, while OnCallReferSections searches
only routes in the selected team. When a reader selects a team and searches for a route in another
team, Contacts announces a match and suppresses “Nothing matches” even though no matching route is
displayed.
Code

src/components/on-call/refer/refer-page.tsx[R54-57]

+  const routes = searchHandbookItems(
+    items.filter((item) => item.section === "referrals"),
+    query,
+  ).length;
Relevance

●●● Strong

Accepted precedent flags mismatches between rendered search results and announced result counts.

PR-#3156

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The counting helper searches every referral item, but the rendered shown list searches byTeam,
which depends on the selected team. Contacts uses the helper’s count for both its search status and
empty-results condition, so those indicators can disagree with the visible routes.

src/components/on-call/refer/refer-page.tsx[54-57]
src/components/on-call/refer/refer-page.tsx[143-158]
src/components/on-call/call/call-page.tsx[378-385]
src/components/on-call/refer/refer-page.tsx[54-63]
src/components/on-call/refer/refer-page.tsx[140-151]
src/components/on-call/refer/refer-page.tsx[184-202]
src/components/on-call/call/call-page.tsx[462-468]
src/components/on-call/call/call-page.tsx[502-507]
Skill: code-quality-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
Contacts counts referral routes excluded by the selected team filter, making its search status and empty-results condition disagree with the visible rows.

## Fix Focus Areas
- src/components/on-call/refer/refer-page.tsx[42-65]
- src/components/on-call/refer/refer-page.tsx[140-158]
- src/components/on-call/call/call-page.tsx[378-385]

## Recommended Fix
Make the Contacts referral count use the same selected-team filter and matching rules as the rendered routes by sharing the filtered results or lifting the team selection. Ensure the count updates when the selection changes, and test a search after selecting one of two referral teams.

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


3. Referral matches show as no results ✗ Dismissed
Description
OnCallCallPage renders referral matches from OnCallReferSections, but resultCount counts only
numbers and contacts and is also used for the search announcement and no-match message. When a query
matches a referral but no number, Contacts shows the referral beneath “No numbers match” and
announces zero results.
Code

src/components/on-call/call/call-page.tsx[474]

+            {`No numbers match "${query.trim()}".`}
Relevance

●●● Strong

A close On Call precedent accepted including independently rendered entries in filtering and result
counts.

PR-#3156

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The parent page uses a count that excludes referrals for its no-match condition and result
announcement, while the embedded OnCallReferSections independently filters and displays referrals
for the same query. Together, these show why a referral-only match can appear alongside an
empty-search message and a zero-results announcement.

src/components/on-call/call/call-page.tsx[385-385]
src/components/on-call/call/call-page.tsx[433-436]
src/components/on-call/call/call-page.tsx[471-474]
src/components/on-call/call/call-page.tsx[567-567]
src/components/on-call/call/call-page.tsx[355-357]
src/components/on-call/call/call-page.tsx[472-475]
src/components/on-call/call/call-page.tsx[566-567]
src/components/on-call/refer/refer-page.tsx[111-137]
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
Contacts reports an empty search when a query matches a referral but no number, even though the referral is displayed.

## Fix Focus Areas
- src/components/on-call/call/call-page.tsx[355-357]
- src/components/on-call/call/call-page.tsx[380-395]
- src/components/on-call/call/call-page.tsx[471-475]
- src/components/on-call/refer/refer-page.tsx[111-137]

## Recommended Fix
Share the referral match count with Contacts and include it in the overall result count used by the screen-reader announcement. Show the no-match message only when neither numbers nor referrals match, and make its wording cover both.

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


View resolved (4)
4. On-call role searches miss the handbook ✗ Dismissed
Description
Removing the standalone Who’s who and Pocket card navigation items leaves their call:whoswho and
call:card search keywords attached to IDs that workSearchPages() no longer emits. Searches for
“roles,” “teams,” or “print” therefore stop returning those on-call destinations, although both
pages remain linked from the Handbook.
Code

src/lib/work-frame/areas.ts[R1185-1186]

+          // Who's who and the Pocket card are reached from the Handbook's own page.
+          paths: ["/on-call/find", "/on-call/who-is-who", "/on-call/card"],
Relevance

●●● Strong

Recent On Call precedent accepted moving keywords from removed navigation items onto surviving
destinations.

PR-#3467

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Work search builds records from current navigation items and looks up keywords by area and item ID.
The surviving Handbook item has neither the former Who’s who nor Pocket card keywords.

src/lib/work-frame/areas.ts[1180-1186]
src/lib/work-search/pages.ts[107-116]
src/lib/work-search/pages.ts[132-177]
src/lib/work-search/pages.ts[194-218]

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

## Issue description
Moving Who’s who and Pocket card under Handbook disconnects their on-call search synonyms.
## Fix Focus Areas
- src/lib/work-frame/areas.ts[1180-1186]
- src/lib/work-search/pages.ts[107-116]
## Recommended Fix
Add the removed entries’ relevant keywords, including roles, teams, and print, to the surviving `call:find` search record. Remove or update the orphaned keyword entries and test those searches.

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


5. Crisis lines vanish on an empty Refer tab ✗ Dismissed
Description
showCrisis does not account for the new Refer tab and suppresses the lines whenever the loaded
handbook has hospital contacts, even though that tab does not render those contacts. If the hospital
has contacts but no referral routes, Refer shows only the directory and personal-note sections
without the public crisis lines.
Code

src/components/on-call/call/call-page.tsx[R81-82]

+  { value: "refer", label: "Refer" },
+  { value: "outside", label: "Outside" },
Relevance

●●● Strong

Accepted On Call precedents fix visibility conditions when newly rendered sections are omitted from
existing guards.

PR-#3453
PR-#3156

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new tab displays referral sections instead of the hospital contact list, but the crisis-line
condition still treats the existence of hospital contacts as sufficient to hide the lines.

src/components/on-call/call/call-page.tsx[363-367]
src/components/on-call/call/call-page.tsx[480-490]
src/components/on-call/call/call-page.tsx[566-567]
src/components/on-call/refer/refer-page.tsx[140-143]

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 Refer tab can hide public crisis lines despite showing no hospital numbers.
## Fix Focus Areas
- src/components/on-call/call/call-page.tsx[363-367]
- src/components/on-call/call/call-page.tsx[566-567]
## Recommended Fix
Base crisis-line visibility on whether hospital or outside numbers are actually displayed, including the Refer tab, rather than on whether hospital contacts exist in the loaded handbook.

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


6. Contacts reopens the wrong tab ✗ Dismissed
Description
OnCallCallPage reads show into local tab state only on mount, then changes tabs without updating
the URL. After opening ?show=refer and selecting Hospital, a refresh selects Refer again; a
query-string change while the component remains mounted also leaves the selected tab unchanged.
Code

src/components/on-call/call/call-page.tsx[R279-281]

+  // Read after hydration, so the server and the first client render agree.
+  // eslint-disable-next-line react-hooks/set-state-in-effect
+  useEffect(() => setTab(initialPeopleTab()), []);
Relevance

●●● Strong

Recent tab-navigation precedent accepts synchronizing URL-driven tabs with mounted component state
and subsequent URL changes.

PR-#3462

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The frontend architecture skill explicitly advises against duplicating URL/router state in local
React state. The new show parameter is read once, whereas tab selection changes only React state.

src/components/on-call/call/call-page.tsx[86-91]
src/components/on-call/call/call-page.tsx[277-281]
src/components/on-call/call/call-page.tsx[438-444]
Skill: frontend-architecture-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
Contacts keeps the requested tab in local state without keeping it synchronized with the `show` query parameter.
## Fix Focus Areas
- src/components/on-call/call/call-page.tsx[86-91]
- src/components/on-call/call/call-page.tsx[277-281]
- src/components/on-call/call/call-page.tsx[438-444]
## Recommended Fix
Derive the selected tab from router search parameters and update the query parameter when a user selects a tab. Cover refresh and same-route query-string navigation in a focused test.

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


7. The shift tools keep a namespace type ✓ Resolved
Description
NowShiftShortcuts declares its children prop as React.ReactNode instead of importing and using
ReactNode directly. The new TSX prop annotation is the changed usage governed by the explicit
type-import convention, so future readers must rely on the React namespace for a type-only
reference.
Code

src/components/on-call/now/shift-shortcuts.tsx[36]

+export function NowShiftShortcuts({ children }: { readonly children?: React.ReactNode } = {}) {
Relevance

●●● Strong

Exact precedent accepted replacing React namespace types with explicit ReactNode imports in TSX.

PR-#2312

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Compliance ID 3891512 requires explicit imports for React types used in TSX files. The PR adds
React.ReactNode in the new NowShiftShortcuts prop annotation without an explicit ReactNode
type import.

Rule 3891512: Prefer explicit type imports over React namespace types in TSX
src/components/on-call/now/shift-shortcuts.tsx[36-36]

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 new `children` prop uses the React namespace type `React.ReactNode` instead of an explicit type import.

## Fix Focus Areas
- src/components/on-call/now/shift-shortcuts.tsx[36-36]

## Recommended Fix
Add `import type { ReactNode } from "react"` and change the prop annotation from `React.ReactNode` to `ReactNode`.

ⓘ 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
✅ Skills: 7 invoked
  frontend-architecture-review
  testing-review
  accessibility-review
  ux-review
  code-quality-review
  review
  ui
✅ Cross-repo context — repo relationships
✅ REVIEW.md
Review mode: Auto: ⚖️ Balanced: Mode-dependent navigation and search behavior carry localized real risk.

Grey Divider

Tip of the day
💡 Did you know, you can commit Qodo's fix in one click with committable suggestions (GitHub & GitLab)

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit 96bb948 ⚖️ Balanced

Results up to commit e3aa917 ⚖️ Balanced


🐞 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. Referral matches show as no results ✗ Dismissed
Description
OnCallCallPage renders referral matches from OnCallReferSections, but resultCount counts only
numbers and contacts and is also used for the search announcement and no-match message. When a query
matches a referral but no number, Contacts shows the referral beneath “No numbers match” and
announces zero results.
Code

src/components/on-call/call/call-page.tsx[474]

+            {`No numbers match "${query.trim()}".`}
Relevance

●●● Strong

A close On Call precedent accepted including independently rendered entries in filtering and result
counts.

PR-#3156

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The parent page uses a count that excludes referrals for its no-match condition and result
announcement, while the embedded OnCallReferSections independently filters and displays referrals
for the same query. Together, these show why a referral-only match can appear alongside an
empty-search message and a zero-results announcement.

src/components/on-call/call/call-page.tsx[385-385]
src/components/on-call/call/call-page.tsx[433-436]
src/components/on-call/call/call-page.tsx[471-474]
src/components/on-call/call/call-page.tsx[567-567]
src/components/on-call/call/call-page.tsx[355-357]
src/components/on-call/call/call-page.tsx[472-475]
src/components/on-call/call/call-page.tsx[566-567]
src/components/on-call/refer/refer-page.tsx[111-137]
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
Contacts reports an empty search when a query matches a referral but no number, even though the referral is displayed.

## Fix Focus Areas
- src/components/on-call/call/call-page.tsx[355-357]
- src/components/on-call/call/call-page.tsx[380-395]
- src/components/on-call/call/call-page.tsx[471-475]
- src/components/on-call/refer/refer-page.tsx[111-137]

## Recommended Fix
Share the referral match count with Contacts and include it in the overall result count used by the screen-reader announcement. Show the no-match message only when neither numbers nor referrals match, and make its wording cover both.

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


2. On-call role searches miss the handbook ✗ Dismissed
Description
Removing the standalone Who’s who and Pocket card navigation items leaves their call:whoswho and
call:card search keywords attached to IDs that workSearchPages() no longer emits. Searches for
“roles,” “teams,” or “print” therefore stop returning those on-call destinations, although both
pages remain linked from the Handbook.
Code

src/lib/work-frame/areas.ts[R1185-1186]

+          // Who's who and the Pocket card are reached from the Handbook's own page.
+          paths: ["/on-call/find", "/on-call/who-is-who", "/on-call/card"],
Relevance

●●● Strong

Recent On Call precedent accepted moving keywords from removed navigation items onto surviving
destinations.

PR-#3467

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Work search builds records from current navigation items and looks up keywords by area and item ID.
The surviving Handbook item has neither the former Who’s who nor Pocket card keywords.

src/lib/work-frame/areas.ts[1180-1186]
src/lib/work-search/pages.ts[107-116]
src/lib/work-search/pages.ts[132-177]
src/lib/work-search/pages.ts[194-218]

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

## Issue description
Moving Who’s who and Pocket card under Handbook disconnects their on-call search synonyms.
## Fix Focus Areas
- src/lib/work-frame/areas.ts[1180-1186]
- src/lib/work-search/pages.ts[107-116]
## Recommended Fix
Add the removed entries’ relevant keywords, including roles, teams, and print, to the surviving `call:find` search record. Remove or update the orphaned keyword entries and test those searches.

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


3. Crisis lines vanish on an empty Refer tab ✗ Dismissed
Description
showCrisis does not account for the new Refer tab and suppresses the lines whenever the loaded
handbook has hospital contacts, even though that tab does not render those contacts. If the hospital
has contacts but no referral routes, Refer shows only the directory and personal-note sections
without the public crisis lines.
Code

src/components/on-call/call/call-page.tsx[R81-82]

+  { value: "refer", label: "Refer" },
+  { value: "outside", label: "Outside" },
Relevance

●●● Strong

Accepted On Call precedents fix visibility conditions when newly rendered sections are omitted from
existing guards.

PR-#3453
PR-#3156

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new tab displays referral sections instead of the hospital contact list, but the crisis-line
condition still treats the existence of hospital contacts as sufficient to hide the lines.

src/components/on-call/call/call-page.tsx[363-367]
src/components/on-call/call/call-page.tsx[480-490]
src/components/on-call/call/call-page.tsx[566-567]
src/components/on-call/refer/refer-page.tsx[140-143]

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 Refer tab can hide public crisis lines despite showing no hospital numbers.
## Fix Focus Areas
- src/components/on-call/call/call-page.tsx[363-367]
- src/components/on-call/call/call-page.tsx[566-567]
## Recommended Fix
Base crisis-line visibility on whether hospital or outside numbers are actually displayed, including the Refer tab, rather than on whether hospital contacts exist in the loaded handbook.

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


View resolved (2)
4. Contacts reopens the wrong tab ✗ Dismissed
Description
OnCallCallPage reads show into local tab state only on mount, then changes tabs without updating
the URL. After opening ?show=refer and selecting Hospital, a refresh selects Refer again; a
query-string change while the component remains mounted also leaves the selected tab unchanged.
Code

src/components/on-call/call/call-page.tsx[R279-281]

+  // Read after hydration, so the server and the first client render agree.
+  // eslint-disable-next-line react-hooks/set-state-in-effect
+  useEffect(() => setTab(initialPeopleTab()), []);
Relevance

●●● Strong

Recent tab-navigation precedent accepts synchronizing URL-driven tabs with mounted component state
and subsequent URL changes.

PR-#3462

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The frontend architecture skill explicitly advises against duplicating URL/router state in local
React state. The new show parameter is read once, whereas tab selection changes only React state.

src/components/on-call/call/call-page.tsx[86-91]
src/components/on-call/call/call-page.tsx[277-281]
src/components/on-call/call/call-page.tsx[438-444]
Skill: frontend-architecture-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
Contacts keeps the requested tab in local state without keeping it synchronized with the `show` query parameter.
## Fix Focus Areas
- src/components/on-call/call/call-page.tsx[86-91]
- src/components/on-call/call/call-page.tsx[277-281]
- src/components/on-call/call/call-page.tsx[438-444]
## Recommended Fix
Derive the selected tab from router search parameters and update the query parameter when a user selects a tab. Cover refresh and same-route query-string navigation in a focused test.

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


5. The shift tools keep a namespace type ✓ Resolved
Description
NowShiftShortcuts declares its children prop as React.ReactNode instead of importing and using
ReactNode directly. The new TSX prop annotation is the changed usage governed by the explicit
type-import convention, so future readers must rely on the React namespace for a type-only
reference.
Code

src/components/on-call/now/shift-shortcuts.tsx[36]

+export function NowShiftShortcuts({ children }: { readonly children?: React.ReactNode } = {}) {
Relevance

●●● Strong

Exact precedent accepted replacing React namespace types with explicit ReactNode imports in TSX.

PR-#2312

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Compliance ID 3891512 requires explicit imports for React types used in TSX files. The PR adds
React.ReactNode in the new NowShiftShortcuts prop annotation without an explicit ReactNode
type import.

Rule 3891512: Prefer explicit type imports over React namespace types in TSX
src/components/on-call/now/shift-shortcuts.tsx[36-36]

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 new `children` prop uses the React namespace type `React.ReactNode` instead of an explicit type import.

## Fix Focus Areas
- src/components/on-call/now/shift-shortcuts.tsx[36-36]

## Recommended Fix
Add `import type { ReactNode } from "react"` and change the prop annotation from `React.ReactNode` to `ReactNode`.

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


Results up to commit 4ac98aa ⚖️ Balanced


🐞 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. Contacts counts hidden referral routes ✓ Resolved
Description
onCallReferralMatchCount searches routes across all teams, while OnCallReferSections searches
only routes in the selected team. When a reader selects a team and searches for a route in another
team, Contacts announces a match and suppresses “Nothing matches” even though no matching route is
displayed.
Code

src/components/on-call/refer/refer-page.tsx[R54-57]

+  const routes = searchHandbookItems(
+    items.filter((item) => item.section === "referrals"),
+    query,
+  ).length;
Relevance

●●● Strong

Accepted precedent flags mismatches between rendered search results and announced result counts.

PR-#3156

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The counting helper searches every referral item, but the rendered shown list searches byTeam,
which depends on the selected team. Contacts uses the helper’s count for both its search status and
empty-results condition, so those indicators can disagree with the visible routes.

src/components/on-call/refer/refer-page.tsx[54-57]
src/components/on-call/refer/refer-page.tsx[143-158]
src/components/on-call/call/call-page.tsx[378-385]
src/components/on-call/refer/refer-page.tsx[54-63]
src/components/on-call/refer/refer-page.tsx[140-151]
src/components/on-call/refer/refer-page.tsx[184-202]
src/components/on-call/call/call-page.tsx[462-468]
src/components/on-call/call/call-page.tsx[502-507]
Skill: code-quality-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
Contacts counts referral routes excluded by the selected team filter, making its search status and empty-results condition disagree with the visible rows.

## Fix Focus Areas
- src/components/on-call/refer/refer-page.tsx[42-65]
- src/components/on-call/refer/refer-page.tsx[140-158]
- src/components/on-call/call/call-page.tsx[378-385]

## Recommended Fix
Make the Contacts referral count use the same selected-team filter and matching rules as the rendered routes by sharing the filtered results or lifting the team selection. Ensure the count updates when the selection changes, and test a search after selecting one of two referral teams.

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


2. Referral search opens the wrong tab ✗ Dismissed
Description
call:call owns the referral search keywords, but work search links those results to
/on-call/call without ?show=refer. When a reader opens a result for “refer” or “referral,”
peopleTabFor(null) selects Hospital, requiring another tab selection to reach Refer.
Code

src/lib/work-search/pages.ts[116]

+  "call:call": ["phone", "numbers", "switchboard", "pager", "contacts", "ring", "referral", "referrals", "refer"],
Relevance

●●● Strong

PR #3459 explicitly accepted preserving tab-specific destinations for search keywords.

PR-#3459

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Work search attaches referral keywords to the Contacts page and renders its configured href without
a tab parameter. Contacts selects Hospital when show is absent, whereas the old Refer route
explicitly redirects to ?show=refer; this shows why the result does not reach the requested tab. A
past merged fix addressed the same search-result-versus-tab mismatch for privacy queries.

src/lib/work-search/pages.ts[115-117]
src/lib/work-frame/areas.ts[1167-1172]
src/components/on-call/call/call-page.tsx[96-99]
src/lib/work-search/pages.ts[157-172]
src/components/work-search/work-search-sheet.tsx[700-712]
src/lib/work-frame/areas.ts[1163-1171]
src/components/on-call/call/call-page.tsx[90-99]
src/app/(search-app)/on-call/refer/page.tsx[12-17]
PR-#3459
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
Referral work-search results open Contacts on Hospital instead of the matching Refer tab.

## Fix Focus Areas
- src/lib/work-search/pages.ts[115-117]
- src/components/work-search/work-search-sheet.tsx[700-712]
- src/components/on-call/call/call-page.tsx[90-99]

## Recommended Fix
Link referral-keyword work-search results to `/on-call/call?show=refer` while retaining the ordinary Contacts address for number and contact searches. Add a focused search-result navigation test.

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


Results up to commit f08178e 🚀 Fast


No changes from previous review

Grey Divider

Qodo Logo

Comment thread src/lib/work-frame/areas.ts Resolved
@codeant-ai

codeant-ai Bot commented Oct 12, 2026

Copy link
Copy Markdown

CodeAnt Nitpicks

4 code suggestions

1. This tab is added without a new-work-mode gate, so classic mode also exposes the embedded Refer experience even though its Refer route remains standalone.

Incomplete implementation · src/components/on-call/call/call-page.tsx:81


2. OnCallReferSections adds referral matches, but resultCount excludes them, so referral-only searches announce zero and show “No numbers match” beside results.

Logic error · src/components/on-call/call/call-page.tsx:567


3. OnCallReferSections adds referral matches to Contacts search, but its caller excludes them from the result count, so referral-only searches announce “0 results” alongside a match.

Api mismatch · src/components/on-call/refer/refer-page.tsx:96


4. On /on-call/card, the band now shows “Handbook” while hiding the Pocket card header, so the page is visibly mislabeled.

Inconsistent naming · src/lib/work-frame/areas.ts:1186

@codeant-ai

codeant-ai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

CodeAnt PR Risk: Low Risk

  • The PR appears safe to merge; the Refer redirect and tab selection follow the URL's show parameter, including changes after the Contacts page is mounted.
  • Tests cover the Refer tab, referral-only search results, and the redirect from /on-call/refer.
  • The navigation and Now-page changes are reflected in updated component and browser tests.

Assessed commit: 4ac98aa9e584

… follow ?show=

- A search that matches only a referral no longer reads as no results.
- Refer shows the public crisis lines, since it shows no hospital numbers.
- The chosen tab follows and updates ?show=, so refresh and the old Refer redirect agree.
- Refer, Who's who and Pocket card search words move to Contacts and the Handbook.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKaduMkUZJSfvFH9L1yWuz
gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 12, 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)

@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: de4afa83c7

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

Also import ReactNode explicitly in the shift tools card.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKaduMkUZJSfvFH9L1yWuz
Comment thread src/lib/work-search/pages.ts Resolved
@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 4ac98aa

gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 12, 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 f08178e

…al' opens Refer

Classic readers keep the old People tabs and the standalone Refer page. Work search lists
Refer on its own, linking the old address, which opens the Refer tab in the new work mode.

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

@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 12, 2026

Copy link
Copy Markdown
Contributor
Code Review ✅ Approved 1 closed / 1 findings

🟡 Medium risk · Folding signed-out Handbook crisis lines behind “More crisis lines” may make non-000 emergency options less immediately visible.

Restructures On Call into four jobs, with Refer moved inside Contacts as a tab so one search covers numbers and referrals, and the Now page's link list removed. Resolved a referral count that ignored the Refer team filter, so the empty-state message now shows correctly. No open issues remain.

Auto-approved: No blocking issues found.
Please see Auto-approve Docs for details on setting custom approval criteria.

✅ 1 closed
✅ Edge Case: Referral count ignores the Refer team filter, hiding 'Nothing matches'

📄 src/components/on-call/refer/refer-page.tsx:42-56 📄 src/components/on-call/refer/refer-page.tsx:147-148 📄 src/components/on-call/call/call-page.tsx:378-385
OnCallReferSections narrows the hospital routes to the chosen team before it searches (shown = searchHandbookItems(byTeam, query), refer-page.tsx:147-148). onCallReferralMatchCount searches every referral route instead (refer-page.tsx:54-57). Suppose the reader picks a team on the Refer tab and then types a word that only matches a route from another team. Contacts counts that hidden route in resultCount, so the 'Nothing matches' message is suppressed and the status reads '1 result' over a list showing no rows. To fix this, pass the chosen team into the count (for example, lift the team state into Contacts) or have OnCallReferSections report the count it actually shows.

Review coverage

🤖 Auto-approval Approved

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Counting what did not apply, without listing it.

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

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

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 96bb948

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

Labels

🟠 Medium 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