feat(tui): up/down cycle sections on Main; Enter on Logs releases mouse for text selection

Up/Down arrows now cycle the focused panel on the Main page (mirroring
Left/Right), except on the Logs panel where they keep their existing
role of navigating log entries. Expanding a log entry with Enter now
also disables xterm mouse reporting so the user can click-drag to
select the message text; closing the expanded view restores wheel
scrolling.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-05-05 15:03:29 -07:00
parent 61dac2801d
commit 8a57d3fa96
2 changed files with 22 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
---
"@runfusion/fusion": patch
---
feat(tui): up/down arrows now cycle sections on the Main page (matching ←/→), except on the Logs panel where they continue to navigate log entries. Pressing Enter on a Logs entry now also releases xterm mouse reporting while the entry is expanded, so users can click-drag to select log text for copying; closing the expanded view restores wheel scrolling automatically.

View File

@@ -693,8 +693,9 @@ function HelpOverlay() {
["[Shift+Tab]", "Cycle focused panel / pane backward"],
["[1-5]", "Jump to panel (Main: System/Logs/Stats/Utilities/Settings)"],
["[← / →]", "Switch pane (Agents, Settings, Files, Git)"],
["[→] / [n]", "Next panel (Main)"],
["[←] / [p]", "Previous panel (Main)"],
["[→] / [↓] / [n]", "Next panel (Main; ↑/↓ scroll on Logs)"],
["[←] / [↑] / [p]", "Previous panel (Main; ↑/↓ scroll on Logs)"],
["[Enter]", "Expand log + release mouse for text selection (Logs)"],
["[r]", "Refresh stats (Utilities)"],
["[c]", "Clear logs (Utilities)"],
["[k]", "Kill all vitest processes (Utilities)"],
@@ -4022,11 +4023,14 @@ export function DashboardApp({ controller }: DashboardAppProps) {
// Other status panels (System / Stats / Utilities / Settings) leave it
// off so the user can select text natively. [M] is still a manual
// override, but the next focus change will reapply this policy.
// When a log entry is expanded, disable mouse reporting so the user can
// click-drag to select the message text natively. Esc/Enter closes the
// expanded view and the policy reapplies, restoring wheel scrolling.
const wantsMouse = state.mode === "interactive"
? (state.interactiveView === "files"
|| state.interactiveView === "git"
|| state.interactiveView === "board")
: state.activeSection === "logs";
: (state.activeSection === "logs" && !state.logsExpandedMode);
useEffect(() => {
if (state.mouseEnabled !== wantsMouse) {
controller.setMouseEnabled(wantsMouse);
@@ -4242,6 +4246,16 @@ export function DashboardApp({ controller }: DashboardAppProps) {
return;
}
// Up/Down also cycle sections, except on Logs where they navigate entries.
if (key.downArrow && state.activeSection !== "logs") {
controller.cycleSection(1);
return;
}
if (key.upArrow && state.activeSection !== "logs") {
controller.cycleSection(-1);
return;
}
// Utilities actions
if (state.activeSection === "utilities") {
void controller.handleUtilityAction(input);