feat: live TTY startup feedback (scope header + ticking footer)#31
Draft
rsanheim wants to merge 5 commits into
Draft
feat: live TTY startup feedback (scope header + ticking footer)#31rsanheim wants to merge 5 commits into
rsanheim wants to merge 5 commits into
Conversation
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.
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.
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.
What
Fixes the "no feedback until repos start finishing" gap in the sticky-footer
printer. Two parts:
docs/dev/issue-tty-startup-feedback.mdframes the problem,why the shipped sticky footer behaves this way, the older list-first approach
and why it was dropped, and options A–E.
Why
After consolidating onto the sticky footer (0.7.3+),
git all fetchin adirectory with many repos (
~/src/oss,~/work) showed only a frozen0 of N done | ... | N pending | 0.0sline until repos started finishing — itlooked 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)
git-all fetch · 98 repos · ~/work · 16 workers— the size of the job is visible immediately.
recv_timeout, so the elapsedclock advances even when nothing has completed. Never looks frozen.
names, then
+N more), so you see what's being worked on before anythingfinishes. 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 testgreen (53 tests; new printer tests for header, running list,+Noverflow, and tick). Driven end-to-end under tmux for both
statusandfetch:16 running+ the actual repo names.0.2s → 0.9s → 2.1s → 3.4s → 4.6sbetween completions.N of N done | 0 running.MoveUponly ever 2–3 lines, MoveUp/Clear balanced — cleanin-place redraw, no scrollback pollution.
Deferred (open questions in the doc)
they complete (removes head-of-line blocking of the row list). Held pending the
default-vs-opt-in call.
indicatif) only ifPhase 1 doesn't feel good enough on real workspaces.