Repository navigation
Add watch keys to switch the inner target - #14
Merged
Merged
Conversation
While watching, `j` reruns on JavaScript, `l` on Erlang and `k` toggles
between the two. The watcher already passed `--target` to every inner
run explicitly and read nothing target-specific back, so the target
becomes loop state: `inner_args` is split into `parse_watch_args` and
`build_inner` (and kept as their composition for the existing tests),
and `wait_for_change` returns the target the next cycle should use. The
run banner names the target and the status line lists the keys.
On the JavaScript host the keys are single keypresses through the
existing key worker (commands 4/5/6). The Erlang host gains a real key
channel for them: the line-based quit listener now knows the watcher's
pid and posts `{vouch_watch_key, N}` for `j`/`l`/`k` + Enter, which
`take_pending_key/0` drains with a zero-timeout receive, so on the BEAM
they work like `q` + Enter does.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
richardcocks
force-pushed
the
watch-target-keys
branch
from
August 22, 2026 12:37
126ebb3 to
2d23872
Compare
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.
While watching,
jreruns on JavaScript,lon Erlang andktoggles between the two. The watcher already passed--targetto every inner run explicitly and read nothing target-specific back, so the target becomes loop state:inner_argsis split intoparse_watch_argsandbuild_inner(and kept as their composition for the existing tests), andwait_for_changereturns the target the next cycle should use. The run banner names the target and the status line lists the keys.On the JavaScript host the keys are single keypresses through the existing key worker (commands 4/5/6). The Erlang host gains a real key channel for them: the line-based quit listener now knows the watcher's pid and posts
{vouch_watch_key, N}forj/l/k+ Enter, whichtake_pending_key/0drains with a zero-timeout receive, so on the BEAM they work likeq+ Enter does.