@@ -9,11 +9,13 @@ Keep it that way.
99
1010| Path | Responsibility |
1111| ------| ----------------|
12- | ` cmd/bodek ` | CLI entry point: flags, lifecycle, ` version ` / ` upgrade ` subcommands |
13- | ` internal/server ` | Launch / attach to ` odek serve ` , resolve the auth token |
12+ | ` cmd/bodek ` | CLI entry point: flags, lifecycle, ` version ` / ` upgrade ` subcommands, connection ` diagnose ` , and orphan-watchdog re-exec |
13+ | ` internal/server ` | Launch / attach to ` odek serve ` , resolve the auth token, progress-aware shutdown with escalation countdown |
1414| ` internal/client ` | odek serve WebSocket protocol (transport + REST + decoding) |
1515| ` internal/tokens ` | Local persistence of per-session auth tokens |
1616| ` internal/workspace ` | Per-cwd draft, queue, history, and last-session id |
17+ | ` internal/settings ` | Persisted front-end preferences (theme, bell, notify, plain, verbosity, thinking, resume, reduce-motion) at ` ~/.bodek/config.json ` ; flag > file > default resolution with a theme-only ` BODEK_THEME ` env override (` BODEK_CONFIG ` relocates the file); odek's config is untouched |
18+ | ` internal/watchdog ` | Orphan guard: re-execs a tiny watchdog that terminates ` odek serve ` when the bodek parent dies for any reason (per-platform impls) |
1719| ` internal/tui ` | The Bubble Tea model, update loop, panels, and view |
1820| ` internal/update ` | Self-upgrade: fetch and swap in the latest GitHub release binary |
1921
@@ -170,8 +172,9 @@ feat(tui): compact tool steps with Ctrl+E details toggle
170172 an approval or clarify card is head, and queue-strip focus outranks the
171173 skill-suggestion chip (its chords never answer a passive card while
172174 ` qfocus ` is set). Bare ` s ` /` x ` save/skip a pending suggestion only on an
173- empty draft — the same modifier-free fallback approvals use for
174- terminals that cannot deliver Alt chords (macOS Option-as-UTF-8).
175+ empty draft — see the approval empty-draft rule for the same
176+ modifier-free fallback on terminals that cannot deliver Alt chords
177+ (macOS Option-as-UTF-8); one rule, two surfaces, keep them in sync.
175178 Enable kitty disambiguate (flag 1) and xterm ` modifyOtherKeys=2 ` from
176179 ` Init ` — after alt-screen — so Cursor/xterm.js encodes Shift+Enter
177180 (` CSI 27 ; 2 ; 13 ~ ` ) instead of CR. Never enable kitty "report all
@@ -207,7 +210,8 @@ feat(tui): compact tool steps with Ctrl+E details toggle
207210 input it recognises as a file (` tty_unix.go ` ` initInput ` ) — a plain wrapper
208211 would leave the program in cooked mode. One pump goroutine per program
209212 instance; ` Close ` stops it without closing stdin, which the program does not
210- own. Alt-screen always enables mouse
213+ own. Alt-screen enables mouse cell-motion by default (` --plain ` is the
214+ documented opt-out, skipping mouse reporting)
211215 cell-motion so the wheel scrolls (and clicks hit turn heads / answer
212216 cards / steps / the queue). A left-click on an answer card (or a
213217 collapsed summary) copies that turn's ` msg.content ` — final or the
@@ -227,7 +231,9 @@ feat(tui): compact tool steps with Ctrl+E details toggle
227231 stays. Approvals render above a live composer: bare ` a ` /` d ` /` t ` decide
228232only while the composer draft is empty (a non-empty draft, paste, or any
229233modifier routes to the composer), and ` Alt+A ` /` Alt+D ` /` Alt+T `
230- decide. Text, paste, cursor keys, and Enter retain composer behavior. Friction
234+ decide. On Alt-less terminals (macOS Option-as-UTF-8), ` ^U ` clears the
235+ whole draft first, restoring the bare-key path — never leave such a
236+ terminal with no reachable approval binding. Text, paste, cursor keys, and Enter retain composer behavior. Friction
231237 captures ` apprTyped ` only after explicit ` Alt+A ` ; Escape returns to the draft
232238 without deciding. Keep the editor rune/row bounded and reset it on head changes. Clarify questions capture the
233239 keyboard into ` clarifyBuf ` : the spacebar is Bubble Tea ` KeySpace ` (not
@@ -253,15 +259,16 @@ modifier routes to the composer), and `Alt+A`/`Alt+D`/`Alt+T`
253259- The slash-completion popup holds key capture while open; typed keys
254260 must keep flowing to the input. Route keys through the popup first,
255261 then fall through to normal input handling.
256- - ESC closes the topmost window, then inspect chrome, then (if busy)
257- arms cancel. Order : confirm disarm → palette → drawer edit/detail/tab
262+ - ESC closes the topmost window, then (if busy) arms cancel. The chain
263+ below is the authoritative order : confirm disarm → palette → drawer edit/detail/tab
258264 → cockpit → find → ` @ ` /` / ` popup → queue strip → approval (collapse
259265 details, then arm cancellation; ` Alt+D ` denies) → clarify (arm cancel while busy; the card stays)
260266 → skill chip / ` ^E ` / open thinking / agent
261267 focus / expanded step / help card → cancel gate. Do not let a leftover
262268 overlay swallow ESC without dismissing. ` Ctrl+X ` independently arms turn
263269 cancellation before modal routing; the confirmation footer must remain visible
264- above every panel and approval. Inspect Escape returns to the composer first.
270+ above every panel and approval. While inspecting, ESC leaves inspection
271+ per the chain above (inspect items sit near its tail) rather than arming cancel.
265272- Management drawer tabs (memory/skills/tools/config — and jobs) have a detail
266273 submode: ` ⏎ ` expands the selected row (skill description, full fact
267274 text, MCP args, raw config JSON — everything through ` sanitize() ` ),
@@ -322,6 +329,10 @@ modifier routes to the composer), and `Alt+A`/`Alt+D`/`Alt+T`
322329 sync when you change user-visible behaviour.
323330- CI (` .github/workflows ` ) runs build, vet, lint, and race tests on every
324331 push — a red pipeline means the commit checklist above was skipped.
332+ - Process lifecycle: bodek owns the ` odek serve ` child end to end — normal
333+ Stop shuts it down gracefully (with progress and a live escalation
334+ countdown), and the watchdog covers abnormal parent death. Never break
335+ either path by assuming the child outlives the parent, or vice versa.
325336
326337## Terminal polish regression bar
327338
0 commit comments