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` 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", + ); + }); +});