detached 9484230

fix(ui): suppress omnibox for external panes

commit
9484230b81a905c9f3302d2b52d439c1f0d90d3b
author
brice · · 2026-08-13 08:08 UTC
parent
646bc9f
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +31 -8
M internal/ui/browser_window.go +2 -2
@@ -641,13 +641,13 @@ func (a *App) openExternalURLInFocusedWindow(ctx context.Context, url string, cf
641641 }
642642 case entity.ExternalLinkBehaviorSplit:
643643 if err := a.placeExternalURLInPane(ctx, activeTab.Workspace, url, func(ctx context.Context) error {
644- return a.wsCoord.SplitWithURL(ctx, externalLinkSplitDirection(cfg.Placement), url)
644+ return a.wsCoord.SplitWithURLWithoutOmnibox(ctx, externalLinkSplitDirection(cfg.Placement), url)
645645 }); err != nil {
646646 return err
647647 }
648648 case entity.ExternalLinkBehaviorStacked:
649649 if err := a.placeExternalURLInPane(ctx, activeTab.Workspace, url, func(ctx context.Context) error {
650- return a.wsCoord.StackPaneWithURL(ctx, url)
650+ return a.wsCoord.StackPaneWithURLWithoutOmnibox(ctx, url)
651651 }); err != nil {
652652 return err
653653 }
@@ -641,13 +641,13 @@ func (a *App) openExternalURLInFocusedWindow(ctx context.Context, url string, cf
641 }641 }
642 case entity.ExternalLinkBehaviorSplit:642 case entity.ExternalLinkBehaviorSplit:
643 if err := a.placeExternalURLInPane(ctx, activeTab.Workspace, url, func(ctx context.Context) error {643 if err := a.placeExternalURLInPane(ctx, activeTab.Workspace, url, func(ctx context.Context) error {
644- return a.wsCoord.SplitWithURL(ctx, externalLinkSplitDirection(cfg.Placement), url)644+ return a.wsCoord.SplitWithURLWithoutOmnibox(ctx, externalLinkSplitDirection(cfg.Placement), url)
645 }); err != nil {645 }); err != nil {
646 return err646 return err
647 }647 }
648 case entity.ExternalLinkBehaviorStacked:648 case entity.ExternalLinkBehaviorStacked:
649 if err := a.placeExternalURLInPane(ctx, activeTab.Workspace, url, func(ctx context.Context) error {649 if err := a.placeExternalURLInPane(ctx, activeTab.Workspace, url, func(ctx context.Context) error {
650- return a.wsCoord.StackPaneWithURL(ctx, url)650+ return a.wsCoord.StackPaneWithURLWithoutOmnibox(ctx, url)
651 }); err != nil {651 }); err != nil {
652 return err652 return err
653 }653 }
M internal/ui/coordinator/workspace.go +29 -6
@@ -163,15 +163,25 @@ func setupPaneViewHover(ctx context.Context, pv *component.PaneView, wsView *com
163163
164164 // Split splits the active pane in the given direction.
165165 func (c *WorkspaceCoordinator) Split(ctx context.Context, direction usecase.SplitDirection) error {
166- return c.splitWithInitialURL(ctx, direction, c.newPaneURL)
166+ return c.splitWithInitialURL(ctx, direction, c.newPaneURL, true)
167167 }
168168
169169 // SplitWithURL splits the active pane in the given direction and loads initialURL.
170170 func (c *WorkspaceCoordinator) SplitWithURL(ctx context.Context, direction usecase.SplitDirection, initialURL string) error {
171- return c.splitWithInitialURL(ctx, direction, initialURL)
171+ return c.splitWithInitialURL(ctx, direction, initialURL, true)
172172 }
173173
174-func (c *WorkspaceCoordinator) splitWithInitialURL(ctx context.Context, direction usecase.SplitDirection, initialURL string) error {
174+// SplitWithURLWithoutOmnibox splits the active pane without opening the omnibox.
175+func (c *WorkspaceCoordinator) SplitWithURLWithoutOmnibox(ctx context.Context, direction usecase.SplitDirection, initialURL string) error {
176+ return c.splitWithInitialURL(ctx, direction, initialURL, false)
177+}
178+
179+func (c *WorkspaceCoordinator) splitWithInitialURL(
180+ ctx context.Context,
181+ direction usecase.SplitDirection,
182+ initialURL string,
183+ notifyNewPane bool,
184+) error {
175185 log := logging.FromContext(ctx)
176186
177187 splitCtx, err := c.prepareSplit(ctx, direction)
@@ -204,7 +214,9 @@ func (c *WorkspaceCoordinator) splitWithInitialURL(ctx context.Context, directio
204214 ); err != nil {
205215 return err
206216 }
207- splitCtx.wsView.NotifyNewPaneCreated(ctx)
217+ if notifyNewPane {
218+ splitCtx.wsView.NotifyNewPaneCreated(ctx)
219+ }
208220 }
209221
210222 // Notify state change for session snapshots
@@ -1463,11 +1475,20 @@ func (c *WorkspaceCoordinator) syncStackedViewActive(ctx context.Context, wsView
14631475 // StackPane adds a new pane stacked on top of the active pane.
14641476 // Uses CreateStack use case for new stacks, AddToStack for existing stacks.
14651477 func (c *WorkspaceCoordinator) StackPane(ctx context.Context) error {
1466- return c.StackPaneWithURL(ctx, c.newPaneURL)
1478+ return c.stackPaneWithURL(ctx, c.newPaneURL, true)
14671479 }
14681480
14691481 // StackPaneWithURL adds a new pane containing initialURL to the active stack.
14701482 func (c *WorkspaceCoordinator) StackPaneWithURL(ctx context.Context, initialURL string) error {
1483+ return c.stackPaneWithURL(ctx, initialURL, true)
1484+}
1485+
1486+// StackPaneWithURLWithoutOmnibox adds a stacked pane without opening the omnibox.
1487+func (c *WorkspaceCoordinator) StackPaneWithURLWithoutOmnibox(ctx context.Context, initialURL string) error {
1488+ return c.stackPaneWithURL(ctx, initialURL, false)
1489+}
1490+
1491+func (c *WorkspaceCoordinator) stackPaneWithURL(ctx context.Context, initialURL string, notifyNewPane bool) error {
14711492 log := logging.FromContext(ctx)
14721493
14731494 stackCtx, err := c.prepareStackPane(ctx)
@@ -1529,7 +1550,9 @@ func (c *WorkspaceCoordinator) StackPaneWithURL(ctx context.Context, initialURL
15291550 }
15301551 stackCtx.wsView.FocusPane(newPaneID)
15311552
1532- stackCtx.wsView.NotifyNewPaneCreated(ctx)
1553+ if notifyNewPane {
1554+ stackCtx.wsView.NotifyNewPaneCreated(ctx)
1555+ }
15331556
15341557 // Set up title bar click and close callbacks
15351558 tr := stackCtx.wsView.TreeRenderer()
@@ -163,15 +163,25 @@ func setupPaneViewHover(ctx context.Context, pv *component.PaneView, wsView *com
163 163
164 // Split splits the active pane in the given direction.164 // Split splits the active pane in the given direction.
165 func (c *WorkspaceCoordinator) Split(ctx context.Context, direction usecase.SplitDirection) error {165 func (c *WorkspaceCoordinator) Split(ctx context.Context, direction usecase.SplitDirection) error {
166- return c.splitWithInitialURL(ctx, direction, c.newPaneURL)166+ return c.splitWithInitialURL(ctx, direction, c.newPaneURL, true)
167 }167 }
168 168
169 // SplitWithURL splits the active pane in the given direction and loads initialURL.169 // SplitWithURL splits the active pane in the given direction and loads initialURL.
170 func (c *WorkspaceCoordinator) SplitWithURL(ctx context.Context, direction usecase.SplitDirection, initialURL string) error {170 func (c *WorkspaceCoordinator) SplitWithURL(ctx context.Context, direction usecase.SplitDirection, initialURL string) error {
171- return c.splitWithInitialURL(ctx, direction, initialURL)171+ return c.splitWithInitialURL(ctx, direction, initialURL, true)
172 }172 }
173 173
174-func (c *WorkspaceCoordinator) splitWithInitialURL(ctx context.Context, direction usecase.SplitDirection, initialURL string) error {174+// SplitWithURLWithoutOmnibox splits the active pane without opening the omnibox.
175+func (c *WorkspaceCoordinator) SplitWithURLWithoutOmnibox(ctx context.Context, direction usecase.SplitDirection, initialURL string) error {
176+ return c.splitWithInitialURL(ctx, direction, initialURL, false)
177+}
178+
179+func (c *WorkspaceCoordinator) splitWithInitialURL(
180+ ctx context.Context,
181+ direction usecase.SplitDirection,
182+ initialURL string,
183+ notifyNewPane bool,
184+) error {
175 log := logging.FromContext(ctx)185 log := logging.FromContext(ctx)
176 186
177 splitCtx, err := c.prepareSplit(ctx, direction)187 splitCtx, err := c.prepareSplit(ctx, direction)
@@ -204,7 +214,9 @@ func (c *WorkspaceCoordinator) splitWithInitialURL(ctx context.Context, directio
204 ); err != nil {214 ); err != nil {
205 return err215 return err
206 }216 }
207- splitCtx.wsView.NotifyNewPaneCreated(ctx)217+ if notifyNewPane {
218+ splitCtx.wsView.NotifyNewPaneCreated(ctx)
219+ }
208 }220 }
209 221
210 // Notify state change for session snapshots222 // Notify state change for session snapshots
@@ -1463,11 +1475,20 @@ func (c *WorkspaceCoordinator) syncStackedViewActive(ctx context.Context, wsView
1463 // StackPane adds a new pane stacked on top of the active pane.1475 // StackPane adds a new pane stacked on top of the active pane.
1464 // Uses CreateStack use case for new stacks, AddToStack for existing stacks.1476 // Uses CreateStack use case for new stacks, AddToStack for existing stacks.
1465 func (c *WorkspaceCoordinator) StackPane(ctx context.Context) error {1477 func (c *WorkspaceCoordinator) StackPane(ctx context.Context) error {
1466- return c.StackPaneWithURL(ctx, c.newPaneURL)1478+ return c.stackPaneWithURL(ctx, c.newPaneURL, true)
1467 }1479 }
1468 1480
1469 // StackPaneWithURL adds a new pane containing initialURL to the active stack.1481 // StackPaneWithURL adds a new pane containing initialURL to the active stack.
1470 func (c *WorkspaceCoordinator) StackPaneWithURL(ctx context.Context, initialURL string) error {1482 func (c *WorkspaceCoordinator) StackPaneWithURL(ctx context.Context, initialURL string) error {
1483+ return c.stackPaneWithURL(ctx, initialURL, true)
1484+}
1485+
1486+// StackPaneWithURLWithoutOmnibox adds a stacked pane without opening the omnibox.
1487+func (c *WorkspaceCoordinator) StackPaneWithURLWithoutOmnibox(ctx context.Context, initialURL string) error {
1488+ return c.stackPaneWithURL(ctx, initialURL, false)
1489+}
1490+
1491+func (c *WorkspaceCoordinator) stackPaneWithURL(ctx context.Context, initialURL string, notifyNewPane bool) error {
1471 log := logging.FromContext(ctx)1492 log := logging.FromContext(ctx)
1472 1493
1473 stackCtx, err := c.prepareStackPane(ctx)1494 stackCtx, err := c.prepareStackPane(ctx)
@@ -1529,7 +1550,9 @@ func (c *WorkspaceCoordinator) StackPaneWithURL(ctx context.Context, initialURL
1529 }1550 }
1530 stackCtx.wsView.FocusPane(newPaneID)1551 stackCtx.wsView.FocusPane(newPaneID)
1531 1552
1532- stackCtx.wsView.NotifyNewPaneCreated(ctx)1553+ if notifyNewPane {
1554+ stackCtx.wsView.NotifyNewPaneCreated(ctx)
1555+ }
1533 1556
1534 // Set up title bar click and close callbacks1557 // Set up title bar click and close callbacks
1535 tr := stackCtx.wsView.TreeRenderer()1558 tr := stackCtx.wsView.TreeRenderer()

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close