Repository navigation
fix: settle after fm-send text submits - #88
Merged
Merged
Conversation
A successful text send only proves the composer cleared - the Enter landed and the text was submitted - but the harness needs a beat to spin up the turn before its busy footer appears. An immediate peek after fm-send returns would see the stale idle pane. Add a fixed FM_SEND_SETTLE pause (default 1s, 0 disables) on the successful text-submit path only. Scoped to fm-send's text path: not the --key path, and not the shared fm_tmux_submit_core, so the away-mode daemon (which only needs 'submitted') never pays it. Purely additive; exit codes unchanged.
leo1oel
added a commit
to leo1oel/nemo
that referenced
this pull request
Jun 26, 2026
…unchenguid#83) (#6) Port two functional upstream fixes, adapted to the herdr/Claude-only fork. kunchenguid#88 fm-send settle: after a successful text submit, pause FM_SEND_SETTLE seconds (default 1, 0 disables) before returning. A cleared composer only proves the text was submitted; the harness needs a beat to spin up the turn before its busy footer appears, so an immediate peek would otherwise see the stale idle pane (the fm-send false-positive symptom). Scoped to the text path only; the shared submit core the away-mode daemon uses never pays it. kunchenguid#83 worktree-tangle guard: firstmate is a git repo of itself (secondmate homes and self-on-self crewmate worktrees are linked herdr worktrees of FM_ROOT), so a crewmate can branch/commit in the PRIMARY checkout instead of its isolated worktree, stranding the primary on a feature branch. - bin/fm-tangle-lib.sh: pure-git classifier (named non-default branch in the primary is the tangle; default branch and detached HEAD stay silent). - fm-guard.sh: bordered ●-marked alarm on the next fleet action, checked first and independent of in-flight tasks. - fm-spawn.sh: refuse to launch unless the opened worktree is a genuine isolated worktree root distinct from the primary checkout. - fm-brief.sh: ship briefs open with a worktree-isolation assertion before the branch step. - AGENTS.md sections 7/8/11 document both guards. - tests/fm-tangle-guard.test.sh (new) covers lib classification, the guard banner, brief assertion ordering, and the spawn abort; fm-wake-queue guard tests pin FM_ROOT so the ambient feature-branch checkout cannot leak a banner.
|
Closing as superseded by #89, which merged and shipped the same locale-flag behavior on #89 also preserves decorative |
This was referenced Aug 9, 2026
This was referenced Oct 7, 2026
fritznoff
pushed a commit
to fritznoff/starship
that referenced
this pull request
Nov 2, 2026
…oll (kunchenguid#88) iOS Safari treats capture=environment as camera-only, hiding Photo Library. Co-authored-by: Cursor <[email protected]>
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
Add a tunable fixed pause to bin/fm-send.sh after a text message is successfully submitted, so the receiving crewmate's turn has time to visibly start before fm-send returns.
The bug: fm-send's success only proves the composer cleared - the Enter landed and the text was submitted - but the harness then takes a beat to spin up the turn before its busy footer appears. So an immediate peek after fm-send returns sees the stale 'before' (idle) pane, and firstmate has to peek a second time to catch the crewmate actually working. A small fixed pause after submit covers this in the common case.
The fix is deliberately a fixed pause, NOT a busy-poll. On the successful text-submit path only (after fm_tmux_submit_core returns and the verdict is NOT pending/send-failed), it runs: [ "${FM_SEND_SETTLE:-1}" = 0 ] || sleep "${FM_SEND_SETTLE:-1}". Default is 1 second; FM_SEND_SETTLE=0 disables the pause entirely (sleep is never invoked, so the disable is exact).
Deliberate scoping decisions (intentional, not oversights): the pause is confined to fm-send.sh's text-message submit path only. It is intentionally NOT added to the --key path, and intentionally NOT added to the shared fm_tmux_submit_core / bin/fm-tmux-lib.sh, because the away-mode daemon (fm-supervise-daemon.sh) sources that lib and only needs 'submitted' - it must not pay the pause. The change is purely additive: existing submit/verify logic and exit codes are unchanged.
FM_SEND_SETTLE is documented in the fm-send.sh header comment alongside FM_SEND_RETRIES/FM_SEND_SLEEP, with a one-line note on why it exists. A new hermetic test, tests/fm-send-settle.test.sh, stubs tmux and sleep (no real agent) to verify: a successful send pauses for the FM_SEND_SETTLE value (default 1), FM_SEND_SETTLE=0 produces no pause, the pause is tunable, and the --key path never pauses.
Hard constraint: the hardened supervision backbone (bin/fm-watch.sh, bin/fm-watch-arm.sh, bin/fm-wake-lib.sh, bin/fm-supervise-daemon.sh, bin/fm-tmux-lib.sh, and the afk skill) must remain untouched by this change.
What Changed
FM_SEND_SETTLEpause after successfulfm-sendtext-message submits so immediate follow-up peeks can observe the receiving turn starting.--keysends and shared tmux submit helpers, preserving existing submit verdicts and exit behavior.Risk Assessment
✅ Low: Captain, the change is narrow, scoped to fm-send's successful text-submit path, leaves the shared tmux submit core untouched, and the added test coverage matches the intended behavior well enough for a low-risk merge.
Testing
No prior baseline command was provided; I inspected the two-file diff, ran the targeted settle test and the existing daemon/shared-submit regression test, generated a CLI transcript showing recorded sleep calls, and confirmed the worktree stayed clean. All exercised behavior passed; no UI screenshot was applicable because this is a shell CLI change.
Evidence: fm-send settle behavior transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
git diff --name-only 10850ad9430ecf12d7b6b556867beda7007985e8..a7fcb1dfebc45538c148d9c73e9892f4016f16f3bash tests/fm-send-settle.test.shbash tests/fm-daemon.test.shManual hermetic CLI check with faketmuxand fakesleep:bin/fm-send.sh sess:win 'hello captain',FM_SEND_SETTLE=0 bin/fm-send.sh sess:win 'hello captain',FM_SEND_SETTLE=2 bin/fm-send.sh sess:win 'hello captain', andbin/fm-send.sh sess:win --key Escape, recorded in the evidence transcript.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.