Repository navigation
fix(herdr): recognize queued-message hint and use unwrapped captures in composer_state - #22
Merged
Merged
Conversation
…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.
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.
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):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.shnow recognizes the queued-message hint text as a built-in, always-on empty-composer signal (same treatment as the❯/›agent glyphs), andfm_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_stateneeded 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_statenow captures with--source recent-unwrappedinstead 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/_ansigained an optional[source]argument defaulting to the priorrecent, so every other caller (fm-peek,fm-watch, etc.) is unaffected.Verified:
bin/fm-lint.shclean (pinned ShellCheck 0.11.0), fulltests/*.test.shsuite green except one pre-existing, unrelated flake (fm-afk-launch.test.sh's signal-handling test, confirmed present on unmodifiedfork/maintoo).Upstream note:
kunchenguid/firstmate'smainhas 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.