Skip to content

fix(bin): stop desk-voice delivery from scrolling the Firstmate chat - #269

Closed
lwachter-code wants to merge 1 commit into
Amplify-Logic:mainfrom
lwachter-code:fm/floater-option-scroll-t1
Closed

lwachter-code wants to merge 1 commit into
Amplify-Logic:mainfrom
lwachter-code:fm/floater-option-scroll-t1

Conversation

@lwachter-code

Copy link
Copy Markdown

Summary

Delivering a desk-floater voice or dictated message made the Claude Code conversation in the Firstmate pane jump while the floater showed "Delivering".

Cause: the send path's selection-dialog, chat-box and stash checks in bin/fm-desk-voice.sh read the pane through fm_backend_capture, which on Herdr is pane read --source recent --lines 200.
On Herdr 0.9.3 a line-counted read of an idle Claude pane makes Herdr scroll Claude's conversation up to collect its history and then restore it, which is the visible jump.

Fix: those three checks now read only the visible screen wherever the backend has a verified viewport read (fm_backend_visible_capture_supported), as the composer check already does; other backends keep their bounded history capture.

Evidence

  • Captain's observation: the jump happens while the floater shows "Delivering", and only Claude's conversation moves, not the Terminal window.
  • A read-only monitor of the Firstmate pane recorded its visible text jumping back through older history, up to Claude Code's start banner, and returning to the identical view five times in about nine seconds.
  • On the idle Firstmate pane, pane read --source recent --lines 200 took about 0.5 s and returned 200 rows (viewport 59), while --source visible returns at once.
  • The held Right Option and Right Command keys send nothing to the pane: Terminal.app's flagsChanged: only updates the mouse cursor.

Tests

  • New test_desk_voice_send_reads_only_the_visible_screen in tests/fm-deepgram-desk.test.sh asserts that a send past a Claude draft and a send that meets a dialog make no --lines history read; it fails on the previous code and passes now.
  • The rest of tests/fm-deepgram-desk.test.sh passes; its floater Swift tests cannot build on a Mac with only the command-line tools (no XCTest module), which is unrelated to this change.
  • bin/fm-lint.sh passes with the pinned ShellCheck 0.11.0 and actionlint 1.7.12.
  • The no-mistakes pipeline passed intent, rebase, review, test and document; its lint step could not run because ShellCheck was not installed for the pipeline, and its push was refused, so this PR is opened from a fork.

Out of scope

The shared Herdr submit core's rendered busy-footer read and the watcher's busy check still use the history capture; they run only while the agent is not idle, apart from the submit core's last-retry check.

The send path's selection-dialog, chat-box and stash checks read the pane
with a history capture. On herdr, a line-counted read of an idle Claude
pane makes herdr scroll Claude's conversation up to collect its history
and back, which shows as the chat jumping while a voice or dictated
message is delivered. Those checks now read only the visible screen
wherever the backend has a verified viewport read, as the composer check
already does.
@Amplify-Logic

Copy link
Copy Markdown
Owner

Thanks Luc! This landed as #270 through the no-mistakes pipeline, with your commit and authorship kept. Closing this one in favour of it.

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