Repository navigation
Remove unreachable chat-browser scanner APIs from core - #37
Merged
Merged
Conversation
The chat browser is gone, but LocalChatScanner still carried its listing, transcript paging, change-token, and Codex index code. Only tests called it. The app uses scanForStats, scanOfficialClaudeForStats, and removeIndex. Remove scan(profile:), scanOfficialCodex, the public scanOfficialClaude, changeToken(profile:), officialCodexChangeToken, officialClaudeChangeToken, loadTranscriptPage, loadTranscriptForwardPage, and the transcript page and renderable-entry limits. Also remove everything only those APIs reached: the Codex session/index reader, transcript parsing, the transcript entry, cursor, and page types, LocalChatMessage, and the chat-index read limit. Every remaining caller requested summary-only scans, so drop the forStats flag along with the presentation fields it always left empty. The bounded no-follow readers, path-containment checks, usage and history caches, and legacy index cleanup are unchanged. Port the Claude stats-path tests (usage dedupe, line and byte bounds, metadata and audit symlink rejection, cache invalidation) to the stats API. Delete tests that covered only the removed Codex, transcript, and change-token paths. Update docs that described the removed APIs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 tasks done
euforic
added a commit
that referenced
this pull request
Oct 30, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
The chat browser was removed earlier, but
LocalChatScannerstill had its listing, transcript-paging, change-token, and Codex index code. Only tests called any of it. The app calls justscanForStats,scanOfficialClaudeForStats(fromProfileStatsScanner), andremoveIndex(fromAgentDockModel).scan(profile:),scanOfficialCodex, the publicscanOfficialClaude,changeToken(profile:),officialCodexChangeToken,officialClaudeChangeToken,loadTranscriptPage,loadTranscriptForwardPage, and the transcript page and renderable-entry limits.LocalChatMessage,LocalChatRole,LocalChatAvailability, and the now-unusedLocalControlFileLimit.chatIndex.forStatsflag, since every remaining caller passedtrue, along with the session fields only the other branch filled.LocalChatSession.swiftgoes from about 3,100 lines to about 1,110.Two small behaviour changes, both in code the app never runs:
scanForStatson a Codex profile now returns an empty result instead of scanning (ProfileStatsScanneronly calls it for Claude).history.jsonlexistence check is gone; it only ran when no Claude Code folder was passed, and the stats API always passes one.Tests
LocalChatSessionTests: the Claude stats-path tests (usage dedupe, line and byte limits, metadata symlink rejection, cache invalidation) now callscanOfficialClaudeForStatsandscanForStats. One new assertion checks that a symlinked audit file pointing outside the profile is not read.LocalChatScannerTestsandPerformanceRegressionTests.testChatIndexAndFirstTranscriptPageStayWithinBudgets, which covered only the removed Codex, transcript, and change-token paths.removeIndexstays covered byProfileSelectionIsolationTests.Docs
Updated
docs/architecture.md,docs/code-map.md,docs/development.md,docs/apis.md, anddocs/resource-usage-readers.md. README needed no change. Dated audit and QA records are left as they were.Test plan
swift test: 294 core tests (17 opt-in skips), 63 app tests, and 16 renderer tests pass.Sources,Tests, anddocsfinds no references to the removed identifiers.LegacyBrandMigrationTests.testCurrentRootConvertsLegacyMarkersWithoutMovingProfilesfailed once on a full local run. Its idle check (lsof +Don the temporary folder) saw another process holding a file there. It passed on its own and in a second full run, and this change doesn't touch that code.🤖 Generated with Claude Code