detached 385e5a2

feat(pane): add stack-pane shortcut binding (s key), stub handler until incremental ops implemented

commit
385e5a201b26edd140f0b55e0d0f9814a851639a
author
brice · · 2025-12-16 05:09 UTC
parent
e926382
signature
unsigned
2 files · +17 -0
M internal/infrastructure/config/defaults.go +1 -0
@@ -167,6 +167,7 @@ func DefaultConfig() *Config {
167167 "split-left": {"arrowleft", "l"},
168168 "split-up": {"arrowup", "u"},
169169 "split-down": {"arrowdown", "d"},
170+ "stack-pane": {"s"},
170171 "close-pane": {"x"},
171172 "confirm": {"enter"},
172173 "cancel": {"escape"},
@@ -167,6 +167,7 @@ func DefaultConfig() *Config {
167 "split-left": {"arrowleft", "l"},167 "split-left": {"arrowleft", "l"},
168 "split-up": {"arrowup", "u"},168 "split-up": {"arrowup", "u"},
169 "split-down": {"arrowdown", "d"},169 "split-down": {"arrowdown", "d"},
170+ "stack-pane": {"s"},
170 "close-pane": {"x"},171 "close-pane": {"x"},
171 "confirm": {"enter"},172 "confirm": {"enter"},
172 "cancel": {"escape"},173 "cancel": {"escape"},
M internal/ui/app.go +16 -0
@@ -300,6 +300,8 @@ func (a *App) handleKeyboardAction(ctx context.Context, action input.Action) err
300300 return a.handlePaneSplit(ctx, usecase.SplitDown)
301301 case input.ActionClosePane:
302302 return a.handleClosePane(ctx)
303+ case input.ActionStackPane:
304+ return a.handleStackPane(ctx)
303305 case input.ActionFocusRight:
304306 return a.handlePaneFocus(ctx, usecase.NavRight)
305307 case input.ActionFocusLeft:
@@ -668,6 +670,20 @@ func (a *App) handlePaneFocus(ctx context.Context, direction usecase.NavigateDir
668670 return nil
669671 }
670672
673+// handleStackPane converts the active pane into a stacked container.
674+// TODO: Implement incremental widget operations for stacked panes (like old repo).
675+// Currently, stacked panes require incremental GTK widget manipulation rather than
676+// full tree rebuilds because WebViews maintain state and parent references.
677+func (a *App) handleStackPane(ctx context.Context) error {
678+ log := logging.FromContext(ctx)
679+
680+ // Stacked panes are not yet fully supported in the new architecture.
681+ // The rebuild approach conflicts with WebView's stateful widget lifecycle.
682+ // See dumber-refs/internal/app/browser/stacked_panes.go for incremental approach.
683+ log.Warn().Msg("stacked panes not yet implemented in clean architecture - requires incremental widget operations")
684+ return nil
685+}
686+
671687 // attachWorkspaceWebViews ensures each pane has a WebView widget attached.
672688 func (a *App) attachWorkspaceWebViews(ctx context.Context, ws *entity.Workspace, wsView *component.WorkspaceView) {
673689 log := logging.FromContext(ctx)
@@ -300,6 +300,8 @@ func (a *App) handleKeyboardAction(ctx context.Context, action input.Action) err
300 return a.handlePaneSplit(ctx, usecase.SplitDown)300 return a.handlePaneSplit(ctx, usecase.SplitDown)
301 case input.ActionClosePane:301 case input.ActionClosePane:
302 return a.handleClosePane(ctx)302 return a.handleClosePane(ctx)
303+ case input.ActionStackPane:
304+ return a.handleStackPane(ctx)
303 case input.ActionFocusRight:305 case input.ActionFocusRight:
304 return a.handlePaneFocus(ctx, usecase.NavRight)306 return a.handlePaneFocus(ctx, usecase.NavRight)
305 case input.ActionFocusLeft:307 case input.ActionFocusLeft:
@@ -668,6 +670,20 @@ func (a *App) handlePaneFocus(ctx context.Context, direction usecase.NavigateDir
668 return nil670 return nil
669 }671 }
670 672
673+// handleStackPane converts the active pane into a stacked container.
674+// TODO: Implement incremental widget operations for stacked panes (like old repo).
675+// Currently, stacked panes require incremental GTK widget manipulation rather than
676+// full tree rebuilds because WebViews maintain state and parent references.
677+func (a *App) handleStackPane(ctx context.Context) error {
678+ log := logging.FromContext(ctx)
679+
680+ // Stacked panes are not yet fully supported in the new architecture.
681+ // The rebuild approach conflicts with WebView's stateful widget lifecycle.
682+ // See dumber-refs/internal/app/browser/stacked_panes.go for incremental approach.
683+ log.Warn().Msg("stacked panes not yet implemented in clean architecture - requires incremental widget operations")
684+ return nil
685+}
686+
671 // attachWorkspaceWebViews ensures each pane has a WebView widget attached.687 // attachWorkspaceWebViews ensures each pane has a WebView widget attached.
672 func (a *App) attachWorkspaceWebViews(ctx context.Context, ws *entity.Workspace, wsView *component.WorkspaceView) {688 func (a *App) attachWorkspaceWebViews(ctx context.Context, ws *entity.Workspace, wsView *component.WorkspaceView) {
673 log := logging.FromContext(ctx)689 log := logging.FromContext(ctx)

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