Skip to content

feat(tui): planning mode UI — drawer tab, live strip, semantic rows - #36

Merged
jkyberneees merged 3 commits into
mainfrom
feat/planning-mode-ui
Aug 27, 2026
Merged

feat(tui): planning mode UI — drawer tab, live strip, semantic rows#36
jkyberneees merged 3 commits into
mainfrom
feat/planning-mode-ui

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

What

Read-only UI surface for odek's engine plan system (docs/PLANNING.md in odek), implemented per docs/PLANNING_MODE_UI.md in this PR. No odek changes required — consumes existing protocol only.

  • Client — typed PlanSnapshot/PlanStep decoding of GET /api/sessions/{id}/plan (session-token auth, found:false/404/malformed handled).
  • State — WS tool_call{name:plan} triggers a 250 ms debounced REST fetch; monotonic version guard rejects stale/out-of-order replies; session switches drain in-flight work; old engines without the route degrade silently (no retries on a dead route); 3 s poll only while the drawer tab is visible.
  • Drawer tab 4 plan — Telegram-parity renderer (glyph/id/title/note rows + v7 · 1/4 done · ⛔1 badge), house detail grammar (⏎ expand / esc·q fold), collapsed-all-done vs no-plan vs unavailable states.
  • Live strip▸ plan 1/4 · <active step> · ⛔1 rides the busy line only while a run is active and a non-collapsed plan exists; zero pixels otherwise.
  • Transcript — plan tool steps render semantic one-liners (🔄 plan p2 → in_progress) instead of JSON blobs; ingestion order and stats untouched; Ctrl+E still reveals raw args.
  • /plan slash command; README key bindings/drawer docs synced.

Verification

  • New tests: client wire contract (4), TUI state machine (5 incl. monotonic guard + poll lifecycle), tab surface (3 incl. edge states + detail fold), strip visibility matrix, /plan e2e case (found:false over live HTTP via stand-in).
  • Full gate green locally: make fmt, make vet, make lint 0 issues, make test race suite all packages ok.

Design contract for bodek's read-only surface onto odek's engine plan
state: WS-trigger/debounced-REST architecture, drawer tab, live strip,
transcript specialization, edge cases and test strategy. Verified against
odek serve's /api/sessions/{id}/plan endpoint and tool_call pairing.
Typed PlanSnapshot/PlanStep decoding for GET /api/sessions/{id}/plan
with the session-scoped token. Covers snapshot decode, found:false,
404 error mapping and malformed-body tolerance against httptest
fixtures.
Read-only planning surface fed by odek's plan endpoint. WS plan
tool_call triggers a debounced structured fetch guarded by the store's
monotonic version; session switches drain in-flight replies; old
engines without the route degrade silently.

Surfaces: drawer tab 4 with Telegram-parity rows and summary badge,
detail submode per house grammar; live plan summary on the busy line
only while a run is active and a non-collapsed plan exists; semantic
one-liners replace JSON blobs for plan tool steps (ingestion order and
stats untouched); /plan slash command. README synced.
@jkyberneees
jkyberneees merged commit 1969e93 into main Aug 27, 2026
5 checks passed
@jkyberneees
jkyberneees deleted the feat/planning-mode-ui branch August 27, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant