feat(palette): rename command shortcodes
- commit
- e5a7ffcac8976e713cb9dd1e642abe110be317db
- author
- brice · · 2026-08-11 04:32 UTC
- parent
- 80c61e3
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
9 files · +58 -58
M README.md +1 -1
| @@ -65,7 +65,7 @@ No prefix key; everything is Alt. | |||
| 65 | 65 | | Alt+h/j/k/l, Alt+Arrow | focus pane | | |
| 66 | 66 | | Alt+a | jump to a session needing attention | | |
| 67 | 67 | ||
| 68 | - | The palette does the rest: type a short code (`SPR` split right, `CNT` new tab, `SSP` session picker, ...) or fuzzy-search the command list. `MPN` (`Move pane to tab`) and `MTB` (`Move tab to session`) open live-destination pickers; the unbound pane consume/expel actions are discoverable there as `CEL` and `CER`. Named active and stopped sessions are fuzzy-searchable for navigation, and selecting a stopped session resumes it. Scroll up with the mouse to enter scrollback; vim keys move, `v` selects, `y` copies via OSC 52. | |
| 68 | + | The palette does the rest: type a short code (`SPR` split right, `CNT` new tab, `SSP` session picker, ...) or fuzzy-search the command list. `MFP` (`Move pane to tab`) and `MAT` (`Move tab to session`) open live-destination pickers; the unbound pane consume/expel actions are discoverable there as `MPL` and `MPR`. Named active and stopped sessions are fuzzy-searchable for navigation, and selecting a stopped session resumes it. Scroll up with the mouse to enter scrollback; vim keys move, `v` selects, `y` copies via OSC 52. | |
| 69 | 69 | ||
| 70 | 70 | ## Remote attach | |
| 71 | 71 | ||
| @@ -65,7 +65,7 @@ No prefix key; everything is Alt. | |||||
| 65 | | Alt+h/j/k/l, Alt+Arrow | focus pane | | 65 | | Alt+h/j/k/l, Alt+Arrow | focus pane | | ||
| 66 | | Alt+a | jump to a session needing attention | | 66 | | Alt+a | jump to a session needing attention | | ||
| 67 | 67 | ||||
| 68 | - | The palette does the rest: type a short code (`SPR` split right, `CNT` new tab, `SSP` session picker, ...) or fuzzy-search the command list. `MPN` (`Move pane to tab`) and `MTB` (`Move tab to session`) open live-destination pickers; the unbound pane consume/expel actions are discoverable there as `CEL` and `CER`. Named active and stopped sessions are fuzzy-searchable for navigation, and selecting a stopped session resumes it. Scroll up with the mouse to enter scrollback; vim keys move, `v` selects, `y` copies via OSC 52. | 68 | + | The palette does the rest: type a short code (`SPR` split right, `CNT` new tab, `SSP` session picker, ...) or fuzzy-search the command list. `MFP` (`Move pane to tab`) and `MAT` (`Move tab to session`) open live-destination pickers; the unbound pane consume/expel actions are discoverable there as `MPL` and `MPR`. Named active and stopped sessions are fuzzy-searchable for navigation, and selecting a stopped session resumes it. Scroll up with the mouse to enter scrollback; vim keys move, `v` selects, `y` copies via OSC 52. |
| 69 | 69 | ||||
| 70 | ## Remote attach | 70 | ## Remote attach | ||
| 71 | 71 | ||||
M docs/configuration.md +7 -7
| @@ -56,22 +56,22 @@ code.split-right = SPR | |||
| 56 | 56 | code.split-left = SPL | |
| 57 | 57 | code.split-up = SPU | |
| 58 | 58 | code.split-down = SPD | |
| 59 | - | code.consume-or-expel-pane-left = CEL | |
| 60 | - | code.consume-or-expel-pane-right = CER | |
| 59 | + | code.consume-or-expel-pane-left = MPL | |
| 60 | + | code.consume-or-expel-pane-right = MPR | |
| 61 | 61 | code.stack-pane = STP | |
| 62 | - | code.toggle-stack = TST | |
| 63 | - | code.close-pane = CLP | |
| 62 | + | code.toggle-stack = TFS | |
| 63 | + | code.close-pane = CFP | |
| 64 | 64 | code.focus-pane-left = FPL | |
| 65 | 65 | code.focus-pane-right = FPR | |
| 66 | 66 | code.focus-pane-up = FPU | |
| 67 | 67 | code.focus-pane-down = FPD | |
| 68 | 68 | code.next-tab = NXT | |
| 69 | 69 | code.previous-tab = PVT | |
| 70 | - | code.back-session = BSK | |
| 70 | + | code.back-session = BCK | |
| 71 | 71 | code.jump-recent-session = JRS | |
| 72 | 72 | code.session-picker = SSP | |
| 73 | 73 | code.visual-mode = VIS | |
| 74 | - | code.toggle-floating-pane = FLT | |
| 74 | + | code.toggle-floating-pane = TFP | |
| 75 | 75 | code.rename-session = RNS | |
| 76 | 76 | code.rename-tab = RNT | |
| 77 | 77 | code.detach = DET | |
| @@ -113,7 +113,7 @@ Key specs: `alt+<char>`, `alt+space`, `alt+left/right/up/down`, `alt+1` through | |||
| 113 | 113 | ||
| 114 | 114 | ## Pane consume or expel | |
| 115 | 115 | ||
| 116 | - | The `consume-or-expel-pane-left` and `consume-or-expel-pane-right` actions are unbound by default; the commented Alt+H/Alt+L bindings above are optional examples. Use palette codes `CEL` and `CER`, or script them as `vev cmd consume-or-expel-pane-left` and `vev cmd consume-or-expel-pane-right`. | |
| 116 | + | The `consume-or-expel-pane-left` and `consume-or-expel-pane-right` actions are unbound by default; the commented Alt+H/Alt+L bindings above are optional examples. Use palette codes `MPL` and `MPR`, or script them as `vev cmd consume-or-expel-pane-left` and `vev cmd consume-or-expel-pane-right`. | |
| 117 | 117 | ||
| 118 | 118 | A singleton pane moves into the immediate column on the requested side; at the outer edge, nothing changes. A pane in a multi-member vertical or stack column moves out as an adjacent singleton column. This works only with canonical column layouts: one column, or a top-level horizontal split of columns, where each column is a singleton pane, a vertical split of panes, or a pane stack. Nested mixed splits are unsupported. | |
| 119 | 119 | ||
| @@ -56,22 +56,22 @@ code.split-right = SPR | |||||
| 56 | code.split-left = SPL | 56 | code.split-left = SPL | ||
| 57 | code.split-up = SPU | 57 | code.split-up = SPU | ||
| 58 | code.split-down = SPD | 58 | code.split-down = SPD | ||
| 59 | - | code.consume-or-expel-pane-left = CEL | 59 | + | code.consume-or-expel-pane-left = MPL |
| 60 | - | code.consume-or-expel-pane-right = CER | 60 | + | code.consume-or-expel-pane-right = MPR |
| 61 | code.stack-pane = STP | 61 | code.stack-pane = STP | ||
| 62 | - | code.toggle-stack = TST | 62 | + | code.toggle-stack = TFS |
| 63 | - | code.close-pane = CLP | 63 | + | code.close-pane = CFP |
| 64 | code.focus-pane-left = FPL | 64 | code.focus-pane-left = FPL | ||
| 65 | code.focus-pane-right = FPR | 65 | code.focus-pane-right = FPR | ||
| 66 | code.focus-pane-up = FPU | 66 | code.focus-pane-up = FPU | ||
| 67 | code.focus-pane-down = FPD | 67 | code.focus-pane-down = FPD | ||
| 68 | code.next-tab = NXT | 68 | code.next-tab = NXT | ||
| 69 | code.previous-tab = PVT | 69 | code.previous-tab = PVT | ||
| 70 | - | code.back-session = BSK | 70 | + | code.back-session = BCK |
| 71 | code.jump-recent-session = JRS | 71 | code.jump-recent-session = JRS | ||
| 72 | code.session-picker = SSP | 72 | code.session-picker = SSP | ||
| 73 | code.visual-mode = VIS | 73 | code.visual-mode = VIS | ||
| 74 | - | code.toggle-floating-pane = FLT | 74 | + | code.toggle-floating-pane = TFP |
| 75 | code.rename-session = RNS | 75 | code.rename-session = RNS | ||
| 76 | code.rename-tab = RNT | 76 | code.rename-tab = RNT | ||
| 77 | code.detach = DET | 77 | code.detach = DET | ||
| @@ -113,7 +113,7 @@ Key specs: `alt+<char>`, `alt+space`, `alt+left/right/up/down`, `alt+1` through | |||||
| 113 | 113 | ||||
| 114 | ## Pane consume or expel | 114 | ## Pane consume or expel | ||
| 115 | 115 | ||||
| 116 | - | The `consume-or-expel-pane-left` and `consume-or-expel-pane-right` actions are unbound by default; the commented Alt+H/Alt+L bindings above are optional examples. Use palette codes `CEL` and `CER`, or script them as `vev cmd consume-or-expel-pane-left` and `vev cmd consume-or-expel-pane-right`. | 116 | + | The `consume-or-expel-pane-left` and `consume-or-expel-pane-right` actions are unbound by default; the commented Alt+H/Alt+L bindings above are optional examples. Use palette codes `MPL` and `MPR`, or script them as `vev cmd consume-or-expel-pane-left` and `vev cmd consume-or-expel-pane-right`. |
| 117 | 117 | ||||
| 118 | A singleton pane moves into the immediate column on the requested side; at the outer edge, nothing changes. A pane in a multi-member vertical or stack column moves out as an adjacent singleton column. This works only with canonical column layouts: one column, or a top-level horizontal split of columns, where each column is a singleton pane, a vertical split of panes, or a pane stack. Nested mixed splits are unsupported. | 118 | A singleton pane moves into the immediate column on the requested side; at the outer edge, nothing changes. A pane in a multi-member vertical or stack column moves out as an adjacent singleton column. This works only with canonical column layouts: one column, or a top-level horizontal split of columns, where each column is a singleton pane, a vertical split of panes, or a pane stack. Nested mixed splits are unsupported. | ||
| 119 | 119 | ||||
M docs/remote-resilience.md +1 -1
| @@ -30,7 +30,7 @@ PTYs, rendering, input, resize, effects, and teardown. The client does not | |||
| 30 | 30 | proxy remote content through the local daemon. A single client process keeps a | |
| 31 | 31 | bounded, in-memory route history across local, direct remote, and picker- | |
| 32 | 32 | discovered attachments. The daemon renders the latest attachment snapshot; | |
| 33 | - | active routes are metadata-only, while `JRS` and `BSK` send typed key/generation | |
| 33 | + | active routes are metadata-only, while `JRS` and `BCK` send typed key/generation | |
| 34 | 34 | actions back to the client. History is process-local and is not persisted or | |
| 35 | 35 | shared between clients. | |
| 36 | 36 | ||
| @@ -30,7 +30,7 @@ PTYs, rendering, input, resize, effects, and teardown. The client does not | |||||
| 30 | proxy remote content through the local daemon. A single client process keeps a | 30 | proxy remote content through the local daemon. A single client process keeps a | ||
| 31 | bounded, in-memory route history across local, direct remote, and picker- | 31 | bounded, in-memory route history across local, direct remote, and picker- | ||
| 32 | discovered attachments. The daemon renders the latest attachment snapshot; | 32 | discovered attachments. The daemon renders the latest attachment snapshot; | ||
| 33 | - | active routes are metadata-only, while `JRS` and `BSK` send typed key/generation | 33 | + | active routes are metadata-only, while `JRS` and `BCK` send typed key/generation |
| 34 | actions back to the client. History is process-local and is not persisted or | 34 | actions back to the client. History is process-local and is not persisted or | ||
| 35 | shared between clients. | 35 | shared between clients. | ||
| 36 | 36 | ||||
M internal/app/cmd_test.go +2 -2
| @@ -116,8 +116,8 @@ func TestMoveCommandHelpUsesExactUsages(t *testing.T) { | |||
| 116 | 116 | for _, tt := range []struct { | |
| 117 | 117 | slug, usage, desc string | |
| 118 | 118 | }{ | |
| 119 | - | {"move-pane", "move-pane <destination-session> <destination-tab-id>", "Move the focused pane to another live tab"}, | |
| 120 | - | {"move-tab", "move-tab <destination-session>", "Move the active tab to another live session"}, | |
| 119 | + | {"move-pane", "move-pane <destination-session> <destination-tab-id>", "Move focused pane to tab"}, | |
| 120 | + | {"move-tab", "move-tab <destination-session>", "Move active tab to session"}, | |
| 121 | 121 | } { | |
| 122 | 122 | t.Run(tt.slug, func(t *testing.T) { | |
| 123 | 123 | got := cmdHelp(cmdInvocation{slug: tt.slug}) | |
| @@ -116,8 +116,8 @@ func TestMoveCommandHelpUsesExactUsages(t *testing.T) { | |||||
| 116 | for _, tt := range []struct { | 116 | for _, tt := range []struct { | ||
| 117 | slug, usage, desc string | 117 | slug, usage, desc string | ||
| 118 | }{ | 118 | }{ | ||
| 119 | - | {"move-pane", "move-pane <destination-session> <destination-tab-id>", "Move the focused pane to another live tab"}, | 119 | + | {"move-pane", "move-pane <destination-session> <destination-tab-id>", "Move focused pane to tab"}, |
| 120 | - | {"move-tab", "move-tab <destination-session>", "Move the active tab to another live session"}, | 120 | + | {"move-tab", "move-tab <destination-session>", "Move active tab to session"}, |
| 121 | } { | 121 | } { | ||
| 122 | t.Run(tt.slug, func(t *testing.T) { | 122 | t.Run(tt.slug, func(t *testing.T) { | ||
| 123 | got := cmdHelp(cmdInvocation{slug: tt.slug}) | 123 | got := cmdHelp(cmdInvocation{slug: tt.slug}) | ||
M internal/usecase/command/registry.go +10 -10
| @@ -12,12 +12,12 @@ func Registry() []Command { | |||
| 12 | 12 | paletteControl("split-left", "SPL", "Split left", "Split the focused pane to the left", TargetPane, func(ctx Context, _ []string) error { return ctx.SplitLeft() }, func(ctx ControlContext) error { return ctx.SplitLeft() }), | |
| 13 | 13 | paletteControl("split-up", "SPU", "Split up", "Split the focused pane upward", TargetPane, func(ctx Context, _ []string) error { return ctx.SplitUp() }, func(ctx ControlContext) error { return ctx.SplitUp() }), | |
| 14 | 14 | paletteControl("split-down", "SPD", "Split down", "Split the focused pane downward", TargetPane, func(ctx Context, _ []string) error { return ctx.SplitDown() }, func(ctx ControlContext) error { return ctx.SplitDown() }), | |
| 15 | - | paletteControl("consume-or-expel-pane-left", "CEL", "Consume or expel pane left", "Move the focused pane into or out of the column on the left", TargetPane, func(ctx Context, _ []string) error { return ctx.ConsumeOrExpelPaneLeft() }, func(ctx ControlContext) error { return ctx.ConsumeOrExpelPaneLeft() }), | |
| 16 | - | paletteControl("consume-or-expel-pane-right", "CER", "Consume or expel pane right", "Move the focused pane into or out of the column on the right", TargetPane, func(ctx Context, _ []string) error { return ctx.ConsumeOrExpelPaneRight() }, func(ctx ControlContext) error { return ctx.ConsumeOrExpelPaneRight() }), | |
| 15 | + | paletteControl("consume-or-expel-pane-left", "MPL", "Consume or expel pane left", "Move the focused pane left", TargetPane, func(ctx Context, _ []string) error { return ctx.ConsumeOrExpelPaneLeft() }, func(ctx ControlContext) error { return ctx.ConsumeOrExpelPaneLeft() }), | |
| 16 | + | paletteControl("consume-or-expel-pane-right", "MPR", "Consume or expel pane right", "Move the focused pane right", TargetPane, func(ctx Context, _ []string) error { return ctx.ConsumeOrExpelPaneRight() }, func(ctx ControlContext) error { return ctx.ConsumeOrExpelPaneRight() }), | |
| 17 | 17 | paletteControl("stack-pane", "STP", "Stack pane", "Create a new pane in a stack", TargetPane, func(ctx Context, _ []string) error { return ctx.StackPane() }, func(ctx ControlContext) error { return ctx.StackPane() }), | |
| 18 | - | paletteControl("toggle-stack", "TST", "Toggle stack", "Toggle the focused pane stack", TargetPane, func(ctx Context, _ []string) error { return ctx.ToggleStack() }, func(ctx ControlContext) error { return ctx.ToggleStack() }), | |
| 19 | - | paletteOnly("toggle-floating-pane", "FLT", "Toggle floating pane", "Toggle the floating pane", func(ctx Context, _ []string) error { return ctx.ToggleFloatingPane() }), | |
| 20 | - | paletteControl("close-pane", "CLP", "Close pane", "Close the focused pane", TargetPane, func(ctx Context, _ []string) error { return ctx.ClosePane() }, func(ctx ControlContext) error { return ctx.ClosePane() }), | |
| 18 | + | paletteControl("toggle-stack", "TFS", "Toggle stack", "Toggle the focused pane stack", TargetPane, func(ctx Context, _ []string) error { return ctx.ToggleStack() }, func(ctx ControlContext) error { return ctx.ToggleStack() }), | |
| 19 | + | paletteOnly("toggle-floating-pane", "TFP", "Toggle floating pane", "Toggle the floating pane", func(ctx Context, _ []string) error { return ctx.ToggleFloatingPane() }), | |
| 20 | + | paletteControl("close-pane", "CFP", "Close pane", "Close the focused pane", TargetPane, func(ctx Context, _ []string) error { return ctx.ClosePane() }, func(ctx ControlContext) error { return ctx.ClosePane() }), | |
| 21 | 21 | movePaneCommand(), | |
| 22 | 22 | moveTabCommand(), | |
| 23 | 23 | paletteControl("focus-pane-left", "FPL", "Focus pane left", "Focus the pane to the left", TargetPane, func(ctx Context, _ []string) error { return ctx.FocusPaneLeft() }, func(ctx ControlContext) error { return ctx.FocusPaneLeft() }), | |
| @@ -32,7 +32,7 @@ func Registry() []Command { | |||
| 32 | 32 | paletteControl("equalize-panes", "EQP", "Equalize panes", "Restore equal pane shares in the tab", TargetTab, func(ctx Context, _ []string) error { return ctx.EqualizePanes() }, func(ctx ControlContext) error { return ctx.EqualizePanes() }), | |
| 33 | 33 | paletteControl("next-tab", "NXT", "Next tab", "Switch to the next tab", TargetSession, func(ctx Context, _ []string) error { return ctx.NextTab() }, func(ctx ControlContext) error { return ctx.NextTab() }), | |
| 34 | 34 | paletteControl("previous-tab", "PVT", "Previous tab", "Switch to the previous tab", TargetSession, func(ctx Context, _ []string) error { return ctx.PrevTab() }, func(ctx ControlContext) error { return ctx.PrevTab() }), | |
| 35 | - | paletteOnly("back-session", "BSK", "Previous session", "Toggle the previously active session", func(ctx Context, _ []string) error { return ctx.BackSession() }), | |
| 35 | + | paletteOnly("back-session", "BCK", "Previous session", "Toggle the previously active session", func(ctx Context, _ []string) error { return ctx.BackSession() }), | |
| 36 | 36 | {Slug: "jump-recent-session", Code: "JRS", Name: "Jump to recent session", Desc: "Jump to a recent session by rank", Usage: "jump-recent-session <rank>", PaletteVisible: true, Arguments: ArgumentsRequired, ContextHint: ContextHintRecentSessions, Run: func(ctx Context, args []string) error { | |
| 37 | 37 | rank, err := ParsePositiveDecimal(args) | |
| 38 | 38 | if err != nil { | |
| @@ -83,8 +83,8 @@ func paletteControlOne(slug, code, name, desc string, target TargetKind, run fun | |||
| 83 | 83 | ||
| 84 | 84 | func movePaneCommand() Command { | |
| 85 | 85 | return Command{ | |
| 86 | - | Slug: "move-pane", Code: "MPN", Name: "Move pane to tab", | |
| 87 | - | Desc: "Move the focused pane to another live tab", Usage: "move-pane <destination-session> <destination-tab-id>", | |
| 86 | + | Slug: "move-pane", Code: "MFP", Name: "Move pane to tab", | |
| 87 | + | Desc: "Move focused pane to tab", Usage: "move-pane <destination-session> <destination-tab-id>", | |
| 88 | 88 | PaletteVisible: true, Scriptable: true, Target: TargetPane, Scope: CommandScopeCrossSession, | |
| 89 | 89 | Run: func(ctx Context, _ []string) error { return ctx.OpenMovePanePicker() }, | |
| 90 | 90 | Control: func(ctx ControlContext, args []string, _ ControlOptions) (ControlResult, error) { | |
| @@ -98,8 +98,8 @@ func movePaneCommand() Command { | |||
| 98 | 98 | ||
| 99 | 99 | func moveTabCommand() Command { | |
| 100 | 100 | return Command{ | |
| 101 | - | Slug: "move-tab", Code: "MTB", Name: "Move tab to session", | |
| 102 | - | Desc: "Move the active tab to another live session", Usage: "move-tab <destination-session>", | |
| 101 | + | Slug: "move-tab", Code: "MAT", Name: "Move tab to session", | |
| 102 | + | Desc: "Move active tab to session", Usage: "move-tab <destination-session>", | |
| 103 | 103 | PaletteVisible: true, Scriptable: true, Target: TargetTab, Scope: CommandScopeCrossSession, | |
| 104 | 104 | Run: func(ctx Context, _ []string) error { return ctx.OpenMoveTabPicker() }, | |
| 105 | 105 | Control: func(ctx ControlContext, args []string, _ ControlOptions) (ControlResult, error) { | |
| @@ -12,12 +12,12 @@ func Registry() []Command { | |||||
| 12 | paletteControl("split-left", "SPL", "Split left", "Split the focused pane to the left", TargetPane, func(ctx Context, _ []string) error { return ctx.SplitLeft() }, func(ctx ControlContext) error { return ctx.SplitLeft() }), | 12 | paletteControl("split-left", "SPL", "Split left", "Split the focused pane to the left", TargetPane, func(ctx Context, _ []string) error { return ctx.SplitLeft() }, func(ctx ControlContext) error { return ctx.SplitLeft() }), | ||
| 13 | paletteControl("split-up", "SPU", "Split up", "Split the focused pane upward", TargetPane, func(ctx Context, _ []string) error { return ctx.SplitUp() }, func(ctx ControlContext) error { return ctx.SplitUp() }), | 13 | paletteControl("split-up", "SPU", "Split up", "Split the focused pane upward", TargetPane, func(ctx Context, _ []string) error { return ctx.SplitUp() }, func(ctx ControlContext) error { return ctx.SplitUp() }), | ||
| 14 | paletteControl("split-down", "SPD", "Split down", "Split the focused pane downward", TargetPane, func(ctx Context, _ []string) error { return ctx.SplitDown() }, func(ctx ControlContext) error { return ctx.SplitDown() }), | 14 | paletteControl("split-down", "SPD", "Split down", "Split the focused pane downward", TargetPane, func(ctx Context, _ []string) error { return ctx.SplitDown() }, func(ctx ControlContext) error { return ctx.SplitDown() }), | ||
| 15 | - | paletteControl("consume-or-expel-pane-left", "CEL", "Consume or expel pane left", "Move the focused pane into or out of the column on the left", TargetPane, func(ctx Context, _ []string) error { return ctx.ConsumeOrExpelPaneLeft() }, func(ctx ControlContext) error { return ctx.ConsumeOrExpelPaneLeft() }), | 15 | + | paletteControl("consume-or-expel-pane-left", "MPL", "Consume or expel pane left", "Move the focused pane left", TargetPane, func(ctx Context, _ []string) error { return ctx.ConsumeOrExpelPaneLeft() }, func(ctx ControlContext) error { return ctx.ConsumeOrExpelPaneLeft() }), |
| 16 | - | paletteControl("consume-or-expel-pane-right", "CER", "Consume or expel pane right", "Move the focused pane into or out of the column on the right", TargetPane, func(ctx Context, _ []string) error { return ctx.ConsumeOrExpelPaneRight() }, func(ctx ControlContext) error { return ctx.ConsumeOrExpelPaneRight() }), | 16 | + | paletteControl("consume-or-expel-pane-right", "MPR", "Consume or expel pane right", "Move the focused pane right", TargetPane, func(ctx Context, _ []string) error { return ctx.ConsumeOrExpelPaneRight() }, func(ctx ControlContext) error { return ctx.ConsumeOrExpelPaneRight() }), |
| 17 | paletteControl("stack-pane", "STP", "Stack pane", "Create a new pane in a stack", TargetPane, func(ctx Context, _ []string) error { return ctx.StackPane() }, func(ctx ControlContext) error { return ctx.StackPane() }), | 17 | paletteControl("stack-pane", "STP", "Stack pane", "Create a new pane in a stack", TargetPane, func(ctx Context, _ []string) error { return ctx.StackPane() }, func(ctx ControlContext) error { return ctx.StackPane() }), | ||
| 18 | - | paletteControl("toggle-stack", "TST", "Toggle stack", "Toggle the focused pane stack", TargetPane, func(ctx Context, _ []string) error { return ctx.ToggleStack() }, func(ctx ControlContext) error { return ctx.ToggleStack() }), | 18 | + | paletteControl("toggle-stack", "TFS", "Toggle stack", "Toggle the focused pane stack", TargetPane, func(ctx Context, _ []string) error { return ctx.ToggleStack() }, func(ctx ControlContext) error { return ctx.ToggleStack() }), |
| 19 | - | paletteOnly("toggle-floating-pane", "FLT", "Toggle floating pane", "Toggle the floating pane", func(ctx Context, _ []string) error { return ctx.ToggleFloatingPane() }), | 19 | + | paletteOnly("toggle-floating-pane", "TFP", "Toggle floating pane", "Toggle the floating pane", func(ctx Context, _ []string) error { return ctx.ToggleFloatingPane() }), |
| 20 | - | paletteControl("close-pane", "CLP", "Close pane", "Close the focused pane", TargetPane, func(ctx Context, _ []string) error { return ctx.ClosePane() }, func(ctx ControlContext) error { return ctx.ClosePane() }), | 20 | + | paletteControl("close-pane", "CFP", "Close pane", "Close the focused pane", TargetPane, func(ctx Context, _ []string) error { return ctx.ClosePane() }, func(ctx ControlContext) error { return ctx.ClosePane() }), |
| 21 | movePaneCommand(), | 21 | movePaneCommand(), | ||
| 22 | moveTabCommand(), | 22 | moveTabCommand(), | ||
| 23 | paletteControl("focus-pane-left", "FPL", "Focus pane left", "Focus the pane to the left", TargetPane, func(ctx Context, _ []string) error { return ctx.FocusPaneLeft() }, func(ctx ControlContext) error { return ctx.FocusPaneLeft() }), | 23 | paletteControl("focus-pane-left", "FPL", "Focus pane left", "Focus the pane to the left", TargetPane, func(ctx Context, _ []string) error { return ctx.FocusPaneLeft() }, func(ctx ControlContext) error { return ctx.FocusPaneLeft() }), | ||
| @@ -32,7 +32,7 @@ func Registry() []Command { | |||||
| 32 | paletteControl("equalize-panes", "EQP", "Equalize panes", "Restore equal pane shares in the tab", TargetTab, func(ctx Context, _ []string) error { return ctx.EqualizePanes() }, func(ctx ControlContext) error { return ctx.EqualizePanes() }), | 32 | paletteControl("equalize-panes", "EQP", "Equalize panes", "Restore equal pane shares in the tab", TargetTab, func(ctx Context, _ []string) error { return ctx.EqualizePanes() }, func(ctx ControlContext) error { return ctx.EqualizePanes() }), | ||
| 33 | paletteControl("next-tab", "NXT", "Next tab", "Switch to the next tab", TargetSession, func(ctx Context, _ []string) error { return ctx.NextTab() }, func(ctx ControlContext) error { return ctx.NextTab() }), | 33 | paletteControl("next-tab", "NXT", "Next tab", "Switch to the next tab", TargetSession, func(ctx Context, _ []string) error { return ctx.NextTab() }, func(ctx ControlContext) error { return ctx.NextTab() }), | ||
| 34 | paletteControl("previous-tab", "PVT", "Previous tab", "Switch to the previous tab", TargetSession, func(ctx Context, _ []string) error { return ctx.PrevTab() }, func(ctx ControlContext) error { return ctx.PrevTab() }), | 34 | paletteControl("previous-tab", "PVT", "Previous tab", "Switch to the previous tab", TargetSession, func(ctx Context, _ []string) error { return ctx.PrevTab() }, func(ctx ControlContext) error { return ctx.PrevTab() }), | ||
| 35 | - | paletteOnly("back-session", "BSK", "Previous session", "Toggle the previously active session", func(ctx Context, _ []string) error { return ctx.BackSession() }), | 35 | + | paletteOnly("back-session", "BCK", "Previous session", "Toggle the previously active session", func(ctx Context, _ []string) error { return ctx.BackSession() }), |
| 36 | {Slug: "jump-recent-session", Code: "JRS", Name: "Jump to recent session", Desc: "Jump to a recent session by rank", Usage: "jump-recent-session <rank>", PaletteVisible: true, Arguments: ArgumentsRequired, ContextHint: ContextHintRecentSessions, Run: func(ctx Context, args []string) error { | 36 | {Slug: "jump-recent-session", Code: "JRS", Name: "Jump to recent session", Desc: "Jump to a recent session by rank", Usage: "jump-recent-session <rank>", PaletteVisible: true, Arguments: ArgumentsRequired, ContextHint: ContextHintRecentSessions, Run: func(ctx Context, args []string) error { | ||
| 37 | rank, err := ParsePositiveDecimal(args) | 37 | rank, err := ParsePositiveDecimal(args) | ||
| 38 | if err != nil { | 38 | if err != nil { | ||
| @@ -83,8 +83,8 @@ func paletteControlOne(slug, code, name, desc string, target TargetKind, run fun | |||||
| 83 | 83 | ||||
| 84 | func movePaneCommand() Command { | 84 | func movePaneCommand() Command { | ||
| 85 | return Command{ | 85 | return Command{ | ||
| 86 | - | Slug: "move-pane", Code: "MPN", Name: "Move pane to tab", | 86 | + | Slug: "move-pane", Code: "MFP", Name: "Move pane to tab", |
| 87 | - | Desc: "Move the focused pane to another live tab", Usage: "move-pane <destination-session> <destination-tab-id>", | 87 | + | Desc: "Move focused pane to tab", Usage: "move-pane <destination-session> <destination-tab-id>", |
| 88 | PaletteVisible: true, Scriptable: true, Target: TargetPane, Scope: CommandScopeCrossSession, | 88 | PaletteVisible: true, Scriptable: true, Target: TargetPane, Scope: CommandScopeCrossSession, | ||
| 89 | Run: func(ctx Context, _ []string) error { return ctx.OpenMovePanePicker() }, | 89 | Run: func(ctx Context, _ []string) error { return ctx.OpenMovePanePicker() }, | ||
| 90 | Control: func(ctx ControlContext, args []string, _ ControlOptions) (ControlResult, error) { | 90 | Control: func(ctx ControlContext, args []string, _ ControlOptions) (ControlResult, error) { | ||
| @@ -98,8 +98,8 @@ func movePaneCommand() Command { | |||||
| 98 | 98 | ||||
| 99 | func moveTabCommand() Command { | 99 | func moveTabCommand() Command { | ||
| 100 | return Command{ | 100 | return Command{ | ||
| 101 | - | Slug: "move-tab", Code: "MTB", Name: "Move tab to session", | 101 | + | Slug: "move-tab", Code: "MAT", Name: "Move tab to session", |
| 102 | - | Desc: "Move the active tab to another live session", Usage: "move-tab <destination-session>", | 102 | + | Desc: "Move active tab to session", Usage: "move-tab <destination-session>", |
| 103 | PaletteVisible: true, Scriptable: true, Target: TargetTab, Scope: CommandScopeCrossSession, | 103 | PaletteVisible: true, Scriptable: true, Target: TargetTab, Scope: CommandScopeCrossSession, | ||
| 104 | Run: func(ctx Context, _ []string) error { return ctx.OpenMoveTabPicker() }, | 104 | Run: func(ctx Context, _ []string) error { return ctx.OpenMoveTabPicker() }, | ||
| 105 | Control: func(ctx ControlContext, args []string, _ ControlOptions) (ControlResult, error) { | 105 | Control: func(ctx ControlContext, args []string, _ ControlOptions) (ControlResult, error) { | ||
M internal/usecase/command/registry_test.go +17 -17
| @@ -9,7 +9,7 @@ import ( | |||
| 9 | 9 | ||
| 10 | 10 | func TestRegistryCodesAndSlugsAreUniqueInOrder(t *testing.T) { | |
| 11 | 11 | commands := PaletteRegistry() | |
| 12 | - | wantCodes := []string{"CNT", "CNS", "CLT", "SPR", "SPL", "SPU", "SPD", "CEL", "CER", "STP", "TST", "FLT", "CLP", "MPN", "MTB", "FPL", "FPR", "FPU", "FPD", "RSZ", "GPW", "SPW", "GPH", "SPH", "EQP", "NXT", "PVT", "BSK", "JRS", "SSP", "NTC", "YLN", "VIS", "RNS", "RNT", "DET"} | |
| 12 | + | wantCodes := []string{"CNT", "CNS", "CLT", "SPR", "SPL", "SPU", "SPD", "MPL", "MPR", "STP", "TFS", "TFP", "CFP", "MFP", "MAT", "FPL", "FPR", "FPU", "FPD", "RSZ", "GPW", "SPW", "GPH", "SPH", "EQP", "NXT", "PVT", "BCK", "JRS", "SSP", "NTC", "YLN", "VIS", "RNS", "RNT", "DET"} | |
| 13 | 13 | ||
| 14 | 14 | if len(commands) != len(wantCodes) { | |
| 15 | 15 | t.Fatalf("Registry() returned %d commands, want %d", len(commands), len(wantCodes)) | |
| @@ -47,13 +47,13 @@ func TestMoveCommandsExposeExactRegistryContracts(t *testing.T) { | |||
| 47 | 47 | wantCall string | |
| 48 | 48 | }{ | |
| 49 | 49 | { | |
| 50 | - | code: "MPN", slug: "move-pane", name: "Move pane to tab", | |
| 51 | - | desc: "Move the focused pane to another live tab", usage: "move-pane <destination-session> <destination-tab-id>", | |
| 50 | + | code: "MFP", slug: "move-pane", name: "Move pane to tab", | |
| 51 | + | desc: "Move focused pane to tab", usage: "move-pane <destination-session> <destination-tab-id>", | |
| 52 | 52 | target: TargetPane, args: []string{"work", "t_dest"}, wantCall: "move-pane:work:t_dest", | |
| 53 | 53 | }, | |
| 54 | 54 | { | |
| 55 | - | code: "MTB", slug: "move-tab", name: "Move tab to session", | |
| 56 | - | desc: "Move the active tab to another live session", usage: "move-tab <destination-session>", | |
| 55 | + | code: "MAT", slug: "move-tab", name: "Move tab to session", | |
| 56 | + | desc: "Move active tab to session", usage: "move-tab <destination-session>", | |
| 57 | 57 | target: TargetTab, args: []string{"work"}, wantCall: "move-tab:work", | |
| 58 | 58 | }, | |
| 59 | 59 | } | |
| @@ -354,12 +354,12 @@ func (s *controlSpy) RemoteCatalog(json bool) (string, error) { | |||
| 354 | 354 | } | |
| 355 | 355 | ||
| 356 | 356 | func TestRegistryIncludesFloatingPaneToggle(t *testing.T) { | |
| 357 | - | cmd, ok := ByCode("FLT") | |
| 357 | + | cmd, ok := ByCode("TFP") | |
| 358 | 358 | if !ok { | |
| 359 | - | t.Fatal("ByCode(\"FLT\") ok = false, want true") | |
| 359 | + | t.Fatal("ByCode(\"TFP\") ok = false, want true") | |
| 360 | 360 | } | |
| 361 | - | if cmd.Slug != "toggle-floating-pane" || cmd.Code != "FLT" || cmd.Name != "Toggle floating pane" { | |
| 362 | - | t.Fatalf("floating command = %#v, want toggle-floating-pane/FLT/Toggle floating pane", cmd) | |
| 361 | + | if cmd.Slug != "toggle-floating-pane" || cmd.Code != "TFP" || cmd.Name != "Toggle floating pane" { | |
| 362 | + | t.Fatalf("floating command = %#v, want toggle-floating-pane/TFP/Toggle floating pane", cmd) | |
| 363 | 363 | } | |
| 364 | 364 | } | |
| 365 | 365 | ||
| @@ -412,14 +412,14 @@ func TestCommandRunCallsMatchingContextMethod(t *testing.T) { | |||
| 412 | 412 | {code: "SPL", expect: func(ctx *MockContext) { ctx.EXPECT().SplitLeft().Return(nil).Once() }}, | |
| 413 | 413 | {code: "SPU", expect: func(ctx *MockContext) { ctx.EXPECT().SplitUp().Return(nil).Once() }}, | |
| 414 | 414 | {code: "SPD", expect: func(ctx *MockContext) { ctx.EXPECT().SplitDown().Return(nil).Once() }}, | |
| 415 | - | {code: "CEL", expect: func(ctx *MockContext) { ctx.EXPECT().ConsumeOrExpelPaneLeft().Return(nil).Once() }}, | |
| 416 | - | {code: "CER", expect: func(ctx *MockContext) { ctx.EXPECT().ConsumeOrExpelPaneRight().Return(nil).Once() }}, | |
| 415 | + | {code: "MPL", expect: func(ctx *MockContext) { ctx.EXPECT().ConsumeOrExpelPaneLeft().Return(nil).Once() }}, | |
| 416 | + | {code: "MPR", expect: func(ctx *MockContext) { ctx.EXPECT().ConsumeOrExpelPaneRight().Return(nil).Once() }}, | |
| 417 | 417 | {code: "STP", expect: func(ctx *MockContext) { ctx.EXPECT().StackPane().Return(nil).Once() }}, | |
| 418 | - | {code: "TST", expect: func(ctx *MockContext) { ctx.EXPECT().ToggleStack().Return(nil).Once() }}, | |
| 419 | - | {code: "FLT", expect: func(ctx *MockContext) { ctx.EXPECT().ToggleFloatingPane().Return(nil).Once() }}, | |
| 420 | - | {code: "CLP", expect: func(ctx *MockContext) { ctx.EXPECT().ClosePane().Return(nil).Once() }}, | |
| 421 | - | {code: "MPN", expect: func(ctx *MockContext) { ctx.EXPECT().OpenMovePanePicker().Return(nil).Once() }}, | |
| 422 | - | {code: "MTB", expect: func(ctx *MockContext) { ctx.EXPECT().OpenMoveTabPicker().Return(nil).Once() }}, | |
| 418 | + | {code: "TFS", expect: func(ctx *MockContext) { ctx.EXPECT().ToggleStack().Return(nil).Once() }}, | |
| 419 | + | {code: "TFP", expect: func(ctx *MockContext) { ctx.EXPECT().ToggleFloatingPane().Return(nil).Once() }}, | |
| 420 | + | {code: "CFP", expect: func(ctx *MockContext) { ctx.EXPECT().ClosePane().Return(nil).Once() }}, | |
| 421 | + | {code: "MFP", expect: func(ctx *MockContext) { ctx.EXPECT().OpenMovePanePicker().Return(nil).Once() }}, | |
| 422 | + | {code: "MAT", expect: func(ctx *MockContext) { ctx.EXPECT().OpenMoveTabPicker().Return(nil).Once() }}, | |
| 423 | 423 | {code: "FPL", expect: func(ctx *MockContext) { ctx.EXPECT().FocusPaneLeft().Return(nil).Once() }}, | |
| 424 | 424 | {code: "FPR", expect: func(ctx *MockContext) { ctx.EXPECT().FocusPaneRight().Return(nil).Once() }}, | |
| 425 | 425 | {code: "FPU", expect: func(ctx *MockContext) { ctx.EXPECT().FocusPaneUp().Return(nil).Once() }}, | |
| @@ -432,7 +432,7 @@ func TestCommandRunCallsMatchingContextMethod(t *testing.T) { | |||
| 432 | 432 | {code: "EQP", expect: func(ctx *MockContext) { ctx.EXPECT().EqualizePanes().Return(nil).Once() }}, | |
| 433 | 433 | {code: "NXT", expect: func(ctx *MockContext) { ctx.EXPECT().NextTab().Return(nil).Once() }}, | |
| 434 | 434 | {code: "PVT", expect: func(ctx *MockContext) { ctx.EXPECT().PrevTab().Return(nil).Once() }}, | |
| 435 | - | {code: "BSK", expect: func(ctx *MockContext) { ctx.EXPECT().BackSession().Return(nil).Once() }}, | |
| 435 | + | {code: "BCK", expect: func(ctx *MockContext) { ctx.EXPECT().BackSession().Return(nil).Once() }}, | |
| 436 | 436 | {code: "JRS", expect: func(ctx *MockContext) { ctx.EXPECT().JumpRecentSession(1).Return(nil).Once() }}, | |
| 437 | 437 | {code: "SSP", expect: func(ctx *MockContext) { ctx.EXPECT().OpenSessionPicker().Return(nil).Once() }}, | |
| 438 | 438 | {code: "NTC", expect: func(ctx *MockContext) { ctx.EXPECT().OpenNotifications().Return(nil).Once() }}, | |
| @@ -9,7 +9,7 @@ import ( | |||||
| 9 | 9 | ||||
| 10 | func TestRegistryCodesAndSlugsAreUniqueInOrder(t *testing.T) { | 10 | func TestRegistryCodesAndSlugsAreUniqueInOrder(t *testing.T) { | ||
| 11 | commands := PaletteRegistry() | 11 | commands := PaletteRegistry() | ||
| 12 | - | wantCodes := []string{"CNT", "CNS", "CLT", "SPR", "SPL", "SPU", "SPD", "CEL", "CER", "STP", "TST", "FLT", "CLP", "MPN", "MTB", "FPL", "FPR", "FPU", "FPD", "RSZ", "GPW", "SPW", "GPH", "SPH", "EQP", "NXT", "PVT", "BSK", "JRS", "SSP", "NTC", "YLN", "VIS", "RNS", "RNT", "DET"} | 12 | + | wantCodes := []string{"CNT", "CNS", "CLT", "SPR", "SPL", "SPU", "SPD", "MPL", "MPR", "STP", "TFS", "TFP", "CFP", "MFP", "MAT", "FPL", "FPR", "FPU", "FPD", "RSZ", "GPW", "SPW", "GPH", "SPH", "EQP", "NXT", "PVT", "BCK", "JRS", "SSP", "NTC", "YLN", "VIS", "RNS", "RNT", "DET"} |
| 13 | 13 | ||||
| 14 | if len(commands) != len(wantCodes) { | 14 | if len(commands) != len(wantCodes) { | ||
| 15 | t.Fatalf("Registry() returned %d commands, want %d", len(commands), len(wantCodes)) | 15 | t.Fatalf("Registry() returned %d commands, want %d", len(commands), len(wantCodes)) | ||
| @@ -47,13 +47,13 @@ func TestMoveCommandsExposeExactRegistryContracts(t *testing.T) { | |||||
| 47 | wantCall string | 47 | wantCall string | ||
| 48 | }{ | 48 | }{ | ||
| 49 | { | 49 | { | ||
| 50 | - | code: "MPN", slug: "move-pane", name: "Move pane to tab", | 50 | + | code: "MFP", slug: "move-pane", name: "Move pane to tab", |
| 51 | - | desc: "Move the focused pane to another live tab", usage: "move-pane <destination-session> <destination-tab-id>", | 51 | + | desc: "Move focused pane to tab", usage: "move-pane <destination-session> <destination-tab-id>", |
| 52 | target: TargetPane, args: []string{"work", "t_dest"}, wantCall: "move-pane:work:t_dest", | 52 | target: TargetPane, args: []string{"work", "t_dest"}, wantCall: "move-pane:work:t_dest", | ||
| 53 | }, | 53 | }, | ||
| 54 | { | 54 | { | ||
| 55 | - | code: "MTB", slug: "move-tab", name: "Move tab to session", | 55 | + | code: "MAT", slug: "move-tab", name: "Move tab to session", |
| 56 | - | desc: "Move the active tab to another live session", usage: "move-tab <destination-session>", | 56 | + | desc: "Move active tab to session", usage: "move-tab <destination-session>", |
| 57 | target: TargetTab, args: []string{"work"}, wantCall: "move-tab:work", | 57 | target: TargetTab, args: []string{"work"}, wantCall: "move-tab:work", | ||
| 58 | }, | 58 | }, | ||
| 59 | } | 59 | } | ||
| @@ -354,12 +354,12 @@ func (s *controlSpy) RemoteCatalog(json bool) (string, error) { | |||||
| 354 | } | 354 | } | ||
| 355 | 355 | ||||
| 356 | func TestRegistryIncludesFloatingPaneToggle(t *testing.T) { | 356 | func TestRegistryIncludesFloatingPaneToggle(t *testing.T) { | ||
| 357 | - | cmd, ok := ByCode("FLT") | 357 | + | cmd, ok := ByCode("TFP") |
| 358 | if !ok { | 358 | if !ok { | ||
| 359 | - | t.Fatal("ByCode(\"FLT\") ok = false, want true") | 359 | + | t.Fatal("ByCode(\"TFP\") ok = false, want true") |
| 360 | } | 360 | } | ||
| 361 | - | if cmd.Slug != "toggle-floating-pane" || cmd.Code != "FLT" || cmd.Name != "Toggle floating pane" { | 361 | + | if cmd.Slug != "toggle-floating-pane" || cmd.Code != "TFP" || cmd.Name != "Toggle floating pane" { |
| 362 | - | t.Fatalf("floating command = %#v, want toggle-floating-pane/FLT/Toggle floating pane", cmd) | 362 | + | t.Fatalf("floating command = %#v, want toggle-floating-pane/TFP/Toggle floating pane", cmd) |
| 363 | } | 363 | } | ||
| 364 | } | 364 | } | ||
| 365 | 365 | ||||
| @@ -412,14 +412,14 @@ func TestCommandRunCallsMatchingContextMethod(t *testing.T) { | |||||
| 412 | {code: "SPL", expect: func(ctx *MockContext) { ctx.EXPECT().SplitLeft().Return(nil).Once() }}, | 412 | {code: "SPL", expect: func(ctx *MockContext) { ctx.EXPECT().SplitLeft().Return(nil).Once() }}, | ||
| 413 | {code: "SPU", expect: func(ctx *MockContext) { ctx.EXPECT().SplitUp().Return(nil).Once() }}, | 413 | {code: "SPU", expect: func(ctx *MockContext) { ctx.EXPECT().SplitUp().Return(nil).Once() }}, | ||
| 414 | {code: "SPD", expect: func(ctx *MockContext) { ctx.EXPECT().SplitDown().Return(nil).Once() }}, | 414 | {code: "SPD", expect: func(ctx *MockContext) { ctx.EXPECT().SplitDown().Return(nil).Once() }}, | ||
| 415 | - | {code: "CEL", expect: func(ctx *MockContext) { ctx.EXPECT().ConsumeOrExpelPaneLeft().Return(nil).Once() }}, | 415 | + | {code: "MPL", expect: func(ctx *MockContext) { ctx.EXPECT().ConsumeOrExpelPaneLeft().Return(nil).Once() }}, |
| 416 | - | {code: "CER", expect: func(ctx *MockContext) { ctx.EXPECT().ConsumeOrExpelPaneRight().Return(nil).Once() }}, | 416 | + | {code: "MPR", expect: func(ctx *MockContext) { ctx.EXPECT().ConsumeOrExpelPaneRight().Return(nil).Once() }}, |
| 417 | {code: "STP", expect: func(ctx *MockContext) { ctx.EXPECT().StackPane().Return(nil).Once() }}, | 417 | {code: "STP", expect: func(ctx *MockContext) { ctx.EXPECT().StackPane().Return(nil).Once() }}, | ||
| 418 | - | {code: "TST", expect: func(ctx *MockContext) { ctx.EXPECT().ToggleStack().Return(nil).Once() }}, | 418 | + | {code: "TFS", expect: func(ctx *MockContext) { ctx.EXPECT().ToggleStack().Return(nil).Once() }}, |
| 419 | - | {code: "FLT", expect: func(ctx *MockContext) { ctx.EXPECT().ToggleFloatingPane().Return(nil).Once() }}, | 419 | + | {code: "TFP", expect: func(ctx *MockContext) { ctx.EXPECT().ToggleFloatingPane().Return(nil).Once() }}, |
| 420 | - | {code: "CLP", expect: func(ctx *MockContext) { ctx.EXPECT().ClosePane().Return(nil).Once() }}, | 420 | + | {code: "CFP", expect: func(ctx *MockContext) { ctx.EXPECT().ClosePane().Return(nil).Once() }}, |
| 421 | - | {code: "MPN", expect: func(ctx *MockContext) { ctx.EXPECT().OpenMovePanePicker().Return(nil).Once() }}, | 421 | + | {code: "MFP", expect: func(ctx *MockContext) { ctx.EXPECT().OpenMovePanePicker().Return(nil).Once() }}, |
| 422 | - | {code: "MTB", expect: func(ctx *MockContext) { ctx.EXPECT().OpenMoveTabPicker().Return(nil).Once() }}, | 422 | + | {code: "MAT", expect: func(ctx *MockContext) { ctx.EXPECT().OpenMoveTabPicker().Return(nil).Once() }}, |
| 423 | {code: "FPL", expect: func(ctx *MockContext) { ctx.EXPECT().FocusPaneLeft().Return(nil).Once() }}, | 423 | {code: "FPL", expect: func(ctx *MockContext) { ctx.EXPECT().FocusPaneLeft().Return(nil).Once() }}, | ||
| 424 | {code: "FPR", expect: func(ctx *MockContext) { ctx.EXPECT().FocusPaneRight().Return(nil).Once() }}, | 424 | {code: "FPR", expect: func(ctx *MockContext) { ctx.EXPECT().FocusPaneRight().Return(nil).Once() }}, | ||
| 425 | {code: "FPU", expect: func(ctx *MockContext) { ctx.EXPECT().FocusPaneUp().Return(nil).Once() }}, | 425 | {code: "FPU", expect: func(ctx *MockContext) { ctx.EXPECT().FocusPaneUp().Return(nil).Once() }}, | ||
| @@ -432,7 +432,7 @@ func TestCommandRunCallsMatchingContextMethod(t *testing.T) { | |||||
| 432 | {code: "EQP", expect: func(ctx *MockContext) { ctx.EXPECT().EqualizePanes().Return(nil).Once() }}, | 432 | {code: "EQP", expect: func(ctx *MockContext) { ctx.EXPECT().EqualizePanes().Return(nil).Once() }}, | ||
| 433 | {code: "NXT", expect: func(ctx *MockContext) { ctx.EXPECT().NextTab().Return(nil).Once() }}, | 433 | {code: "NXT", expect: func(ctx *MockContext) { ctx.EXPECT().NextTab().Return(nil).Once() }}, | ||
| 434 | {code: "PVT", expect: func(ctx *MockContext) { ctx.EXPECT().PrevTab().Return(nil).Once() }}, | 434 | {code: "PVT", expect: func(ctx *MockContext) { ctx.EXPECT().PrevTab().Return(nil).Once() }}, | ||
| 435 | - | {code: "BSK", expect: func(ctx *MockContext) { ctx.EXPECT().BackSession().Return(nil).Once() }}, | 435 | + | {code: "BCK", expect: func(ctx *MockContext) { ctx.EXPECT().BackSession().Return(nil).Once() }}, |
| 436 | {code: "JRS", expect: func(ctx *MockContext) { ctx.EXPECT().JumpRecentSession(1).Return(nil).Once() }}, | 436 | {code: "JRS", expect: func(ctx *MockContext) { ctx.EXPECT().JumpRecentSession(1).Return(nil).Once() }}, | ||
| 437 | {code: "SSP", expect: func(ctx *MockContext) { ctx.EXPECT().OpenSessionPicker().Return(nil).Once() }}, | 437 | {code: "SSP", expect: func(ctx *MockContext) { ctx.EXPECT().OpenSessionPicker().Return(nil).Once() }}, | ||
| 438 | {code: "NTC", expect: func(ctx *MockContext) { ctx.EXPECT().OpenNotifications().Return(nil).Once() }}, | 438 | {code: "NTC", expect: func(ctx *MockContext) { ctx.EXPECT().OpenNotifications().Return(nil).Once() }}, | ||
M internal/usecase/daemon/move_picker_test.go +4 -4
| @@ -56,7 +56,7 @@ func TestPaletteMovePaneCapturesSourceAndOpensPicker(t *testing.T) { | |||
| 56 | 56 | ||
| 57 | 57 | d.handleInput(source, ac, []byte("\x1b ")) | |
| 58 | 58 | require.True(t, ac.overlays.paletteActive()) | |
| 59 | - | d.handleInput(source, ac, []byte("MPN\r")) | |
| 59 | + | d.handleInput(source, ac, []byte("MFP\r")) | |
| 60 | 60 | require.False(t, ac.overlays.paletteActive()) | |
| 61 | 61 | require.True(t, ac.overlays.pickerActive()) | |
| 62 | 62 | ||
| @@ -77,7 +77,7 @@ func TestPaletteMoveTabCapturesActiveTabAndOpensPicker(t *testing.T) { | |||
| 77 | 77 | sourceTab.stableID = "active-tab" | |
| 78 | 78 | ||
| 79 | 79 | d.handleInput(source, ac, []byte("\x1b ")) | |
| 80 | - | d.handleInput(source, ac, []byte("MTB\r")) | |
| 80 | + | d.handleInput(source, ac, []byte("MAT\r")) | |
| 81 | 81 | require.True(t, ac.overlays.pickerActive()) | |
| 82 | 82 | ||
| 83 | 83 | ac.overlays.pickerMu.Lock() | |
| @@ -97,7 +97,7 @@ func TestPaletteMoveWithoutDestinationShowsToastAndNoPicker(t *testing.T) { | |||
| 97 | 97 | d.mu.Unlock() | |
| 98 | 98 | ||
| 99 | 99 | d.handleInput(source, ac, []byte("\x1b ")) | |
| 100 | - | d.handleInput(source, ac, []byte("MPN\r")) | |
| 100 | + | d.handleInput(source, ac, []byte("MFP\r")) | |
| 101 | 101 | ||
| 102 | 102 | require.False(t, ac.overlays.pickerActive()) | |
| 103 | 103 | history := d.notices.history() | |
| @@ -302,7 +302,7 @@ func TestMovePickerDispatchMuNotHeldWhileOpen(t *testing.T) { | |||
| 302 | 302 | defer releaseAll(releases) | |
| 303 | 303 | ||
| 304 | 304 | d.handleInput(source, ac, []byte("\x1b ")) | |
| 305 | - | d.handleInput(source, ac, []byte("MPN\r")) | |
| 305 | + | d.handleInput(source, ac, []byte("MFP\r")) | |
| 306 | 306 | require.True(t, ac.overlays.pickerActive()) | |
| 307 | 307 | require.True(t, source.dispatchMu.TryLock(), "dispatchMu must not remain held while the move picker is open") | |
| 308 | 308 | source.dispatchMu.Unlock() | |
| @@ -56,7 +56,7 @@ func TestPaletteMovePaneCapturesSourceAndOpensPicker(t *testing.T) { | |||||
| 56 | 56 | ||||
| 57 | d.handleInput(source, ac, []byte("\x1b ")) | 57 | d.handleInput(source, ac, []byte("\x1b ")) | ||
| 58 | require.True(t, ac.overlays.paletteActive()) | 58 | require.True(t, ac.overlays.paletteActive()) | ||
| 59 | - | d.handleInput(source, ac, []byte("MPN\r")) | 59 | + | d.handleInput(source, ac, []byte("MFP\r")) |
| 60 | require.False(t, ac.overlays.paletteActive()) | 60 | require.False(t, ac.overlays.paletteActive()) | ||
| 61 | require.True(t, ac.overlays.pickerActive()) | 61 | require.True(t, ac.overlays.pickerActive()) | ||
| 62 | 62 | ||||
| @@ -77,7 +77,7 @@ func TestPaletteMoveTabCapturesActiveTabAndOpensPicker(t *testing.T) { | |||||
| 77 | sourceTab.stableID = "active-tab" | 77 | sourceTab.stableID = "active-tab" | ||
| 78 | 78 | ||||
| 79 | d.handleInput(source, ac, []byte("\x1b ")) | 79 | d.handleInput(source, ac, []byte("\x1b ")) | ||
| 80 | - | d.handleInput(source, ac, []byte("MTB\r")) | 80 | + | d.handleInput(source, ac, []byte("MAT\r")) |
| 81 | require.True(t, ac.overlays.pickerActive()) | 81 | require.True(t, ac.overlays.pickerActive()) | ||
| 82 | 82 | ||||
| 83 | ac.overlays.pickerMu.Lock() | 83 | ac.overlays.pickerMu.Lock() | ||
| @@ -97,7 +97,7 @@ func TestPaletteMoveWithoutDestinationShowsToastAndNoPicker(t *testing.T) { | |||||
| 97 | d.mu.Unlock() | 97 | d.mu.Unlock() | ||
| 98 | 98 | ||||
| 99 | d.handleInput(source, ac, []byte("\x1b ")) | 99 | d.handleInput(source, ac, []byte("\x1b ")) | ||
| 100 | - | d.handleInput(source, ac, []byte("MPN\r")) | 100 | + | d.handleInput(source, ac, []byte("MFP\r")) |
| 101 | 101 | ||||
| 102 | require.False(t, ac.overlays.pickerActive()) | 102 | require.False(t, ac.overlays.pickerActive()) | ||
| 103 | history := d.notices.history() | 103 | history := d.notices.history() | ||
| @@ -302,7 +302,7 @@ func TestMovePickerDispatchMuNotHeldWhileOpen(t *testing.T) { | |||||
| 302 | defer releaseAll(releases) | 302 | defer releaseAll(releases) | ||
| 303 | 303 | ||||
| 304 | d.handleInput(source, ac, []byte("\x1b ")) | 304 | d.handleInput(source, ac, []byte("\x1b ")) | ||
| 305 | - | d.handleInput(source, ac, []byte("MPN\r")) | 305 | + | d.handleInput(source, ac, []byte("MFP\r")) |
| 306 | require.True(t, ac.overlays.pickerActive()) | 306 | require.True(t, ac.overlays.pickerActive()) | ||
| 307 | require.True(t, source.dispatchMu.TryLock(), "dispatchMu must not remain held while the move picker is open") | 307 | require.True(t, source.dispatchMu.TryLock(), "dispatchMu must not remain held while the move picker is open") | ||
| 308 | source.dispatchMu.Unlock() | 308 | source.dispatchMu.Unlock() | ||
M internal/usecase/daemon/palette_test.go +13 -13
| @@ -178,13 +178,13 @@ func TestPaletteCommandNoticeErrorPreservesTypedErrorsAndMapsMoveFailures(t *tes | |||
| 178 | 178 | wantSame bool | |
| 179 | 179 | }{ | |
| 180 | 180 | {name: "CNT typed command error", slug: "new-tab", err: typedTabSpawn, code: domain.NoticeTabSpawn, severity: domain.NoticeError, message: "couldn't open tab", wantSame: true}, | |
| 181 | - | {name: "MPN no destination", slug: "move-pane", err: errNoMoveDestination, code: domain.NoticeSessionUnavailable, severity: domain.NoticeWarn, message: "No destination available."}, | |
| 182 | - | {name: "MTB warming floating", slug: "move-tab", err: errMoveFloatingWarming, code: domain.NoticeSessionUnavailable, severity: domain.NoticeWarn, message: "Wait for the floating pane to finish opening."}, | |
| 183 | - | {name: "MPN final pane with floating slot", slug: "move-pane", err: errMoveFinalSourceFloating, code: domain.NoticeLayoutTooSmall, severity: domain.NoticeWarn, message: "Close the floating pane or move the whole tab."}, | |
| 184 | - | {name: "MPN destination too small", slug: "move-pane", err: errMoveTooSmall, code: domain.NoticeLayoutTooSmall, severity: domain.NoticeWarn, message: "Not enough space in destination tab."}, | |
| 185 | - | {name: "MTB stale destination", slug: "move-tab", err: errMoveStaleTarget, code: domain.NoticeSessionUnavailable, severity: domain.NoticeWarn, message: "Destination is no longer available."}, | |
| 186 | - | {name: "MPN generic invalid", slug: "move-pane", err: errMovePaneInvalid, code: domain.NoticeInternal, severity: domain.NoticeError, message: "Move failed."}, | |
| 187 | - | {name: "MPN typed application error", slug: "move-pane", err: typedTabSpawn, code: domain.NoticeTabSpawn, severity: domain.NoticeError, message: "couldn't open tab", wantSame: true}, | |
| 181 | + | {name: "MFP no destination", slug: "move-pane", err: errNoMoveDestination, code: domain.NoticeSessionUnavailable, severity: domain.NoticeWarn, message: "No destination available."}, | |
| 182 | + | {name: "MAT warming floating", slug: "move-tab", err: errMoveFloatingWarming, code: domain.NoticeSessionUnavailable, severity: domain.NoticeWarn, message: "Wait for the floating pane to finish opening."}, | |
| 183 | + | {name: "MFP final pane with floating slot", slug: "move-pane", err: errMoveFinalSourceFloating, code: domain.NoticeLayoutTooSmall, severity: domain.NoticeWarn, message: "Close the floating pane or move the whole tab."}, | |
| 184 | + | {name: "MFP destination too small", slug: "move-pane", err: errMoveTooSmall, code: domain.NoticeLayoutTooSmall, severity: domain.NoticeWarn, message: "Not enough space in destination tab."}, | |
| 185 | + | {name: "MAT stale destination", slug: "move-tab", err: errMoveStaleTarget, code: domain.NoticeSessionUnavailable, severity: domain.NoticeWarn, message: "Destination is no longer available."}, | |
| 186 | + | {name: "MFP generic invalid", slug: "move-pane", err: errMovePaneInvalid, code: domain.NoticeInternal, severity: domain.NoticeError, message: "Move failed."}, | |
| 187 | + | {name: "MFP typed application error", slug: "move-pane", err: typedTabSpawn, code: domain.NoticeTabSpawn, severity: domain.NoticeError, message: "couldn't open tab", wantSame: true}, | |
| 188 | 188 | } | |
| 189 | 189 | for _, tt := range tests { | |
| 190 | 190 | t.Run(tt.name, func(t *testing.T) { | |
| @@ -516,9 +516,9 @@ func TestPaletteDeniedPostHandoffAttachmentEffectClosesAndInvalidates(t *testing | |||
| 516 | 516 | invalidations := installPaletteInvalidationObserver(sess) | |
| 517 | 517 | ||
| 518 | 518 | d.enterPalette(sess, ac) | |
| 519 | - | d.handlePaletteInput(ac, []byte("BSK")) | |
| 519 | + | d.handlePaletteInput(ac, []byte("BCK")) | |
| 520 | 520 | // Make the attachment token detached while retaining currentSession. The | |
| 521 | - | // no-op BSK command succeeds, but its post-execution beginAttachmentEffect is | |
| 521 | + | // no-op BCK command succeeds, but its post-execution beginAttachmentEffect is | |
| 522 | 522 | // deterministically denied. | |
| 523 | 523 | sess.mu.Lock() | |
| 524 | 524 | clearAttachmentsForTestLocked(sess) | |
| @@ -640,7 +640,7 @@ func TestPaletteFailureDoesNotOverwriteNewerInteraction(t *testing.T) { | |||
| 640 | 640 | awaitFrame(t, sends, ports.MsgOutput) | |
| 641 | 641 | } | |
| 642 | 642 | ||
| 643 | - | func TestPaletteFLTExecutesFloatingToggle(t *testing.T) { | |
| 643 | + | func TestPaletteTFPExecutesFloatingToggle(t *testing.T) { | |
| 644 | 644 | p, release := newBlockingPTY(t) | |
| 645 | 645 | defer release() | |
| 646 | 646 | d, sess, ac, sends := newManualSessionWithPTYs(t, p) | |
| @@ -649,7 +649,7 @@ func TestPaletteFLTExecutesFloatingToggle(t *testing.T) { | |||
| 649 | 649 | ||
| 650 | 650 | d.handleInput(sess, ac, []byte("\x1b ")) | |
| 651 | 651 | awaitFrame(t, sends, ports.MsgOutput) | |
| 652 | - | d.handleInput(sess, ac, []byte("FLT\r")) | |
| 652 | + | d.handleInput(sess, ac, []byte("TFP\r")) | |
| 653 | 653 | ||
| 654 | 654 | require.False(t, ac.overlays.paletteActive()) | |
| 655 | 655 | tb.mu.Lock() | |
| @@ -769,12 +769,12 @@ func TestPaletteRecentCommandsNewestFirstThenRegistryOrder(t *testing.T) { | |||
| 769 | 769 | for i, cmd := range commands { | |
| 770 | 770 | codes[i] = cmd.Code | |
| 771 | 771 | } | |
| 772 | - | require.Equal(t, []string{"SSP", "NXT", "CNT", "CNS", "CLT", "SPR", "SPL", "SPU", "SPD", "CEL", "CER", "STP", "TST", "FLT", "CLP", "MPN", "MTB", "FPL", "FPR", "FPU", "FPD", "RSZ", "GPW", "SPW", "GPH", "SPH", "EQP", "PVT", "BSK", "JRS", "NTC", "YLN", "VIS", "RNS", "RNT", "DET"}, codes) | |
| 772 | + | require.Equal(t, []string{"SSP", "NXT", "CNT", "CNS", "CLT", "SPR", "SPL", "SPU", "SPD", "MPL", "MPR", "STP", "TFS", "TFP", "CFP", "MFP", "MAT", "FPL", "FPR", "FPU", "FPD", "RSZ", "GPW", "SPW", "GPH", "SPH", "EQP", "PVT", "BCK", "JRS", "NTC", "YLN", "VIS", "RNS", "RNT", "DET"}, codes) | |
| 773 | 773 | } | |
| 774 | 774 | ||
| 775 | 775 | func TestPaletteRecencyCanBeUpdatedConcurrently(t *testing.T) { | |
| 776 | 776 | d := &Daemon{} | |
| 777 | - | codes := []string{"CNT", "CNS", "CLT", "SPR", "SPL", "SPU", "SPD", "STP", "TST", "FLT", "CLP", "MPN", "MTB", "FPL", "FPR", "FPU", "FPD", "RSZ", "GPW", "SPW", "GPH", "SPH", "EQP", "NXT", "PVT", "BSK", "SSP", "VIS", "RNS", "RNT", "DET"} | |
| 777 | + | codes := []string{"CNT", "CNS", "CLT", "SPR", "SPL", "SPU", "SPD", "STP", "TFS", "TFP", "CFP", "MFP", "MAT", "FPL", "FPR", "FPU", "FPD", "RSZ", "GPW", "SPW", "GPH", "SPH", "EQP", "NXT", "PVT", "BCK", "SSP", "VIS", "RNS", "RNT", "DET"} | |
| 778 | 778 | ||
| 779 | 779 | var wg sync.WaitGroup | |
| 780 | 780 | for range 50 { | |
| @@ -178,13 +178,13 @@ func TestPaletteCommandNoticeErrorPreservesTypedErrorsAndMapsMoveFailures(t *tes | |||||
| 178 | wantSame bool | 178 | wantSame bool | ||
| 179 | }{ | 179 | }{ | ||
| 180 | {name: "CNT typed command error", slug: "new-tab", err: typedTabSpawn, code: domain.NoticeTabSpawn, severity: domain.NoticeError, message: "couldn't open tab", wantSame: true}, | 180 | {name: "CNT typed command error", slug: "new-tab", err: typedTabSpawn, code: domain.NoticeTabSpawn, severity: domain.NoticeError, message: "couldn't open tab", wantSame: true}, | ||
| 181 | - | {name: "MPN no destination", slug: "move-pane", err: errNoMoveDestination, code: domain.NoticeSessionUnavailable, severity: domain.NoticeWarn, message: "No destination available."}, | 181 | + | {name: "MFP no destination", slug: "move-pane", err: errNoMoveDestination, code: domain.NoticeSessionUnavailable, severity: domain.NoticeWarn, message: "No destination available."}, |
| 182 | - | {name: "MTB warming floating", slug: "move-tab", err: errMoveFloatingWarming, code: domain.NoticeSessionUnavailable, severity: domain.NoticeWarn, message: "Wait for the floating pane to finish opening."}, | 182 | + | {name: "MAT warming floating", slug: "move-tab", err: errMoveFloatingWarming, code: domain.NoticeSessionUnavailable, severity: domain.NoticeWarn, message: "Wait for the floating pane to finish opening."}, |
| 183 | - | {name: "MPN final pane with floating slot", slug: "move-pane", err: errMoveFinalSourceFloating, code: domain.NoticeLayoutTooSmall, severity: domain.NoticeWarn, message: "Close the floating pane or move the whole tab."}, | 183 | + | {name: "MFP final pane with floating slot", slug: "move-pane", err: errMoveFinalSourceFloating, code: domain.NoticeLayoutTooSmall, severity: domain.NoticeWarn, message: "Close the floating pane or move the whole tab."}, |
| 184 | - | {name: "MPN destination too small", slug: "move-pane", err: errMoveTooSmall, code: domain.NoticeLayoutTooSmall, severity: domain.NoticeWarn, message: "Not enough space in destination tab."}, | 184 | + | {name: "MFP destination too small", slug: "move-pane", err: errMoveTooSmall, code: domain.NoticeLayoutTooSmall, severity: domain.NoticeWarn, message: "Not enough space in destination tab."}, |
| 185 | - | {name: "MTB stale destination", slug: "move-tab", err: errMoveStaleTarget, code: domain.NoticeSessionUnavailable, severity: domain.NoticeWarn, message: "Destination is no longer available."}, | 185 | + | {name: "MAT stale destination", slug: "move-tab", err: errMoveStaleTarget, code: domain.NoticeSessionUnavailable, severity: domain.NoticeWarn, message: "Destination is no longer available."}, |
| 186 | - | {name: "MPN generic invalid", slug: "move-pane", err: errMovePaneInvalid, code: domain.NoticeInternal, severity: domain.NoticeError, message: "Move failed."}, | 186 | + | {name: "MFP generic invalid", slug: "move-pane", err: errMovePaneInvalid, code: domain.NoticeInternal, severity: domain.NoticeError, message: "Move failed."}, |
| 187 | - | {name: "MPN typed application error", slug: "move-pane", err: typedTabSpawn, code: domain.NoticeTabSpawn, severity: domain.NoticeError, message: "couldn't open tab", wantSame: true}, | 187 | + | {name: "MFP typed application error", slug: "move-pane", err: typedTabSpawn, code: domain.NoticeTabSpawn, severity: domain.NoticeError, message: "couldn't open tab", wantSame: true}, |
| 188 | } | 188 | } | ||
| 189 | for _, tt := range tests { | 189 | for _, tt := range tests { | ||
| 190 | t.Run(tt.name, func(t *testing.T) { | 190 | t.Run(tt.name, func(t *testing.T) { | ||
| @@ -516,9 +516,9 @@ func TestPaletteDeniedPostHandoffAttachmentEffectClosesAndInvalidates(t *testing | |||||
| 516 | invalidations := installPaletteInvalidationObserver(sess) | 516 | invalidations := installPaletteInvalidationObserver(sess) | ||
| 517 | 517 | ||||
| 518 | d.enterPalette(sess, ac) | 518 | d.enterPalette(sess, ac) | ||
| 519 | - | d.handlePaletteInput(ac, []byte("BSK")) | 519 | + | d.handlePaletteInput(ac, []byte("BCK")) |
| 520 | // Make the attachment token detached while retaining currentSession. The | 520 | // Make the attachment token detached while retaining currentSession. The | ||
| 521 | - | // no-op BSK command succeeds, but its post-execution beginAttachmentEffect is | 521 | + | // no-op BCK command succeeds, but its post-execution beginAttachmentEffect is |
| 522 | // deterministically denied. | 522 | // deterministically denied. | ||
| 523 | sess.mu.Lock() | 523 | sess.mu.Lock() | ||
| 524 | clearAttachmentsForTestLocked(sess) | 524 | clearAttachmentsForTestLocked(sess) | ||
| @@ -640,7 +640,7 @@ func TestPaletteFailureDoesNotOverwriteNewerInteraction(t *testing.T) { | |||||
| 640 | awaitFrame(t, sends, ports.MsgOutput) | 640 | awaitFrame(t, sends, ports.MsgOutput) | ||
| 641 | } | 641 | } | ||
| 642 | 642 | ||||
| 643 | - | func TestPaletteFLTExecutesFloatingToggle(t *testing.T) { | 643 | + | func TestPaletteTFPExecutesFloatingToggle(t *testing.T) { |
| 644 | p, release := newBlockingPTY(t) | 644 | p, release := newBlockingPTY(t) | ||
| 645 | defer release() | 645 | defer release() | ||
| 646 | d, sess, ac, sends := newManualSessionWithPTYs(t, p) | 646 | d, sess, ac, sends := newManualSessionWithPTYs(t, p) | ||
| @@ -649,7 +649,7 @@ func TestPaletteFLTExecutesFloatingToggle(t *testing.T) { | |||||
| 649 | 649 | ||||
| 650 | d.handleInput(sess, ac, []byte("\x1b ")) | 650 | d.handleInput(sess, ac, []byte("\x1b ")) | ||
| 651 | awaitFrame(t, sends, ports.MsgOutput) | 651 | awaitFrame(t, sends, ports.MsgOutput) | ||
| 652 | - | d.handleInput(sess, ac, []byte("FLT\r")) | 652 | + | d.handleInput(sess, ac, []byte("TFP\r")) |
| 653 | 653 | ||||
| 654 | require.False(t, ac.overlays.paletteActive()) | 654 | require.False(t, ac.overlays.paletteActive()) | ||
| 655 | tb.mu.Lock() | 655 | tb.mu.Lock() | ||
| @@ -769,12 +769,12 @@ func TestPaletteRecentCommandsNewestFirstThenRegistryOrder(t *testing.T) { | |||||
| 769 | for i, cmd := range commands { | 769 | for i, cmd := range commands { | ||
| 770 | codes[i] = cmd.Code | 770 | codes[i] = cmd.Code | ||
| 771 | } | 771 | } | ||
| 772 | - | require.Equal(t, []string{"SSP", "NXT", "CNT", "CNS", "CLT", "SPR", "SPL", "SPU", "SPD", "CEL", "CER", "STP", "TST", "FLT", "CLP", "MPN", "MTB", "FPL", "FPR", "FPU", "FPD", "RSZ", "GPW", "SPW", "GPH", "SPH", "EQP", "PVT", "BSK", "JRS", "NTC", "YLN", "VIS", "RNS", "RNT", "DET"}, codes) | 772 | + | require.Equal(t, []string{"SSP", "NXT", "CNT", "CNS", "CLT", "SPR", "SPL", "SPU", "SPD", "MPL", "MPR", "STP", "TFS", "TFP", "CFP", "MFP", "MAT", "FPL", "FPR", "FPU", "FPD", "RSZ", "GPW", "SPW", "GPH", "SPH", "EQP", "PVT", "BCK", "JRS", "NTC", "YLN", "VIS", "RNS", "RNT", "DET"}, codes) |
| 773 | } | 773 | } | ||
| 774 | 774 | ||||
| 775 | func TestPaletteRecencyCanBeUpdatedConcurrently(t *testing.T) { | 775 | func TestPaletteRecencyCanBeUpdatedConcurrently(t *testing.T) { | ||
| 776 | d := &Daemon{} | 776 | d := &Daemon{} | ||
| 777 | - | codes := []string{"CNT", "CNS", "CLT", "SPR", "SPL", "SPU", "SPD", "STP", "TST", "FLT", "CLP", "MPN", "MTB", "FPL", "FPR", "FPU", "FPD", "RSZ", "GPW", "SPW", "GPH", "SPH", "EQP", "NXT", "PVT", "BSK", "SSP", "VIS", "RNS", "RNT", "DET"} | 777 | + | codes := []string{"CNT", "CNS", "CLT", "SPR", "SPL", "SPU", "SPD", "STP", "TFS", "TFP", "CFP", "MFP", "MAT", "FPL", "FPR", "FPU", "FPD", "RSZ", "GPW", "SPW", "GPH", "SPH", "EQP", "NXT", "PVT", "BCK", "SSP", "VIS", "RNS", "RNT", "DET"} |
| 778 | 778 | ||||
| 779 | var wg sync.WaitGroup | 779 | var wg sync.WaitGroup | ||
| 780 | for range 50 { | 780 | for range 50 { | ||
M internal/usecase/palette/action_test.go +3 -3
| @@ -9,7 +9,7 @@ import ( | |||
| 9 | 9 | ||
| 10 | 10 | func TestParseActionExactEffectiveToken(t *testing.T) { | |
| 11 | 11 | results := CommandResults([]command.Command{ | |
| 12 | - | {Code: "BSK", Arguments: command.ArgumentsNone}, | |
| 12 | + | {Code: "BCK", Arguments: command.ArgumentsNone}, | |
| 13 | 13 | {Code: "JRS", Arguments: command.ArgumentsRequired, ContextHint: command.ContextHintRecentSessions}, | |
| 14 | 14 | }) | |
| 15 | 15 | tests := []struct { | |
| @@ -19,11 +19,11 @@ func TestParseActionExactEffectiveToken(t *testing.T) { | |||
| 19 | 19 | code string | |
| 20 | 20 | args []string | |
| 21 | 21 | }{ | |
| 22 | - | {name: "static token ignores case and whitespace", input: " bSk ", ok: true, code: "BSK"}, | |
| 22 | + | {name: "static token ignores case and whitespace", input: " bCk ", ok: true, code: "BCK"}, | |
| 23 | 23 | {name: "required arguments accept repeated whitespace", input: " JRS 2 ", ok: true, code: "JRS", args: []string{"2"}}, | |
| 24 | 24 | {name: "partial token rejected", input: "JR", ok: false}, | |
| 25 | 25 | {name: "concatenated token rejected", input: "JRS2", ok: false}, | |
| 26 | - | {name: "static arguments rejected", input: "BSK 2", ok: false}, | |
| 26 | + | {name: "static arguments rejected", input: "BCK 2", ok: false}, | |
| 27 | 27 | {name: "missing required argument rejected", input: "JRS", ok: false}, | |
| 28 | 28 | } | |
| 29 | 29 | for _, tt := range tests { | |
| @@ -9,7 +9,7 @@ import ( | |||||
| 9 | 9 | ||||
| 10 | func TestParseActionExactEffectiveToken(t *testing.T) { | 10 | func TestParseActionExactEffectiveToken(t *testing.T) { | ||
| 11 | results := CommandResults([]command.Command{ | 11 | results := CommandResults([]command.Command{ | ||
| 12 | - | {Code: "BSK", Arguments: command.ArgumentsNone}, | 12 | + | {Code: "BCK", Arguments: command.ArgumentsNone}, |
| 13 | {Code: "JRS", Arguments: command.ArgumentsRequired, ContextHint: command.ContextHintRecentSessions}, | 13 | {Code: "JRS", Arguments: command.ArgumentsRequired, ContextHint: command.ContextHintRecentSessions}, | ||
| 14 | }) | 14 | }) | ||
| 15 | tests := []struct { | 15 | tests := []struct { | ||
| @@ -19,11 +19,11 @@ func TestParseActionExactEffectiveToken(t *testing.T) { | |||||
| 19 | code string | 19 | code string | ||
| 20 | args []string | 20 | args []string | ||
| 21 | }{ | 21 | }{ | ||
| 22 | - | {name: "static token ignores case and whitespace", input: " bSk ", ok: true, code: "BSK"}, | 22 | + | {name: "static token ignores case and whitespace", input: " bCk ", ok: true, code: "BCK"}, |
| 23 | {name: "required arguments accept repeated whitespace", input: " JRS 2 ", ok: true, code: "JRS", args: []string{"2"}}, | 23 | {name: "required arguments accept repeated whitespace", input: " JRS 2 ", ok: true, code: "JRS", args: []string{"2"}}, | ||
| 24 | {name: "partial token rejected", input: "JR", ok: false}, | 24 | {name: "partial token rejected", input: "JR", ok: false}, | ||
| 25 | {name: "concatenated token rejected", input: "JRS2", ok: false}, | 25 | {name: "concatenated token rejected", input: "JRS2", ok: false}, | ||
| 26 | - | {name: "static arguments rejected", input: "BSK 2", ok: false}, | 26 | + | {name: "static arguments rejected", input: "BCK 2", ok: false}, |
| 27 | {name: "missing required argument rejected", input: "JRS", ok: false}, | 27 | {name: "missing required argument rejected", input: "JRS", ok: false}, | ||
| 28 | } | 28 | } | ||
| 29 | for _, tt := range tests { | 29 | for _, tt := range tests { | ||