Repository navigation
feat(widgets): give the remaining git and jj widgets symbol slots - #574
Merged
Merged
Conversation
Five widgets carried customizable glyphs through SymbolSlot while eight others hardcoded theirs, so a status line could restyle Git Status but not Git Changes sitting next to it. Git Insertions, Git Deletions, Jj Insertions and Jj Deletions gain one slot each for their +/- sign. Git Changes and Jj Changes gain both, since they render the pair. Git Clean Status gains symbolClean and symbolDirty, matching the shape Git Conflicts already uses. Jj Revision takes the character/formatSymbolPrefix path rather than a named slot, because it renders a single space-separated prefix exactly like Jj Bookmarks and Git Branch. That also drops the stray leading space an empty override would otherwise leave. None of these widgets could express a custom glyph before. Insertions, deletions and the changes pairs return false from supportsRawValue, so the sign was unconditional; Git Clean Status offered raw mode but emitted the words clean and dirty rather than a symbol; Jj Revision's raw mode removed the revision prefix along with the glyph. Defaults are unchanged, so existing configs render identically.
zachthedev
force-pushed
the
feat-symbol-slots-parity
branch
from
September 4, 2026 14:38
a5d37c8 to
d04da05
Compare
This was referenced Sep 18, 2026
Closed
pcvelz
added a commit
to pcvelz/ccstatusline-usage
that referenced
this pull request
Sep 25, 2026
Upstream: TUI kept off the render path (sirmalloc#575), flex mode default full (sirmalloc#590), usage cache fingerprinted by refresh token (sirmalloc#536), CLAUDE_CONFIG_DIR keychain credential first (sirmalloc#573), llms.txt (sirmalloc#527), faster terminal width probing (sirmalloc#501), git/jj symbol slots (sirmalloc#574), model-scoped 0% quota as real zero (sirmalloc#534), custom-command output cache + timeout (sirmalloc#539), usage-percent widgets on a shared module (sirmalloc#545), hideable reset-timer placeholders (sirmalloc#542), git command timeouts (sirmalloc#559, sirmalloc#585) Hand edits outside conflicts: - src/widgets/shared/usage-percent-widget.ts: compat fix - pass RenderContext to getUsageProgressBarWidth (fork narrow/medium bar widths) and add fork short labels WS:/WO: that the extracted Sonnet/Opus widgets used to render; point the fable-weekly kind at the fork field weeklyFableUsage / resolveWeeklyFableUsageWindow (upstream's fableUsage / resolveFableUsageWindow do not exist in the fork and crashed the render) - .fork-keep-deleted: drop llms.txt (points agents at the upstream package and at docs the fork deletes) Conflict resolutions that deviate from upstream on purpose: - src/types/Settings.ts: keep fork default flexMode full-minus-40 (upstream sirmalloc#590 switched to full) - src/utils/terminal.ts: keep fork tmux $TMUX_PANE width probe, ported to execFileSync; upstream's CCSTATUSLINE_WIDTH override in getTerminalWidth replaces the fork copy - src/ccstatusline.ts: keep getTerminalWidth() without the per-session width cache options (fork invariant); add upstream customCommandCacheTtlSeconds - src/widgets/WeeklyFableUsage.ts (+ test): keep fork widget (Fable:/F: labels, 0% for accounts without Fable, weeklyFableUsage field) instead of upstream's shared-module FableWeeklyUsage - src/utils/__tests__/usage-fetch.test.ts: adopt upstream sirmalloc#534 real-zero semantics on the fork field weeklyFableUsage - docs/test-retirements.md: ledger entries for four tests upstream renamed or replaced (sirmalloc#542, sirmalloc#534) and one duplicate upstream test dropped - src/utils/__tests__/usage-fetch.test.ts: compat - upstream's model-scoped real-zero test expects the fork field weeklyFableUsage - src/widgets/__tests__/WeeklyFableUsage.test.ts: compat - set the shared suite's new required expectedWholePercentTime - src/tui/components/__tests__/ImportPreviewDialog.test.ts: fork deviation - default flexMode is full-minus-40, so the non-default side is full - src/utils/__tests__/usage-fetch.test.ts: drop upstream's duplicate "missing fable window" test that used the upstream-only fableUsage field
This was referenced Oct 4, 2026
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.
Five widgets expose custom glyphs through
SymbolSlot. Eight hardcode theirs,so a line can restyle Git Status but not Git Changes beside it. This closes that
gap.
symbolInsertions+symbolDeletions-+-symbolClean,symbolDirty✓✗characterNo workaround existed for any of them. The insertions, deletions and changes
widgets return
falsefromsupportsRawValue, so the sign was unconditional.Git Clean Status has raw mode but emits
clean/dirtyas words. Jj Revision'sraw mode drops the revision prefix along with the glyph.
Jj Revision uses
characterandformatSymbolPrefixrather than a named slot,matching Jj Bookmarks and Git Branch: one space-separated prefix. That path also
drops the trailing space when the override is empty, which a named slot would
have left behind.
Git Clean Status mirrors Git Conflicts, which already pairs a symbol with a
clean-state symbol.
Defaults are unchanged, so existing configs render identically.
Tests extend the two tables in
SymbolOverride.test.tsrather than adding asuite: Jj Revision joins the
charactercases, the other seven join a newslotCasestable covering default, override, empty override, and thegkeybind plus editor. Reverting Git Changes and Git Clean Status turns 6 red.
bun run lintclean,bun test2223 pass.