Repository navigation
Drop detail-only fields from threads:changed rows (−47% per push) - #1389
Merged
Merged
Conversation
Every threads:changed push carried hypotheses and suggestions for every thread. The renderer reads both from detail.thread only (ThreadView's SuggestedWorkStrip, AgentsPanel's HypothesisLedgerCard), and the detail path still decorates the full thread. On a copy of the live store (1,829 rows) the push drops from 4.59 MB to 2.44 MB. Refs #1385 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Refs #1385. This is the first cut; excluding archived rows from the live push is left open on the issue.
Problem
Each
threads:changedpush serializes every non-trashed thread. On a copy of the live store that's 1,829 rows and 4.59 MB, and it fires about once a second while several threads work (stampLastEventreplaces the threads array every ~5 s per active thread).hypotheses(1.13 MB) andsuggestions(1.0 MB) rode along on every row.Fix
listThreadsrows omithypothesesandsuggestions. The renderer reads both only fromdetail.thread:ThreadView→SuggestedWorkStripandAgentsPanel→HypothesisLedgerCard, where App passesvisibleDetail.thread.getThreadDetailstill decorates the full thread. Main-sidelistThreadsconsumers (threads:list, quitGuard, the worktree forecast) don't read either field.Result
The same live-store copy goes from 4.59 MB to 2.44 MB per push (−47%).
Verification
services.test.jscase: list rows omit both fields;getThreadDetailstill returns them.npm run test:electron(CI-like env): 4057/4059. The 2 failures arememory-supsupervisor spawn andprovider-usagefetchCodex timeout, both untouched by this change. Each passes 2/2 in isolation (load from concurrent runs).🤖 Generated with Claude Code