You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build on the live hotkeys (PR #30) with a vim-style command bar: press : during a running session to open an input line, type a command like channel jazz or mascot off, and hit Enter to apply — without leaving the session. Hotkeys cover the common toggles; the command bar adds discoverable, typed commands with arguments (especially picking a specific channel rather than just cycling with n).
UX
: opens an input field (a dim prompt line); Esc cancels, Enter submits.
The countdown keeps running; on submit/cancel the bar closes and the countdown resumes.
Tab-completion / showing valid options would be a nice later touch (e.g. channel names).
Commands to support (initially)
channel <name> — switch to a named channel (validates against the loaded list)
mascot on|off, voice on|off
volume <0-100>
pause / resume
maybe work <min> / break <min> to retune mid-session (later)
Where it hooks in
Reuses the live-input layer from PR Add live hotkeys to control a running session #30 in src/commands/start.ts (raw-mode keystroke handler + the mutable channel / mascot / voice / volume state + setVolume/restartMusic/heartbeat plumbing). The hotkey actions and command handlers should share the same underlying functions (cycleChannel/adjustVolume/etc. → generalize to setChannel(name) / setVolume(n)).
The one real consideration: rendering
Hotkeys today print a dim status line and let the countdown resume below (a scrolling log). A persistent input field needs a small 2-row layout — the live countdown on one row and the command bar on another — so typing into the bar doesn't fight the 1s \r redraw. This means:
A "suspend the tick redraw → run a mini line-editor → resume" path while the bar is open (handle backspace \x7f, Esc, arrows, Enter ourselves in raw mode).
This is the layout work intentionally deferred from the hotkey MVP.
Shared benefit
The same suspend-redraw + line-editor mechanism is exactly what #17's in-session feedback hotkey needs (type a message mid-session without leaving). Building the command bar's input layer should make #17's hotkey mostly free.
Constraints (per existing conventions)
Best-effort and cosmetic-adjacent: never affect timer accuracy or crash a session.
TTY-only (raw mode); piped/non-interactive sessions just don't offer it.
Keep the greyscale/compact aesthetic.
Acceptance
: opens a command bar; Esc cancels, Enter submits, countdown unaffected.
channel <name>, mascot on|off, voice on|off, volume <n>, pause/resume work and share the hotkey code paths.
Invalid input shows a brief error and doesn't break the session.
Idea
Build on the live hotkeys (PR #30) with a vim-style command bar: press
:during a running session to open an input line, type a command likechannel jazzormascot off, and hit Enter to apply — without leaving the session. Hotkeys cover the common toggles; the command bar adds discoverable, typed commands with arguments (especially picking a specific channel rather than just cycling withn).UX
:opens an input field (a dim prompt line);Esccancels,Entersubmits.Commands to support (initially)
channel <name>— switch to a named channel (validates against the loaded list)mascot on|off,voice on|offvolume <0-100>pause/resumework <min>/break <min>to retune mid-session (later)Where it hooks in
src/commands/start.ts(raw-mode keystroke handler + the mutablechannel/mascot/voice/ volume state +setVolume/restartMusic/heartbeat plumbing). The hotkey actions and command handlers should share the same underlying functions (cycleChannel/adjustVolume/etc. → generalize tosetChannel(name)/setVolume(n)).The one real consideration: rendering
Hotkeys today print a dim status line and let the countdown resume below (a scrolling log). A persistent input field needs a small 2-row layout — the live countdown on one row and the command bar on another — so typing into the bar doesn't fight the 1s
\rredraw. This means:\x7f,Esc, arrows,Enterourselves in raw mode).\r#14.This is the layout work intentionally deferred from the hotkey MVP.
Shared benefit
The same suspend-redraw + line-editor mechanism is exactly what #17's in-session feedback hotkey needs (type a message mid-session without leaving). Building the command bar's input layer should make #17's hotkey mostly free.
Constraints (per existing conventions)
Acceptance
:opens a command bar;Esccancels,Entersubmits, countdown unaffected.channel <name>,mascot on|off,voice on|off,volume <n>,pause/resumework and share the hotkey code paths.\r#14).Refs
\r#14 (width-aware redraw), Full-screen session via the terminal alternate screen buffer #20 (alt-screen takeover)devflow feedback+ in-session hotkey, no browser) #17 (in-session feedback hotkey — shares the suspend-redraw/line-editor mechanism)