Repository navigation
perf(summaries): read lastActivity off the thread row, never a shard (#1475) - #1480
Merged
currentbits merged 1 commit intoOct 5, 2026
Merged
Conversation
…1475) threads:summaries read every cold transcript synchronously to find one line (1,166 shards / 463 MiB / 2 s on the first Agents-panel open). The row now carries lastActivity { text, at } | null: runner pushDetail restamps it from in-memory messages, summaries recompute it only when the transcript is already loaded, and unknown rows are backfilled once with an async 64 KB tail read (whole-file fallback when the tail holds no assistant message). listRow keeps the field off threads:changed. 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. |
2 tasks
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 of #1475, main-process finding 2.
Before this change,
threads:summariesread every transcript shard synchronously to find each thread's last assistant line. Now each thread row stores alastActivitysnippet:pushDetail. The transcript is already in memory there, so no disk read.lastActivityis removed from thethreads:changedrows, so that push doesn't get bigger.Verified independently:
Date.nowandrandomUUIDfrozen). The first call drops from 7.4 s to 4.7 ms.threads-summaries.test.js) fails on main.Trade-offs:
thread-last-activity.jsreads some of the Store's private fields (read-only). It's marked with aponytail:comment, and the upgrade path is a publicstore.hasMessagesInMemory(id).🤖 Generated with Claude Code