Skip to content

fix(capture): four silent drops, and a --resolution flag that did nothing - #14

Merged
JheisonMB merged 7 commits into
developfrom
fix/capture-drops
Aug 27, 2026
Merged

fix(capture): four silent drops, and a --resolution flag that did nothing#14
JheisonMB merged 7 commits into
developfrom
fix/capture-drops

Conversation

@JheisonMB

Copy link
Copy Markdown
Contributor

Five fixes, all found by desk-checking capture.rs after the user reported that some events performed during a capture never made it into the recording and had to be re-added by hand afterwards.

Four of the five are silent drops: the capture reports success and the event is simply absent. That is the shape of the original complaint.

  • Secret-prompt dedup was scoped to the whole capture (8246ea1). last_secret_prompt was compared but never reset, so any later prompt with the same text was swallowed — capture two sudo calls and only the first becomes a step. Worse in combination with the is_secret_prompt substring heuristic: on a second false positive with the same text, the typed command disappears with nothing in its place.
  • --after armed on the wrong command and was dropped at shutdown (c77701c). The CLI help and the wizard promised "when the current command finishes"; the only thing that armed the queue was a new command line being submitted, so the command you meant was already running and nothing fired. And neither after_opens nor pending_opens was drained when the capture ended.
  • A failed or cancelled focus/open stranded a mute span for 90 s (30f487a). The span is opened by the capture when it sees the meta-command typed, and could only be closed by a reveal line the other process sends on success. A mistyped source id or Esc at the wizard sent nothing, so up to 90 seconds of output and keystrokes were dropped and later excised.
  • Control lines written in the last ≤100 ms were never read (7751814). The watchdog checked the exit conditions before read_control, so a demo focus issued right before Ctrl-D was lost — exactly the "reveal the result, then stop recording" gesture.
  • --resolution changed nothing on a terminal demo (34e71d8). rescale_layout scaled the pane rectangle but never font_size, and a terminal pane's rendered size is cols × cell_w, derived from font_size. Measured on the canopy demo: --quality hd, --resolution 1280x720 and no flag all produced the same 1440×1026, 35.1 MB gif. The note was wrong too — it read the score after mutating it, so it reported the new size as the old one.

906 tests, fmt and clippy clean. There was no test naming after anywhere in capture.rs before this, which is why that one survived.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JeZdT4Zae1BxeLEoKd6kEs

@JheisonMB
JheisonMB merged commit 9b77835 into develop Aug 27, 2026
4 checks passed
@JheisonMB
JheisonMB deleted the fix/capture-drops branch August 27, 2026 20:54
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