Skip to content

fix(herdr): recognize queued-message hint and use unwrapped captures in composer_state - #22

Merged
Bre77 merged 1 commit into
mainfrom
fm/fm-send-queued-false-negative-p3
Jul 16, 2026
Merged

Bre77 merged 1 commit into
mainfrom
fm/fm-send-queued-false-negative-p3

Conversation

@Bre77

@Bre77 Bre77 commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Intent

fm-send's submit verification was reporting a false "Enter swallowed" failure on herdr for two distinct, real submits, both observed 2026-07-16 (claude crews, herdr backend):

  • Steering a busy claude pane: the pane accepted the text as a QUEUED message and cleared its composer, but showed a "Press up to edit queued messages" hint that the classifier read as unsubmitted composer text.
  • A very narrow pane: the message visibly landed and processing began, but composer verification broke anyway.

Neither incident's raw pane bytes were captured, so both fixes are reasoned from the reported symptoms plus the existing verified composer-classification design (documented candidly in docs/herdr-backend.md's new incident entry, including where the new test fixtures are a plausible reconstruction rather than a verified real capture).

Fixes, both in the composer-state classifier path:

  • bin/fm-composer-lib.sh now recognizes the queued-message hint text as a built-in, always-on empty-composer signal (same treatment as the ❯/› agent glyphs), and fm_backend_herdr_composer_state's structural row scan (bin/backends/herdr.sh) accepts a standalone hint row with no leading prompt glyph. fm_tmux_composer_state needed no change - it already routes through the same shared classifier and only ever reads the single row at tmux's own cursor position.
  • fm_backend_herdr_composer_state now captures with --source recent-unwrapped instead of the width-dependent --source recent, verified live (herdr 0.7.3) to return full logical lines regardless of terminal width. Scoped narrowly: fm_backend_herdr_capture/_ansi gained an optional [source] argument defaulting to the prior recent, so every other caller (fm-peek, fm-watch, etc.) is unaffected.

Verified: bin/fm-lint.sh clean (pinned ShellCheck 0.11.0), full tests/*.test.sh suite green except one pre-existing, unrelated flake (fm-afk-launch.test.sh's signal-handling test, confirmed present on unmodified fork/main too).

Upstream note: kunchenguid/firstmate's main has diverged enough on these files (it carries Pi-specific composer support fork/main lacks, while lacking a gray-ghost SGR-90 fix fork/main already has) that I can't call this the same bug verbatim, but the same underlying gap - no queued-message-hint recognition, width-dependent capture - is plausible there too. Leaving upstreaming as a separate captain call rather than opening an upstream PR, per this task's fork-only scope.

…r composer_state

A busy claude pane accepting a steer as a queued message, or a narrow pane's
word-wrap, could make fm_backend_herdr_composer_state misread a genuinely
landed submit as unsubmitted composer text, causing fm-send to report a
false "Enter swallowed" failure.
@Bre77
Bre77 merged commit c4debda into main Jul 16, 2026
5 checks passed
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