From bed91676052c374cbfe56ee519fb988253d7172b Mon Sep 17 00:00:00 2001 From: Lanh Hoang Date: Sun, 5 Jul 2026 21:29:11 -0400 Subject: [PATCH 1/2] docs: update phase 3 plan --- .../plans/2026-07-05-dashboard-overlay-tabs-phase-3.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/superpowers/plans/2026-07-05-dashboard-overlay-tabs-phase-3.md b/docs/superpowers/plans/2026-07-05-dashboard-overlay-tabs-phase-3.md index f970d39..1a86bbf 100644 --- a/docs/superpowers/plans/2026-07-05-dashboard-overlay-tabs-phase-3.md +++ b/docs/superpowers/plans/2026-07-05-dashboard-overlay-tabs-phase-3.md @@ -72,6 +72,7 @@ export const UI_STRINGS = { ``` The resulting footer strings are: + - `statistics`: `[Tab/Shift-Tab] Switch tab • [Left/Right] Period • [Up/Down] Row • [Enter] Expand • [q/Esc] Close` - `current`: `[Tab/Shift-Tab] Switch tab • [Left/Right] Provider • [q/Esc] Close` - `insights`: `[Tab/Shift-Tab] Switch tab • [Left/Right] Period • [q/Esc] Close` From 438095c77be7f66536059da2e107f5bf06d75233 Mon Sep 17 00:00:00 2001 From: Lanh Hoang Date: Sun, 5 Jul 2026 21:08:02 -0400 Subject: [PATCH 2/2] feat(constants): add per-tab footer strings --- src/shared/constants.ts | 21 +++++++++++++++++++++ tests/constants.test.ts | 22 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 tests/constants.test.ts diff --git a/src/shared/constants.ts b/src/shared/constants.ts index 8de9377..fbb4b10 100644 --- a/src/shared/constants.ts +++ b/src/shared/constants.ts @@ -46,6 +46,27 @@ export const PERIOD_ORDER: UsageWindow[] = [ export const UI_STRINGS = { dashboardTitle: "Pi Usage Dashboard", + // New per-tab footers (used by the tabbed overlay starting Phase 4) + dashboardFooters: { + statistics: [ + "[Tab/Shift-Tab] Switch tab", + "[Left/Right] Period", + "[Up/Down] Row", + "[Enter] Expand", + "[q/Esc] Close", + ].join(" • "), + current: [ + "[Tab/Shift-Tab] Switch tab", + "[Left/Right] Provider", + "[q/Esc] Close", + ].join(" • "), + insights: [ + "[Tab/Shift-Tab] Switch tab", + "[Left/Right] Period", + "[q/Esc] Close", + ].join(" • "), + }, + // Legacy -- removed in Phase 5 when dashboard.ts stops referencing them dashboardFooter: [ "[Tab/Shift-Tab] Provider", "[Left/Right] Period", diff --git a/tests/constants.test.ts b/tests/constants.test.ts new file mode 100644 index 0000000..2c57b9a --- /dev/null +++ b/tests/constants.test.ts @@ -0,0 +1,22 @@ +import { describe, expect, it } from "vitest"; +import { UI_STRINGS } from "../src/shared/constants.ts"; + +describe("UI_STRINGS.dashboardFooters", () => { + it("statistics footer matches expected format", () => { + expect(UI_STRINGS.dashboardFooters.statistics).toBe( + "[Tab/Shift-Tab] Switch tab \u2022 [Left/Right] Period \u2022 [Up/Down] Row \u2022 [Enter] Expand \u2022 [q/Esc] Close", + ); + }); + + it("current footer matches expected format", () => { + expect(UI_STRINGS.dashboardFooters.current).toBe( + "[Tab/Shift-Tab] Switch tab \u2022 [Left/Right] Provider \u2022 [q/Esc] Close", + ); + }); + + it("insights footer matches expected format", () => { + expect(UI_STRINGS.dashboardFooters.insights).toBe( + "[Tab/Shift-Tab] Switch tab \u2022 [Left/Right] Period \u2022 [q/Esc] Close", + ); + }); +});