tweak(tui): status bar spacing + muted busy-segment dash

Two small polishes.

- StatusBar: the busy branch used to emit three pad groups
  before the provider/model block (pad + busyPrefix + pad +
  pad). On screen that read as six spaces between the elapsed
  counter and "(openai) gpt-5.4", which looked like a layout
  bug. Collapsed to two pads so the gap matches the idle path
  exactly: 2 spaces before the model block, 2 spaces between
  the busy segment and the model block.

- The separator between the spinner message and the elapsed
  counter was rendered as a plain unstyled "-", which the
  terminal painted in the default foreground colour (white on
  my dark theme) and stood out against the muted counter next
  to it. Pulled the dash into its own FG256(Muted, ...) call so
  the whole tail ("- 15s") shares the same grey tone.
This commit is contained in:
patriceckhart 2026-04-21 17:53:11 +02:00
parent 1f28b62a47
commit fc47398717
2 changed files with 6 additions and 1 deletions

View file

@ -719,9 +719,10 @@ func (i *Interactive) redraw() {
// drifts every second and shouldn't grab focus.
var busyPrefix string
if i.busy {
busyPrefix = fmt.Sprintf("%s %s - %s",
busyPrefix = fmt.Sprintf("%s %s %s %s",
i.cfg.Theme.FG256(i.cfg.Theme.Assistant, i.spin.Frame()),
i.cfg.Theme.FG256(i.cfg.Theme.Assistant, i.spin.Message()),
i.cfg.Theme.FG256(i.cfg.Theme.Muted, "-"),
i.cfg.Theme.FG256(i.cfg.Theme.Muted, i.spin.Elapsed().String()),
)
}

View file

@ -1374,6 +1374,10 @@ func StatusBar(p StatusBarParams) []string {
// segments. Wrapping the whole thing here would override
// those choices. The pad itself needs no color (it's spaces).
leftBuilder.WriteString(pad + p.BusyPrefix)
// Exactly one pad (2 spaces) between the busy segment and
// the provider/model block. The leading pad above covers
// the left indent.
} else {
leftBuilder.WriteString(pad)
}
leftBuilder.WriteString(pad)