Skip to content

feat(compaction): make the reclaimed-tokens arrow an overridable glyph#452

Merged
sirmalloc merged 1 commit into
sirmalloc:mainfrom
zachthedev:fix-compaction-reclaimed-symbol
Jun 15, 2026
Merged

feat(compaction): make the reclaimed-tokens arrow an overridable glyph#452
sirmalloc merged 1 commit into
sirmalloc:mainfrom
zachthedev:fix-compaction-reclaimed-symbol

Conversation

@zachthedev

Copy link
Copy Markdown
Contributor

Closes #448

formatReclaimedSuffix hardcoded a leading ↓ before the reclaimed-token count.
#431 gave the git/jj widgets per-symbol overrides but skipped this one.

Routes the reclaimed prefix through the existing symbol-override slot system as a
symbolReclaimed metadata slot (default ↓), reachable via the shared (g)lyph
editor and renderSymbolSlotsEditor.

  • Default unchanged: existing configs still render ↓1.2M.
  • Custom glyph (e.g. symbolReclaimed = -) renders -1.2M.
  • Empty override drops the glyph but keeps the separating space ( 1.2M).

The secondary parens-vs-separator suggestion in #448 is layout/composability and
fits #450 better; left out of scope here.

Tests: added custom-glyph and empty-override cases and updated the keybind
assertions for the new (g)lyph bind. bun run lint clean; bun test green
except the pre-existing Windows-env failures (terminal stty/tput, non-macOS
usage-token, buildCommand path-quoting) that also fail on main.

The reclaimed-tokens suffix hardcoded its leading down-arrow. Route it through the existing symbol-override slot system (metadata slot symbolReclaimed) so it can be customized or cleared from the glyph editor, the same way the git widgets expose their symbols.

The default is unchanged, so existing configs render identically. An empty override drops the glyph but keeps the separating space.

Closes sirmalloc#448

Co-Authored-By: Claude <noreply@anthropic.com>
@sirmalloc sirmalloc merged commit 7be789f into sirmalloc:main Jun 15, 2026
3 checks passed
@zachthedev

Copy link
Copy Markdown
Contributor Author

The pre-existing Windows-env test failures noted in the description are fixed separately in #454; with that branch, bun test is fully green on Windows too.

@CorticalCode

Copy link
Copy Markdown
Contributor

Thanks for the tweak and the #454 fix 👍

@zachthedev zachthedev deleted the fix-compaction-reclaimed-symbol branch June 16, 2026 04:08
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.

compaction-counter: hardcoded reclaimed-tokens arrow is not overridable like other widget symbols

3 participants