Repository navigation
Conversation
mrzj110
force-pushed
the
feat/command-sidebar-663
branch
from
November 17, 2026 02:28
2dd05bc to
36edf63
Compare
mrzj110
added a commit
to mrzj110/viva
that referenced
this pull request
Nov 17, 2026
Companion Motty PR: t8y2/motty#956 AutoFocus is a reusable framework focus contract. A persistent declaration must respect explicit sibling focus rather than requiring application-level workarounds in Motty's command draft editor.
mrzj110
force-pushed
the
feat/command-sidebar-663
branch
from
November 17, 2026 04:28
36edf63 to
2007c60
Compare
mrzj110
added a commit
to mrzj110/viva
that referenced
this pull request
Nov 17, 2026
Companion Motty PR: t8y2/motty#956 AutoFocus is a reusable framework focus contract. A persistent declaration must respect explicit sibling focus rather than requiring application-level workarounds in Motty's command draft editor.
mrzj110
marked this pull request as ready for review
November 17, 2026 06:02
Companion Viva PR: vivaui/viva#332 The persistent terminal AutoFocus declaration must respect explicit focus on a sibling draft editor. That reusable input/focus contract belongs in Viva; Motty consumes the framework fix through its existing sibling replacement. Fixes t8y2#663
mrzj110
force-pushed
the
feat/command-sidebar-663
branch
from
November 18, 2026 01:32
2007c60 to
5f425e9
Compare
mrzj110
added a commit
to mrzj110/viva
that referenced
this pull request
Nov 18, 2026
Companion Motty PR: t8y2/motty#956 AutoFocus is a reusable framework focus contract. A persistent declaration must respect explicit sibling focus rather than requiring application-level workarounds in Motty's command draft editor.
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.
Fixes #663.
The terminal workspace now keeps the snippet library beside the active terminal, so commands can be clicked repeatedly without reopening a popup. Selected terminal text can be saved as a snippet from its context menu, then pinned above a persistent multiline draft.
The sidebar and pins share the existing snippet records and sending channel. Library clicks preserve keyboard focus and honor each snippet's Run setting. Pinned items insert into the draft by default, with a separate direct-send button; dynamic variables resolve before either operation.
The composer supports native text input, IME, selection, undo, autosaved committed text, Ctrl+Enter, optional clearing after a successful send, and command/session-bound confirmation for high-risk drafts. It refuses oversized commands instead of truncating executable text. Collapse preferences persist, and narrow layouts preserve room for the terminal.
Framework dependency
Requires the paired Viva autofocus fix: vivaui/viva#332.
The terminal's persistent AutoFocus declaration otherwise reclaims focus from the draft after repaint. That reusable focus behavior is corrected in Viva, rather than hidden behind an application workaround, as required by #11. Motty's existing sibling-directory Viva replacement is unchanged.
Validation
MOTTY_COMMAND_SCREENSHOTSand runTestCommandSidebarNativeDraftFocusUndoAndLayoutwith-tags vivaheadto reproduce the frames.go vet ./..., full source formatting, diff whitespace checks, and the Windows development build passed on upstream base4423c16da3aa3c44e19f5cb28530957e969bd856.This change is submitted for review and CI validation. A separate script-file execution system is outside this change.
Compatibility with upstream
Validated on 2026-11-18 against main at
4423c16da3aa3c44e19f5cb28530957e969bd856.Selection capture uses the page-owned terminal context menu. The snippet dialog keeps upstream's page fields, multiline text area, execution checkbox and shortcut buttons; the pin option uses the same page-checkbox route, with spacing that keeps the checkbox hit regions separate.
TestCommandSelectionSnippetDialogUsesPageControlsfollows right-click selection capture, native multiline editing, pinning and saving, and verifies that saving writes nothing to the terminal.TestCommandSidebarCoexistsWithHostsPanelcovers independent session search and draft input, focus/undo, and wide/narrow layouts.The targeted command/sidebar, hosts-panel, snippet, terminal-menu, persistence, background, split-pane, notes, remote-log, monitor, terminal-input and paste-review tests passed with
-tags vivahead.go vet ./..., full source formatting, diff whitespace checks and the Windows development build passed. The full-suite, race and real-desktop/SSH limitations above still apply.