perf(ui): prefetch mode homes for seamless switching - #1275
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Warning Review limit reached
Next review available in: 58 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughChangesMode Prefetch and Review Ledger
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 24605b57e2
ℹ️ 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".
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/branch-review-ledger.md`:
- Around line 700-722: Fix the malformed rows in the branch-review ledger table,
especially the entry containing literal pipe characters that currently creates
eight cells instead of six. Escape any content pipes and normalize separator
usage so every affected ledger row has exactly six columns while preserving its
recorded text.
- Around line 685-723: Remove the duplicated dated ledger records in the
reviewed block, including entries whose SHAs already appear in the later
canonical block around the corresponding ledger records. Preserve the canonical
copies and maintain the append-only ledger’s unique record and SHA invariant so
check:branch-review-ledger continues to pass.
In `@tests/audit-navigation-auth-regressions.test.ts`:
- Around line 118-125: Replace the source-string count assertion in the
“prefetches mode homes when the mode menu opens” test with behavioral coverage:
mock router.prefetch, invoke both openModeMenuWithFocus and toggleModeMenu, and
verify each path prefetches the distinct hrefs generated from
visibleAppModeOptions via appModeHomeHref.
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 1e0db041-8088-44be-8f2b-ee533d6ff838
📒 Files selected for processing (3)
docs/branch-review-ledger.mdsrc/components/clinical-dashboard/master-search-header.tsxtests/audit-navigation-auth-regressions.test.ts
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. ❌ Cannot run autofix: This PR has merge conflicts. Please resolve the conflicts with the base branch and try again. Alternatively, use |
|
@cursoragent resolve failing merge conflict |
|
Merge conflict is resolved. PR #1275 is MERGEABLE again. What was wrong: GitHub showed What I did:
Product diff vs |
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Merge origin/main cleared the GitHub DIRTY/CONFLICTING stale state. Restore branch-review-ledger historical records byte-for-byte from main (undoing the mojibake rewrite), then append only the mode-switch performance review and this sync closeout. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Tighten the source contract so leftover prefetchModeHomes strings cannot satisfy coverage for openModeMenuWithFocus and toggleModeMenu.
|
Follow-up on tip |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 1 file(s) based on 3 unresolved review comments. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 1 file(s) based on 3 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #5981 (success). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
* docs(ledger): record open-PR review and Bugbot sweep Append review outcomes for the current open PR queue after #1277 merged, including merge-tree classification and pr-bugbot findings. * docs(ledger): record open-PR recommendation implementation Capture closeouts for the unsafe audit cluster and the follow-up fixes pushed to #1273, #1275, #1280, and #1281. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Restore branch-review-ledger byte-for-byte from origin/main and re-append only this PR's review rows. The cited near-duplicate PWA/credentialed/concurrency records already exist on main as non-identical history; deleting them from a feature PR is not allowed. Autofix a5100d0 had escaped content pipes and removed historical rows. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Union merge interleaved history; restore origin/main as the exact prefix and append only this PR's three review records. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
CodeRabbit duplicate-ledger thread — dispositioned on tip Verified against current
Malformed-row / pipe-escape comments: same disposition — those rows are main history; this PR no longer rewrites them. |
The MD056 cell-count warnings on ~700-722 match origin/main exactly. This PR only appends ledger rows, so rewriting those historical pipes is out of scope and would violate the append-only contract. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
CodeRabbit malformed-ledger-row thread — dispositioned on tip Verified against current code (per the agent prompt: fix only still-valid issues):
If main wants markdown table hygiene for those historical rows, that should be a dedicated ledger cleanup change on |
Replace the source-string call-site count with a jsdom behavioral contract that mocks router.prefetch and opens the mode menu via toggle click and ArrowDown (openModeMenuWithFocus), asserting distinct appModeHomeHref values. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Append-only evidence that the menu-open prefetch contract is now behavioral. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Historical rows already match origin/main byte-for-byte; record the resolved review evidence for the stale mojibake rewrite finding. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
@cursoragent please resolve all CI failing tests after understanding the issue. Please also fix any comments and resolve them and also ensure that you fix with smallest required fix with best coding practice and u derstabding the fix rather than simple patch. Please fix any merge conflicts and ensure any issues are found. Please resolve any issues you find. Please also run bugbot. Please mark comments resolved also once you resolve them. |
|
Resolved on tip What was actually wrong
Fix
Reviews / Bugbot
Checks
|
Main landed focused/pointer prefetchModeHome. Resolve the audit-test conflict by dropping bulk prefetchModeHomes, warming only the highlighted option on menu open, and updating the DOM contract accordingly. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Append-only closeout for the conflict resolution against main's per-option mode-home prefetch. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
GitHub reported CONFLICTING/DIRTY while git merge-tree was clean. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Union-merge of concurrent PR #1289 rows produced exact duplicates. Restore docs/branch-review-ledger.md from origin/main and re-append only this PR's disposition rows. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Sweep closeout (
|


Motivation
Description
prefetchModeHomes()tosrc/components/clinical-dashboard/master-search-header.tsxwhich computes each distinct accessible mode-home href and callsrouter.prefetch(href)when the mode menu is opened or focused.appModeHomeHrefand wireprefetchModeHomes()from both the pointer/tap and keyboard menu-opening paths to warm RSC payloads without changing route ownership or optimistic chrome state.tests/audit-navigation-auth-regressions.test.tsthat asserts the new prefetch helper and that it is invoked from both menu-opening callsites.docs/branch-review-ledger.md.Testing
npm run verify:cheapand its gates; result: PASS (25 gates).node scripts/run-vitest.mjs run tests/audit-navigation-auth-regressions.test.ts tests/favourites-auth-gate.dom.test.tsx; result: PASS (20/20 focused assertions).npm run test); result: PASS — 393 test files, 3,527 tests passed and 1 skipped.npx prettier --checkandgit diff --check; result: PASS.check:branch-review-ledgerrun; result: PASS.Codex Task
Summary by CodeRabbit
Performance
Tests