Skip to content

feat: live TTY startup feedback (scope header + ticking footer)#31

Draft
rsanheim wants to merge 5 commits into
mainfrom
rjs/git-all-ui-feedback-c07c9b
Draft

feat: live TTY startup feedback (scope header + ticking footer)#31
rsanheim wants to merge 5 commits into
mainfrom
rjs/git-all-ui-feedback-c07c9b

Conversation

@rsanheim

@rsanheim rsanheim commented Jul 8, 2026

Copy link
Copy Markdown
Owner

What

Fixes the "no feedback until repos start finishing" gap in the sticky-footer
printer. Two parts:

  1. Design docdocs/dev/issue-tty-startup-feedback.md frames the problem,
    why the shipped sticky footer behaves this way, the older list-first approach
    and why it was dropped, and options A–E.
  2. Phase 1 implementation (Options A + B) on the TTY path.

Why

After consolidating onto the sticky footer (0.7.3+), git all fetch in a
directory with many repos (~/src/oss, ~/work) showed only a frozen
0 of N done | ... | N pending | 0.0s line until repos started finishing — it
looked hung. Three causes: no scope shown up front, no ticking clock (the footer
only redrew on channel events), and head-of-line blocking of the finished rows.

Phase 1 (this PR)

  • Scope banner above the footer, e.g. git-all fetch · 98 repos · ~/work · 16 workers
    — the size of the job is visible immediately.
  • Ticking footer — redraws on a 200ms tick via recv_timeout, so the elapsed
    clock advances even when nothing has completed. Never looks frozen.
  • In-flight list — the footer lists the repos currently running (up to six
    names, then +N more), so you see what's being worked on before anything
    finishes. Footer height varies (2 or 3 lines) and is cleared accordingly.

Non-TTY / redirected output is unchanged: no header, no footer, no ANSI —
plain completion rows only, so pipes and logs are untouched.

Verification

cargo test green (53 tests; new printer tests for header, running list, +N
overflow, and tick). Driven end-to-end under tmux for both status and
fetch:

  • Startup instantly shows the banner + 16 running + the actual repo names.
  • Clock ticks 0.2s → 0.9s → 2.1s → 3.4s → 4.6s between completions.
  • Final frame: all rows in scrollback (alphabetical), footer N of N done | 0 running.
  • Raw byte stream: MoveUp only ever 2–3 lines, MoveUp/Clear balanced — clean
    in-place redraw, no scrollback pollution.

Deferred (open questions in the doc)

  • Option C — completion-order flushing so finished rows appear the instant
    they complete (removes head-of-line blocking of the row list). Held pending the
    default-vs-opt-in call.
  • Phase 2 — full live table (reserved-row viewport / indicatif) only if
    Phase 1 doesn't feel good enough on real workspaces.

rsanheim added 2 commits July 8, 2026 16:14
Frame the "no feedback until repos start finishing" problem on large,
network-bound runs (git all fetch in ~/work), explain why the shipped
sticky footer behaves this way, recap the older list-first approach and
why it was dropped, and lay out options (live footer, scope header,
completion-order flushing, reserved rows/viewport, indicatif) with a
recommended incremental path.
The sticky-footer printer showed only a frozen SUMMARY line until repos
began finishing, so `git all fetch` in a big directory looked hung for
the first seconds. Phase 1 of docs/dev/issue-tty-startup-feedback.md:

* Print a one-time scope banner above the footer, e.g.
  `git-all fetch · 98 repos · ~/work · 16 workers`, so the size of the
  job is visible immediately (TTY only).
* Redraw the footer on a 200ms tick via `recv_timeout`, so the elapsed
  clock advances even when no repo has completed — it never looks frozen.
* List in-flight repos in the footer (up to six names, then `+N more`),
  so you can see what's being worked on before anything finishes. The
  footer height now varies (2 or 3 lines) and is cleared accordingly.

Non-TTY / redirected output is unchanged: no header, no footer, no ANSI.
Verified end-to-end under tmux for status and fetch — clean in-place
redraw (MoveUp only 2-3 lines), no scrollback pollution.
@rsanheim rsanheim changed the title docs: TTY startup feedback gap (sticky footer feels dead on big runs) feat: live TTY startup feedback (scope header + ticking footer) Jul 9, 2026
rsanheim added 3 commits July 9, 2026 17:44
A throwaway workspace of fake repos behind a `git` latency shim, so the
live footer / header can be exercised without the network. Interactive
mode drops into the workspace with `git` = latency shim and `git-all` =
your build; `--run CMD` does a one-shot. Parameterized by --repos,
--min-ms/--max-ms, --dirty, --remotes, --bin, --keep.

This is the harness used to verify the TTY startup-feedback work.
--repos N already set the count; also accept a bare number
(script/tty-lab 80) as a shorthand, reject non-numeric args, and
require at least 1 repo.
Pre-release tag so the branch build is unmistakable from released
0.7.4 while the live TTY startup-feedback work (PR #31) is in flight.
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