feat: show conversation file size in the search results#12
Merged
Conversation
Adds a SIZE column to the list so you can spot bloated conversations worth pruning. Stores the .jsonl size on Conversation (already stat'd during parse) and renders it human-readable (e.g. 75MB, 1.2GB). The TOPIC column shrinks 40->34 to keep the table width reasonable. Note: the default --max-size=1024 skips files over 1GB, so the very largest conversations only appear with --all (or a higher --max-size).
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.
What
Adds a SIZE column to the search results so you can see which conversations are bloated and worth pruning (groundwork for the prune feature).
.jsonlfile size onConversation(the file is alreadyos.Stat'd during parse, so no extra I/O).512B,2KB,75MB,1.2GB.Note / follow-up
The default
--max-size=1024skips files over 1GB, so the very largest conversations (the prime prune targets) only show with--allor a higher--max-size. The upcomingccs pruneCLI will scan all files directly regardless of this filter; I can also add a README note about using--allto surface the giants.Tests
TestFormatBytes- formatting across B/KB/MB/GB and that output never exceeds the 6-wide column.TestFormatListItemShowsSize- the size renders in a row.go test -cover= 69.4%.