Background
PR #73 (slash-command menu) shipped with a deliberate gap — the /charts command was omitted because chartsMode state didn't yet exist on main when that PR was drafted. There's a stale comment in frontend/src/app/ChatPage.tsx:66 recording that decision:
// v1 slash commands. /charts intentionally omitted — no chartsMode state on main yet.
PR #68 (Charts toggle chip) has since landed (or is about to), adding chartsMode / setChartsMode. The gap can now be closed.
Change
Two lines in frontend/src/app/ChatPage.tsx:
-
Add a /charts entry to SLASH_COMMANDS (around line 67), mirroring the existing /plan entry:
{ name: "charts", description: "Toggle Charts mode on/off", kind: "action" },
-
Add a handler branch in selectSlashCommand (around line 920, where /plan is handled):
} else if (cmd.name === "charts") {
setChartsMode((v) => !v);
closeSlash();
}
-
Update the stale comment on line 66 — or just delete it.
Verification
- Type
/charts in the input → menu shows the entry → Enter → Charts chip flips on/off.
- Existing
/plan, /new, /clear, /help still work.
Constraints
Background
PR #73 (slash-command menu) shipped with a deliberate gap — the
/chartscommand was omitted becausechartsModestate didn't yet exist onmainwhen that PR was drafted. There's a stale comment infrontend/src/app/ChatPage.tsx:66recording that decision:// v1 slash commands. /charts intentionally omitted — no chartsMode state on main yet.PR #68 (Charts toggle chip) has since landed (or is about to), adding
chartsMode/setChartsMode. The gap can now be closed.Change
Two lines in
frontend/src/app/ChatPage.tsx:Add a
/chartsentry toSLASH_COMMANDS(around line 67), mirroring the existing/planentry:Add a handler branch in
selectSlashCommand(around line 920, where/planis handled):Update the stale comment on line 66 — or just delete it.
Verification
/chartsin the input → menu shows the entry → Enter → Charts chip flips on/off./plan,/new,/clear,/helpstill work.Constraints