Repository navigation
Inspector performance: scoped summaries, non-blocking crew integration - #1424
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Recap card now asks for just its own thread's summary and the Agents team view asks for just its project's rows. App gives AgentsPanel a project-scoped panelRosterKey so a working thread in another project no longer keeps the 5s team-view poll alive. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keys the crew-integration effect on a memoized isCrewLead boolean instead of the raw summaries array, so a new array on every 5s poll no longer reruns ~6+3xworkers blocking git commands. Also debounces the threads:changed push reload to one reload per second. Co-Authored-By: Claude Opus 5.5 <[email protected]>
crewIntegration built the Agents tab read model entirely with blocking execFileSync git calls, stalling the whole Electron main process. Add listChangedPathsAsync and export repoDefaultBranchAsync (gitTryAsync was already exported), extract diffBaseCandidates so resolveDiffBase and its new async twin share one candidate list, and make crewIntegration async end to end (worker rows via Promise.all to preserve row order). Only production caller is the async IPC handler at ipc.js:510, which already awaits the return value as a promise. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
crewIntegration is now async in main, so the lead effect's poll and the four action handlers (integrate/refresh/verify/land) can resolve out of order; a late poll could clobber the view a just-finished action just set. Add integrationSeq, bump it before each crewIntegration call, and only apply a result (or its error) if the sequence is still current. Keeps the effect's existing cancelled guard alongside it. Also update two stale comments that said the team-view fetch walks every thread's messages; it has been scoped to the selected thread's project since #1398. Added a renderer test (TDD: verified RED against the pre-fix code, then GREEN) that resolves an early crewIntegration call slowly and a later one fast, asserting the later view is not overwritten. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The P2 bullets and the Data flow line still described the pre-#1398 plan (threadIds-only filter, RecapCard passing its own id, team view passing crew children, poll gated on "this crew"). Update them to match what shipped: threads:summaries takes { projectId?, threadIds? }, RecapCard passes { threadIds: [id] }, the team view passes { projectId }, and the 5s poll runs only while a thread in the selected project is working. Co-Authored-By: Claude Opus 5.5 <[email protected]>
"crewIntegration yields to the event loop while it runs git" ran with no worktree and no workers, so it never exercised the git reads it claims to yield around. Give the lead a committed change and fork one worker with its own change (workOn/forkWorker), and assert view.workers.length === 1 alongside the existing yield assertion. Co-Authored-By: Claude Opus 5.5 <[email protected]>
currentbits
force-pushed
the
coder/inspector-performance
branch
from
October 4, 2026 11:38
810f924 to
826194b
Compare
This was referenced Oct 4, 2026
This was referenced Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of #1422 (the redesign follows in a separate PR). Spec and plan are included under
docs/superpowers/.What was slow
summariesarray, which is new on every 5 s poll, and reloaded on everythreads:changed.execFileSync), roughly 100–270 ms of stall per call, many times a minute.threads:summariesread the last message of every thread (about 1,850).memo(AgentsPanel)never skipped renders, because App passed new inline crew handlers on every render.LaneHeartbeatduplicated the app-levelClaimedLanesHeartbeatand wrote the store every 15 s.Changes
threads:summariesscoping: it accepts{ projectId?, threadIds? }, filters before any message read, and capslastActivity.textat 200 characters. With no argument the output is unchanged.{ threadIds: [id] }.{ projectId }.panelRosterKey) covers only the selected project.isCrewLeadboolean, andthreads:changedreloads are throttled to 1 s.crewIntegration: it usesgitTryAsync,repoDefaultBranchAsyncand a newlistChangedPathsAsync, which sharesdiffBaseCandidateswith the syncresolveDiffBase. Same values, and it no longer blocks main.useCallbackcrew handlers, and the duplicate lane heartbeat is removed. Remote projects can't claim lanes, so the app-level beat covers everything.Verification
tscclean.vite buildOK.claude.test.jsJSON-read race; it passes 3/3 alone.crewIntegrationyields to the event loop with a live lead and worker.🤖 Generated with Claude Code