Repository navigation
fix(tui,screenshots): point the capture path at the in-repo scripts; docs follow - #1350
Merged
Merged
Conversation
`tui/scripts/shot.sh` was in the tree but unusable from a clone: it drove tmux, then reached for `ansi2png.py` and `click.py` under the gitignored `.future/workbench-lab/`, so a reader got `exit 2` and the docs that cited it (`verification.md` §7) pointed at a command that could not work. It is now a thin wrapper over `scripts/screenshots/capture.py tui`, which is the single implementation: the app runs in a pty of the requested size and the bytes it wrote are replayed through the terminal cell model. No tmux and nothing outside the repository to install. `capture.py tui` grew what the wrapper needs: - `--scenario` (`chat`, `help`, `palette`, `todo`, `usage`, `skills`, `sessions`) drives the surface the way a reader does. Panels are click-only, so those scenarios click a tab — resolved from the frame on screen, not a fixed column: counting characters instead of cells put the click on the tab *before* the target once any CJK label preceded it (the first version's `usage` frame showed the sessions panel). A self-test pins the bytes sent. - `--addr` attaches to a running agent instead of starting `demo_agent`, and leaves the caller's `FUTURE_HOME` alone — the real-session path §7 uses. - the output argument is optional again (`python3 … capture.py tui`), as the docs already wrote it. - `--self-test` checks the scenario steps without a browser or an agent. `shot.sh` picks its data source from the environment: `FUTURE_AGENT_GRPC_ADDR` set means that agent (real transcript, real todos, real usage), otherwise the scripted demo. It accepts both argument forms the docs use — `chat 120x38` and `chat out.png` — rejects arguments it does not take rather than ignoring them, and only a live capture defaults into `docs/tui/assets/`, so a demo frame cannot silently overwrite the visual baseline.
The verification, parity, redesign and spec pages described tmux `new-session`
/ `resize-window` / `capture-pane -p -e` / `ansi2png.py --cols` as the way to
reproduce the frames. None of that is how a frame is made now, and `SHOT_PY`
named a script that does not exist.
Rewritten to the mechanism in the tree (pty sized before the app starts, bytes
replayed by `tui_terminal.py`), in both languages, and the argument form now
shown as written is the one `shot.sh` accepts (`chat 120x38`). §7 step 5 gains
the `--scenario palette` it always meant — a bare `capture.py tui` renders the
chat surface, not the picker.
The historical statements (how *this* record's frames were produced, and the
`tmux display -p '#{mouse_any_flag}'` measurement in M6) are left alone: they
describe what was done, not what to run.
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 and why
tui/scripts/shot.shpromised a capture path that no longer exists. It is now a thin wrapper over the scripts that actually produce the images (scripts/screenshots/tui_capture.py, which drives the real TUI, andcapture.py, which gained the sizing and pane options the wrapper needs), so regenerating a workbench screenshot is one command instead of a hunt. The guides are corrected in the same change: they describe the capture path that exists, not the one that was removed.Commits
Verification
Run on the frozen tip (
8e4cb4f2b):bash -n tui/scripts/shot.sh— syntax OKpython3 -m py_compile scripts/screenshots/capture.py scripts/screenshots/tui_capture.py— cleanmake check-docs— 327 docs checked; placement, bilingual pairing, local/wiki links, script paths and fences OK; 0 pairs pending bilingualization; provider matrix matches the code (13 rows)No Rust source changed, so no compile or test class applies; the capture tooling is exercised by hand (
shot.shreproduced the committed images at the previous step of this series).Notes
shot.shkeeps its flags, so existing invocations (and the guide text that documents them) still work.capture.pyis shared with the desktop/mobile capture flows; the new options are additive.