Skip to content

feat: show conversation file size in the search results#12

Merged
brtkwr merged 1 commit into
mainfrom
feat/size-column
Jun 22, 2026
Merged

feat: show conversation file size in the search results#12
brtkwr merged 1 commit into
mainfrom
feat/size-column

Conversation

@brtkwr

@brtkwr brtkwr commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

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).

  • Stores the .jsonl file size on Conversation (the file is already os.Stat'd during parse, so no extra I/O).
  • Renders it human-readable in a 6-wide column: 512B, 2KB, 75MB, 1.2GB.
  • TOPIC shrinks 40→34 columns to keep the table from getting too wide.
  DATE              PROJECT               TOPIC                       MSGS  HITS    SIZE
  2024-01-08 15:04  project-name          ✎ Refactor auth flow          42     3   1.2GB
> 2024-01-08 14:30  selected              This one is selected          28     1    12MB

Note / follow-up

The default --max-size=1024 skips files over 1GB, so the very largest conversations (the prime prune targets) only show with --all or a higher --max-size. The upcoming ccs prune CLI will scan all files directly regardless of this filter; I can also add a README note about using --all to 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%.

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).
@brtkwr brtkwr merged commit e1948a4 into main Jun 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant