Repository navigation
feat(app): add a split button to the command bar - #177
Merged
Merged
Conversation
The button sits after History and opens the session row's panes' items (paneMenu) above the bar, for the focused pane. Equalize panes now gives the focused pane's terminal the keyboard, as the other items do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015nMqJHsqtndDSqJDPp1qYv
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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
The split items were only in the session row's context menu and on shortcuts. This adds a Split button at the right end of the command bar, after History, that opens the same items for the focused pane.
columns-2icon (0.469.0, the same version as the other icons), with the tooltip and accessible name "Split" / "分屏". It is disabled while the session is connecting or disconnected. New tabs have no command bar, and with the bar turned off there is no button.paneMenu(paneview.go), the same function the session row's menu uses, so the items are not copied: Split right, Split down, Zoom this pane, Equalize panes, Move pane, Close this pane, with their shortcuts. With one pane, everything but the two splits is disabled.PopoverMenuButton(drawn in the window, as the network tab's interface menu already is): a system menu opens below its button and would cover the file panel.refocus. Equalize panes now sets it too, in the row's menu as well. The button callsInvalidatewhen a refocus is pending, because the panes are built before the bar.docs/screenshots/main-*andquick-commands-*, which show the bar.Closes #174
Compared with the mockup
The menu content, the button's place right of History and its icon match the mockup, and so does the menu's position above the bar, right-aligned. With one pane, the same items are disabled. Differences:
paneMenuafter the mockup was drawn. Since the menu comes from the same function, it shows here too.Testing
internal/app/splitbutton_test.go:TestSplitButton: the button comes after the input and after History. Its menu has the row menu's items and their shortcuts. Zoom, Equalize and Close are disabled with one pane. Split right and Split down add panes on the same connection. Equalize, Zoom, Move pane › up and Close act on the focused pane. After each item, typed keys reach the focused pane's shell. The button is disabled when disconnected, absent in a new tab and absent with the command bar off.TestSplitButtonLocal: a local terminal splits from the button.TestSplitButtonScreenshots: frames in English and Simplified Chinese, with two panes and with one.go fmt ./...(no changes),go build ./...,go vet ./...,GOOS=windows go vet ./...,GOOS=darwin go vet .,go tool mygo vet,go tool mygo generateandgo test -race ./...all pass after the rebase onto main (5f052fb).go run ./tools/screenshotsregenerated the README scenes that show the bar.Generated by Claude Code