Skip to content

fix(ia): canonicalise Tools route and unify medication/composer naming (PT-11, PT-12, PT-14)#591

Merged
BigSimmo merged 4 commits into
mainfrom
claude/pt-audit-pr5-ia-canonical
Jul 13, 2026
Merged

fix(ia): canonicalise Tools route and unify medication/composer naming (PT-11, PT-12, PT-14)#591
BigSimmo merged 4 commits into
mainfrom
claude/pt-audit-pr5-ia-canonical

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

Audit PT-11/PT-12/PT-14 — one canonical name per product area:

  • Tools: the standalone launcher route moves from /applications (titled "Applications - Clinical KB") to /tools, matching the mode name and the /services///forms sibling pattern. /applications remains as a query-preserving redirect for old links and history. Navigation hrefs are unchanged.
  • Medication: the sidebar said "Medications" while the mode label is "Medication"; both now say "Medication". The internal prescribing mode id and the /medications redirect are untouched (URL stability).
  • Composer: the follow-up composer's "Ask Clinical Guide" placeholder override is removed so every answer composer uses the task-oriented mode placeholder ("Ask a clinical question...").

Site map regenerated (sitemap:update).

Verification

sitemap:check, full typecheck, lint, prettier green; tests/ui-tools.spec.ts route expectations updated to /tools and exercised in the PR-6 branch's Chromium runs.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a dedicated /tools route for accessing the tools launcher.
    • Preserved search parameters when redirecting from the previous applications route.
    • Added loading and improved error states for the tools experience.
    • Updated page metadata for the Tools page.
  • Updates

    • Renamed the sidebar item from “Medications” to “Medication.”
    • Updated search and navigation behavior to recognize the new tools route.

…g (PT-11, PT-12, PT-14)

"Tools" and "Applications" were two names for the same launcher:
/?mode=tools (mode home) plus a standalone /applications route titled
"Applications - Clinical KB". Rename the standalone route to /tools to
match the mode name and the /services//forms sibling pattern, and keep
/applications as a query-preserving redirect for old links and history.

Unify the medication naming: the sidebar said "Medications" while the
mode label is "Medication"; use "Medication" in both.

Drop the follow-up composer's "Ask Clinical Guide" placeholder override
so every answer composer uses the task-oriented mode placeholder
("Ask a clinical question..."). Site map regenerated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@supabase

supabase Bot commented Jul 13, 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 Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@BigSimmo, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 7 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ddb41d0-d2be-40a4-a56f-5881b2c3d39d

📥 Commits

Reviewing files that changed from the base of the PR and between 3b7e22f and 2bad7ba.

📒 Files selected for processing (1)
  • scripts/ensure-local-server.mjs
📝 Walkthrough

Walkthrough

The applications page now redirects to /tools while preserving query parameters. The new tools route provides metadata, loading, layout, and error handling. Standalone route detection, navigation labels, search placeholders, and UI tests are updated accordingly.

Changes

Tools Route Migration

Layer / File(s) Summary
Canonical tools route and applications redirect
src/app/tools/page.tsx, src/app/applications/page.tsx, docs/site-map.md
Adds the /tools route and redirects /applications to it while forwarding single- and multi-valued query parameters.
Tools shell, loading, and error presentation
src/app/tools/layout.tsx, src/app/tools/loading.tsx, src/app/tools/error.tsx, src/components/clinical-dashboard/global-search-shell.tsx, tests/ui-tools.spec.ts
Aligns tools layout, loading and error UI, standalone route detection, and route-focused UI coverage with /tools.
Navigation labels and search placeholder behavior
src/components/clinical-dashboard/ClinicalSidebar.tsx, src/components/clinical-dashboard/master-search-header.tsx, tests/ui-smoke.spec.ts
Renames the prescribing sidebar item to “Medication” and uses the selected search mode placeholder as the fallback across modes, with updated assertions.

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

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant ApplicationsRedirect
  participant ToolsRoute
  participant ApplicationsLauncherPage
  Browser->>ApplicationsRedirect: Request /applications with query parameters
  ApplicationsRedirect->>ApplicationsRedirect: Serialize query parameters
  ApplicationsRedirect-->>Browser: Redirect to /tools with forwarded query
  Browser->>ToolsRoute: Request /tools
  ToolsRoute->>ApplicationsLauncherPage: Render applications launcher
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: canonicalizing the Tools route and unifying related naming updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/pt-audit-pr5-ia-canonical

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

@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: 1420ac698e

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

Comment thread src/app/applications/page.tsx Outdated
@github-actions

Copy link
Copy Markdown

@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation.

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

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

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

Comment thread src/app/tools/page.tsx Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
tests/ui-tools.spec.ts (1)

310-312: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Add a regression test for the legacy redirect and query preservation.

These tests validate /tools, but do not verify that /applications redirects there while preserving search state such as q/query, mode, run, and focus.

As per coding guidelines, high-risk routing changes should be reviewed for regressions and missing tests; the PR objective also requires preserving live and legacy search state.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/ui-tools.spec.ts` around lines 310 - 312, Add a regression test
alongside the existing “standalone tools route uses the shared global search”
test that navigates to the legacy /applications route with q/query, mode, run,
and focus parameters, then verifies it redirects to /tools while preserving
those parameters and the expected search state.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tests/ui-tools.spec.ts`:
- Around line 310-312: Add a regression test alongside the existing “standalone
tools route uses the shared global search” test that navigates to the legacy
/applications route with q/query, mode, run, and focus parameters, then verifies
it redirects to /tools while preserving those parameters and the expected search
state.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 20d423f1-b583-4665-8dfa-c575985acf43

📥 Commits

Reviewing files that changed from the base of the PR and between ce99cbc and 3b7e22f.

📒 Files selected for processing (11)
  • docs/site-map.md
  • src/app/applications/page.tsx
  • src/app/tools/error.tsx
  • src/app/tools/layout.tsx
  • src/app/tools/loading.tsx
  • src/app/tools/page.tsx
  • src/components/clinical-dashboard/ClinicalSidebar.tsx
  • src/components/clinical-dashboard/global-search-shell.tsx
  • src/components/clinical-dashboard/master-search-header.tsx
  • tests/ui-smoke.spec.ts
  • tests/ui-tools.spec.ts

@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: 3b7e22fe43

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

Comment thread src/app/applications/page.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant