Repository navigation
Conversation
…while it refreshes Lanes cleared its PR tags on every activation and read them again. The lane list groups lanes from those tags (a merged PR makes a lane "done", failing checks or conflicts make it "needs you"), so each return regrouped the sidebar twice: blank, then filled. Keep the tags while the same project is shown and clear them only on a project switch. The activation reads still run, and their results replace the kept rows when they arrive. The visible-PR refresh now records a PR as requested when its request is sent, not when the timer is queued. A fresh tag list arriving inside the 260 ms debounce cancels the queued timer and re-selects. Marking at queue time left the PR marked with no request sent, so its refresh was dropped for 15 s. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
|
Deployment failed for project ade with the following error: Learn More: https://vercel.com/arul28s-projects?upgradeToPro=build-rate-limit |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 94ff737a-2dac-445f-884f-ecae4fc3bf1e) |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
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 |
|
Parking this per the perf merge gate: no proven win. Coordinator A/B in the dev app (same session, HMR-swapping
The ranges overlap completely, so the difference is inside run-to-run noise. This branch also renders more nodes on Lanes (3,950 vs ~2,210), because the kept PR tags stay on screen. Lead for a next attempt (from the implementer): Closing without merge; the branch stays for reference. 🤖 Generated with Claude Code |
Why
Switching Work → Lanes settles late (376 ms warm on v1.2.109, ceiling 250 ms). The coordinator's IPC trace of one switch listed the selected lane's PR detail reads (
pr.getStatus,pr.getChecks,pr.getFiles,pr.getReviews) and several lane git reads among the calls it waited on.Findings from reading the code:
useLanePrDetail(components/lanes/overview/useLaneOverviewData.ts,prDetailCache, since feat(desktop): project sidebar shell and Lanes redesign #1304) shows the cached detail at once and skips the re-read while the cached read is under 60 s old. A throwaway hook test (not committed) confirmed it: park and unpark within 60 s makes 0 extra reads and shows the cached checks. After 61 s the cached detail still shows at once, one re-read runs, and a changed result replaces it. So a return within 60 s does not re-issue the four PR detail reads, and a return after 60 s shows the cached detail while they run. Thetabsscript's warm rounds are a few seconds apart, so they should not re-issue them either, but no real-app trace has confirmed that. Not changed here.LanesPageclearslanePrTagsandlaneGithubPrTagson every activation (LanesPage.tsx:838) and then re-reads them.classifyLaneStateandlaneNeedsYouReasonread those tags to place each lane in a sidebar group: a merged PR makes a lane "done", failing checks, conflicts or requested changes make it "needs you". So each return regrouped lanes with PRs twice: blank, then filled. That is the on-return churn this PR removes.What changed
apps/desktop/src/renderer/components/lanes/LanesPage.tsxonly.activeProjectRootchanges (lanePrTagsProjectRootRef). Activation still runsrefreshLanePrTags()andrefreshLaneGithubPrTags()exactly as before. Their results replace the kept rows when they arrive.Freshness: the activation reads, their timing, and their results are unchanged. Nothing arrives later. The only difference is that on return the rows show the last known PR state until the fresh read lands, instead of showing nothing.
Evidence
Metric (named before coding): Lanes tab warm settled time, the time from the switch click until the DOM stops changing, by
ROUTES=/work,/lanes node scripts/perf/ui/interaction.mjs tabs 7(addSCREENCAST=1when the window is covered) on the installed app with real data. Secondary: warm first frame, long frames, DOM nodes, and IPC calls on open (docs/perf/macos-baseline.md, "Lanes: IPC on open").Baseline (coordinator, installed v1.2.109, quiet machine): warm settled 376 ms (ceiling 250 ms), warm first frame 58 ms, 0 long frames, ~6460 DOM nodes.
After: to be measured by coordinator on the installed app with the dev build. No after numbers are claimed in this PR.
Checks run in the worktree (Node 22.13.1):
npm --prefix apps/desktop run typecheck: passes.npx eslint src/renderer/components/lanes/LanesPage.tsx: 0 errors. Two warnings, both pre-existing and outside the diff (react-hooks/exhaustive-depsat lines 443 and 2197).npx vitest run src/renderer/components/lanes/LanesPage.test.ts: 49/49 pass.useLanePrDetailtest (deleted, not committed): 2/2 pass, as described under Why.Not checked
LanesPageis a large App-level component. A focused test would need most of its dependencies mocked, so none is committed. The two behavior changes were verified by reading and by typecheck and lint only.useLaneAgents(components/lanes/laneAgents.ts) clears its roster while the page is parked and re-reads it on return, and the sameclassifyLaneStatereads agents. This PR does not touch that. It is probably the rest of the remaining churn; it is a separate concern (the chat roster).LaneGitActionsPanealready keeps its last state on re-activation (initialCachedGitState), and the list's git fields come from the store. Neither is changed here, so the title covers PR status only.allMachineLanes.prsByMachineId, which this change does not touch. Not verified on Windows or on a remote machine.docs/perf/macos-baseline.mdis not updated. There is no measured after yet; the coordinator should record the new baseline with the commit once measured.🤖 Generated with Claude Code
Note
Low Risk
Renderer-only caching and debounce timing in LanesPage; refresh paths and freshness behavior are unchanged aside from avoiding empty UI and fixing a queued-but-never-sent refresh edge case.
Overview
Returning to the Lanes tab no longer wipes PR tag state when you stay on the same project, so sidebar grouping (done / needs you / etc.) keeps showing the last known PR status until the existing activation refresh completes instead of flashing empty and regrouping twice.
LanesPagetracks the project withlanePrTagsProjectRootRefand only clearslanePrTags/laneGithubPrTagswhenactiveProjectRootchanges; activation still runs the samerefreshLanePrTagsandrefreshLaneGithubPrTagscalls.The debounced visible-PR background refresh now records each PR in
laneVisiblePrRefreshRequestedAtRefwhenwindow.ade.prs.refreshis actually sent, not when the 260 ms timer is scheduled, so a tag update that cancels and reschedules the debounce does not leave PRs throttled for 15 s without a request.Reviewed by Cursor Bugbot for commit d122b0e. Configure here.