fix(tui): G jumps to last log; Agents ←/→ switch panes
The global "switch to Settings" shortcut matched both g and G, so uppercase G never reached the logs panel and the vim-style "jump to end" never fired. Restrict the global handler to lowercase g; G falls through to the active panel — including the status-mode logs list (jump-to-newest) and any other scrollable panel that opts in. Agents view: ← focuses the list pane, → focuses the detail pane, matching the visual layout. Tab still cycles either direction. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1491,8 +1491,9 @@ function BoardView({ state, controller }: { state: DashboardState; controller: D
|
||||
}
|
||||
|
||||
// Cross-view shortcuts — explicit so they work regardless of any
|
||||
// global-handler ordering quirks. p/n stay board-local.
|
||||
if (input === "g" || input === "G") {
|
||||
// global-handler ordering quirks. Lowercase only; uppercase G is
|
||||
// reserved for "jump to end" semantics in scrollable panels.
|
||||
if (input === "g") {
|
||||
controller.setInteractiveView("settings");
|
||||
return;
|
||||
}
|
||||
@@ -1774,10 +1775,21 @@ function AgentsView({ state }: { state: DashboardState }) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Tab cycles list ↔ detail. Left/right also switch — the list is the
|
||||
// "left" pane and detail the "right" pane, so the arrow direction
|
||||
// matches the visual layout.
|
||||
if (key.tab) {
|
||||
setDetailFocused((f) => !f);
|
||||
return;
|
||||
}
|
||||
if (key.leftArrow) {
|
||||
setDetailFocused(false);
|
||||
return;
|
||||
}
|
||||
if (key.rightArrow) {
|
||||
setDetailFocused(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!detailFocused) {
|
||||
if (key.upArrow || input === "k") {
|
||||
@@ -3425,7 +3437,9 @@ export function DashboardApp({ controller }: DashboardAppProps) {
|
||||
controller.setInteractiveView("agents");
|
||||
return;
|
||||
}
|
||||
if (input === "g" || input === "G") {
|
||||
// Lowercase only — uppercase G is reserved for vim-style "jump to end"
|
||||
// in panels that opt-in (e.g. logs in status mode, file preview, etc.).
|
||||
if (input === "g") {
|
||||
controller.setMode("interactive");
|
||||
controller.setInteractiveView("settings");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user