Repository navigation
fix(status): a finish in the pane herdr has in front reads DONE, not READY - #64
Merged
Merged
Conversation
…READY herdr reports an agent that finishes in its focused pane as idle, and the completion tracker took that static focus as "seen". The web UI never moves herdr's focus, so the pane the terminal last had in front stayed focused while the user worked from a browser or phone: every finish there read READY and sent no alert. A finish now reads done until the pane works again or a pane.focused event brings it to the front (a separate subscription, so an older herdr refusing it cannot cost pane exits). With focus no longer asked at finish time, the tracker is synchronous. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[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.
Problem
Some sessions showed READY after their agent finished, instead of DONE, and sent no push alert.
herdr reports a finish as
doneonly in panes it does not have focused; in its focused pane it reportsidle.CompletionTrackertreated that static focus as "someone saw it". But the web UI never moves herdr's focus, so the pane the herdr terminal last had in front stays focused while the user works from a browser or phone. Every finish in that pane read READY and pushed nothing.Seen live: herdr focus sat on
w1C7:p1(claude, idle) while the user drove another pane from the web.Fix
server/completion.ts: an idle after work readsdonewhatever the focus flag says. It clears when the pane works again, or when focus moves onto it (seen).observeno longer asks herdr for focus at finish time, so it is synchronous and the stale-result sequencing is gone.server/collector.ts: subscribes topane.focusedon its own connection, so an older herdr refusing it cannot cost pane-exit events. Live-checked on herdr 0.9.0 (test session): a workspace or tab switch sendspane_focusedfor its pane too.server/index.ts: on focus of a finished pane, broadcastsidleand feeds push.Tradeoff
Someone watching the herdr terminal with that pane already in front now sees DONE in the web UI, and gets an alert when its agent finishes. It stays DONE until focus leaves and comes back, or the agent works again.
Not covered
donesurvives restarts. Separate change.server/ships in it).Tests
bun run typecheckpasses;bun test397/397.done, a focused snapshot keeps itdone,seenclears it), andparseFocusFrameagainst the live frame.pane.focus→ collectoronFocusfires with that pane.🤖 Generated with Claude Code