Skip to content

refactor: put the dashboard's keep prompt on the board's form modal (bubbles/textinput) #248

Description

@outofcoffee

Why

spinloop work board (#246) introduces charmbracelet/bubbles to the tool — used for textinput alone — behind a form modal: a framed box over the dimmed surface, blink off, Focus following a field cursor. The fleet dashboard's keep prompt (k) is then the last hand-rolled text input in the tool: append-only entry, a bespoke UTF-8-safe backspace (chopLastRune), and framing drawn by hand.

Folding it onto the same pattern makes "the tool is asking for text" one look and one mechanism, and the dashboard gains caret editing, word motions and paste for free — worth having when a keep duration is being corrected mid-entry.

Scope

  • Replace the keep prompt's input machinery (dashboard_model.go's updateKeepPromptKey / chopLastRune) with a bubbles/textinput, blink off, pre-filled 4h as now.
  • Draw it as a small modal over the dimmed dashboard, framed and styled the way the board's add form is, so the two surfaces share one appearance.
  • Behaviour unchanged: parse-or-reprompt with the reason at the foot, esc cancels, q/ctrl+c still quit, an invalid duration never sends a keep. The fleet-client dashboard scenarios keep passing unchanged — caret editing is a UX gain, not a new requirement.
  • Tests: the keep-prompt suite (dashboard_keep_test.go) drives the new modal; render assertions byte-stable with blink off.

Notes

  • Do this after the add-work-board-tui change lands — it is the change that puts bubbles in go.mod; this one adds no dependency of its own.
  • Whatever shared modal drawing emerges should sit where both surfaces find it (beside palette.go's logic), not be copied twice.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions