Repository navigation
fix(archive): use host title projections for the list - #133
Merged
Merged
Conversation
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.
Closes #131.
On 2.0.9, cold-start Archived refreshes still opened every existing session log to scan for the last
session/titleevent, scaling with total compressed log bytes (about 9.3 s across 171 zstd logs / 138 MB on Windows 11).GET /statenow reads list titles from the Host'ssessionProjections(for live sessions) andsessionProjectionCache(includingcachedPredecessorTitlehints across adjacent format versions) without opening any session logs. Entries without a saved projection stay visible as Untitled chat / 未命名会话.Explicit Archived search batches pass
includeTitles: trueso cold log titles are still matched, and one-character queries check exact titles from logs without scanning message bodies. Previews and ZIP exports continue to read the original session logs, and session files, tags, notes and archive markers are not modified by listing.I tested on macOS with Node.js 24.22.3 against DSH 0.2.2-rc.5 (171 compressed v4 sessions plus 680 missing archive IDs after a cold restart):
GET /statemade zero session-logopencalls and returned in ~27 ms. The unit suite had 513 passes and 19 skips. All eight native Host fixtures, both client fixtures, the SQLite checks, release-candidate/changelog checks andnpm pack --dry-run --jsonpassed.