feat: live statusline via shepherd watch - #11
Merged
Conversation
jwarykowski
force-pushed
the
feat/project-and-global-view
branch
from
July 24, 2026 11:38
cc97697 to
d65d97a
Compare
jwarykowski
force-pushed
the
feat/watch-statusline
branch
from
July 24, 2026 11:41
87aad30 to
e7b6183
Compare
Opt-in config.watch streams `shepherd watch` (NDJSON, board-scoped) and refreshes counts on every change, so TUI/external edits update the statusline without waiting for FocusGained. Re-scopes on board switch; stops on VimLeavePre.
jwarykowski
force-pushed
the
feat/watch-statusline
branch
from
July 24, 2026 12:30
e7b6183 to
fcabefb
Compare
The on_exit closure cleared the shared watch_job unconditionally. A restart kills the old job, starts the new one, and the old job's exit callback then lands and nils out the *new* handle — so a second board switch never restarted the stream (the statusline kept watching the previous board and served a stale count), and VimLeavePre saw no handle to kill, orphaning `shepherd watch` on every exit. Compare identities before clearing, and report a nonzero exit of the current job — an older shepherd without the `watch` verb used to fail silently.
Live counts are what a statusline is for; opt-in meant most installs sat on FocusGained-only refreshes without knowing there was anything better. Gated on `vim.fn.executable`, because on by default a missing binary would otherwise throw ENOENT out of setup() on every startup instead of staying a `:checkhealth` problem.
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.
Opt-in
config.watch = truestreamsshepherd watch(NDJSON, board-scoped) and refreshes the statusline counts on every board change — from the TUI or another process — instead of only onFocusGained.VimLeavePre.false(no background process unless asked).