Skip to content

fix(exec): center header, fix stuck timer, brighten command preview#404

Merged
avihut merged 1 commit intomasterfrom
fix/exec-printout
Apr 25, 2026
Merged

fix(exec): center header, fix stuck timer, brighten command preview#404
avihut merged 1 commit intomasterfrom
fix/exec-printout

Conversation

@avihut
Copy link
Copy Markdown
Owner

@avihut avihut commented Apr 25, 2026

Summary

Three rendering fixes to the live UI of daft exec against multiple worktrees:

  • Header centering — the scope-summary line previously used a fixed 8-char prefix, leaving the summary visibly left-of-center. Prefix/suffix dashes are now balanced so the summary sits in the middle of the 60-column divider.
  • Stuck spinner timer — the elapsed-time suffix was promoted onto the spinner only inside update_job_output, so a long-running silent job (Compiling daft … for tens of seconds with no fresh stdout) never received the [HH:MM:SS] suffix. Promotion is now driven by a per-job one-shot thread that fires on a wall-clock deadline.
  • Readable command preview — the in-flight ❯ <cmd> rendered in DARK_GREY (palette 240), which is barely distinguishable from the background on dark themes. The color is dropped so the in-flight preview matches the post-run rows, which already use the default foreground.

Test plan

  • mise run fmt:check
  • mise run clippy
  • mise run test:unit — 1179 passed
  • mise run test:manual --ci — 440 scenarios / 1561 steps passed
  • New regression tests:
    • format_header_line centering invariant + total-width preservation + overflow-summary fallback
    • timer_promotes_on_wall_clock_even_without_output — proves the timer suffix appears even when the job emits no stdout past the threshold
  • Manual visual check of daft exec --all -- mise dev against ≥2 worktrees on a slow build

🤖 Generated with Claude Code

Three fixes to the live UI of `daft exec` against multiple worktrees:

* **Header centering** — the scope-summary line previously used a fixed
  8-char prefix, leaving the summary visibly left-of-center. Balance
  prefix/suffix dashes so the summary sits in the middle of the
  60-column divider.

* **Stuck spinner timer** — the elapsed-time suffix was promoted onto
  the spinner only inside `update_job_output`, so a long-running silent
  job (`Compiling daft …` for tens of seconds with no fresh stdout)
  never received the `[HH:MM:SS]` suffix. Drive the promotion from a
  one-shot per-job thread that fires on a wall-clock deadline.

* **Readable command preview** — the in-flight `❯ <cmd>` rendered in
  DARK_GREY (palette 240), which is barely distinguishable from the
  background on dark themes. Drop the color so it matches the post-run
  rows, which also use the default foreground.

Adds regression tests for the centering math and the wall-clock
promotion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avihut avihut added this to the Public Launch milestone Apr 25, 2026
@avihut avihut added the fix Bug fix label Apr 25, 2026
@avihut avihut self-assigned this Apr 25, 2026
@avihut avihut merged commit 7345adc into master Apr 25, 2026
8 checks passed
@avihut avihut deleted the fix/exec-printout branch April 25, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant