fix(tui): swap [3]/[4] hotkeys to Stats/Utilities
The live number-key handler hard-coded [3]→utilities, [4]→stats and returned early, masking a parallel NUMBER_KEY_ORDER table. Update the live mapping and remove the dead duplicate handler + constant. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -703,11 +703,6 @@ function HelpOverlay() {
|
||||
|
||||
const PANEL_ORDER: SectionId[] = ["system", "logs", "utilities", "stats", "settings"];
|
||||
|
||||
// Number-key mapping (1-5) — kept distinct from PANEL_ORDER/SECTION_ORDER so
|
||||
// the visual/cycle order stays unchanged while [3]/[4] address Stats/Utilities
|
||||
// in the swapped order requested.
|
||||
const NUMBER_KEY_ORDER: SectionId[] = ["system", "logs", "stats", "utilities", "settings"];
|
||||
|
||||
function StatusModeGrid({
|
||||
state,
|
||||
controller,
|
||||
@@ -3950,15 +3945,6 @@ export function DashboardApp({ controller }: DashboardAppProps) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Number keys switch panels (status mode)
|
||||
if (input >= "1" && input <= "5") {
|
||||
const section = NUMBER_KEY_ORDER[parseInt(input, 10) - 1];
|
||||
if (section) {
|
||||
controller.setActiveSection(section);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Tab / Shift+Tab cycle focused panel
|
||||
if (key.tab) {
|
||||
const shift = key.shift;
|
||||
|
||||
Reference in New Issue
Block a user