Skip to content

feat(git): default state_target to both - #18

Merged
jals1212 merged 1 commit into
mainfrom
feat/git-state-target-both
Jul 3, 2026
Merged

jals1212 merged 1 commit into
mainfrom
feat/git-state-target-both

Conversation

@jals1212

@jals1212 jals1212 commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • The git module's dirty escalation now targets both slots by default (@themux_git_state_target both), so every slot whose variant displays the accent warms together — no more two-tone pill (escalated icon next to a resting-accent text) on dirty trees.
  • Same per-module default pattern as cpu/ram in utils/metric_module.conf; the option remains user-overridable (leading, text, off).

Changes

File Change
modules/git.conf Bake state_target both per-module default (the internal cascade tier is shadowed by the baked module tier, so it rides the user-facing option)
themux_options.conf Comment: document git's per-module default
docs/reference/status-line.md Dirty escalation section: both-slot default + levers
docs/reference/configuration.md State-target section: per-module defaults note
tests/git_module.sh + expected Assert 1 dirty switch on stock soft text (renderer collapses the accent-less slot) and 3 with solid text (icon bg, text bg, trailing bg re-assert)

Test plan

  • ./run_tests.sh — 17/17 green
  • shellcheck tests/git_module.sh
  • Live-verified: reloaded tmux 3.7a, dirty repo warms the whole pill

🤖 Generated with Claude Code

A dirty work tree escalated only the icon slot (state_target auto resolved
to leading), leaving a two-tone pill when the text variant displays the
accent. Bake the per-module default to both — the same pattern cpu/ram use
in metric_module.conf — so every accent-bearing slot warms together. The
internal cascade tier is unreachable here: themux_options.conf bakes the
module tier to auto, so the default must ride the user-facing option.

Tests assert the stock core keeps one dirty switch (soft text has no accent
channel, the renderer collapses it) and a solid text carries three (icon bg,
text bg, trailing bg re-assert).
@jals1212
jals1212 merged commit 390123c into main Jul 3, 2026
2 checks passed
@jals1212
jals1212 deleted the feat/git-state-target-both branch July 3, 2026 16:09
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