Repository navigation
fix: exact session target in CreateWindow, shared key replay, sorted validate - #31
Merged
Merged
Conversation
…validate - CreateWindow targets "=SESSION:" like every other session target. tmux fell back to prefix matching, so a missing session resolved to a longer-named one and the window landed there. An integration test pins it against a real server. - The hub and editor share one batched-rune replay (replayRunes) that collects each rune's commands and stops at the rune that quits or hands off to $EDITOR. The hub used to keep replaying after a quit, so a fast "qi" imported instead of quitting. The editor's comment described the opposite of what its code did; the helper replaces both. - mox validate prints layouts via a new ListLayoutNames (sorted) instead of map order, and writes through the command's output writer so it can be tested.
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.
Summary
Three consistency fixes, each with a test.
Exact session target in
CreateWindowCreateWindowtargetedSESSION:while every other session target uses the=exact-match prefix. Without it tmux falls back to prefix matching, so a missing session resolves to a longer-named one and the window lands there. It now targets=SESSION:.TestCreateWindowExactSessionMatchfails on the old code and passes on the new. I also re-drove the multi-window build andmox new -wwith the built binary on an isolated tmux server, with a decoy session holding a longer name:Shared key-repeat replay
The hub and the editor each had their own loop for splitting batched runes, and they disagreed. The hub kept replaying after a quit, so a fast
qion a tmux-only session imported it instead of quitting. The editor stopped correctly, but its comment said the rest of the batch replayed.Both now use
replayRunesinpicker_ui.go. It collects each rune's commands and stops at the rune that quits or suspends for$EDITOR. Both models expose that throughquit()/isLeaving().Sorted layouts in
mox validateLayouts printed in map order, so the listing changed between runs. They now go through a new
ListLayoutNames()like sessions do.runValidatewrites throughcmd.OutOrStdout()so the order is testable.go test -race ./...,make integration(isolated server), and golangci-lint v2.12.2 are clean. Changelog updated under[Unreleased].