Skip to content

assembly code: harden clipboard copy and voice/text switching#256

Merged
alexkroman merged 4 commits into
mainfrom
claude/assembly-exploratory-testing-eyo4pi
Jun 19, 2026
Merged

assembly code: harden clipboard copy and voice/text switching#256
alexkroman merged 4 commits into
mainfrom
claude/assembly-exploratory-testing-eyo4pi

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

Exploratory testing of the assembly code TUI surfaced three issues in
keypress-driven flows that the snapshot/pilot suites didn't cover:

  • Ctrl-Y (copy last reply) called pyperclip.copy unguarded, so on a
    headless/clipboard-less box (where pyperclip raises) a harmless keypress
    tore down the whole TUI. It also gave no feedback when there was nothing
    to copy. Extracted the logic into a pure tui_status.copy_note helper that
    notes the outcome on every press and absorbs PyperclipException.

  • Ctrl-V to switch from voice to text never cancelled the in-flight mic
    capture, so the UI showed "Voice off" and the text prompt while listen()
    kept the mic open in the background. Toggling off now cancels voice, the
    same as the Escape/Ctrl-C interrupt path.

  • _capture_voice_turn submitted a captured turn with no re-check, so a turn
    that finalized in the window between switching to text (or interrupting)
    and the capture unwinding was submitted behind the user's back. It now
    re-checks that voice is still active before submitting.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01FrvC8NrLtFzGHSToC36Zgc

claude added 2 commits June 19, 2026 04:38
Exploratory testing of the `assembly code` TUI surfaced three issues in
keypress-driven flows that the snapshot/pilot suites didn't cover:

- Ctrl-Y (copy last reply) called pyperclip.copy unguarded, so on a
  headless/clipboard-less box (where pyperclip raises) a harmless keypress
  tore down the whole TUI. It also gave no feedback when there was nothing
  to copy. Extracted the logic into a pure tui_status.copy_note helper that
  notes the outcome on every press and absorbs PyperclipException.

- Ctrl-V to switch from voice to text never cancelled the in-flight mic
  capture, so the UI showed "Voice off" and the text prompt while listen()
  kept the mic open in the background. Toggling off now cancels voice, the
  same as the Escape/Ctrl-C interrupt path.

- _capture_voice_turn submitted a captured turn with no re-check, so a turn
  that finalized in the window between switching to text (or interrupting)
  and the capture unwinding was submitted behind the user's back. It now
  re-checks that voice is still active before submitting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FrvC8NrLtFzGHSToC36Zgc
The code TUI has no Footer widget, so its keyboard shortcuts (copy, voice
toggle, expand output, interrupt, quit) were undiscoverable — unlike the
live TUI, which carries a hint line. Add a second footer row beneath the
status line: a dim, caret-notation legend that lists the shortcuts worth
surfacing. The Ctrl-V voice hint is shown only when the session has a voice
front-end, and caret notation keeps the legend short enough to fit a narrow
terminal.

Folded into _status_text as a two-row footer (one #status widget, height 2)
so _refresh_status keeps both rows on a mode/voice change and the layout
needs no extra docked widget. Regenerated the code TUI snapshots.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FrvC8NrLtFzGHSToC36Zgc
@alexkroman alexkroman enabled auto-merge June 19, 2026 05:44
@alexkroman alexkroman disabled auto-merge June 19, 2026 06:17
@alexkroman alexkroman enabled auto-merge June 19, 2026 06:25
@alexkroman alexkroman added this pull request to the merge queue Jun 19, 2026
Merged via the queue into main with commit d840233 Jun 19, 2026
20 checks passed
@alexkroman alexkroman deleted the claude/assembly-exploratory-testing-eyo4pi branch June 19, 2026 06:30
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.

2 participants