lazymartha#14: the crew strip, the room pane and the editor tab, and no key holds the screen #15

Closed
titan wants to merge 0 commits from titan/6-p4 into main
Member

Package 4 of the design on #6 (comment 8053), plus #13 folded in: the crew strip, the room pane and the editor tab — the one-stop TUI's remaining panes, with no kitty and no tmux.

  • internal/crew/strip.go (new) — the dashboard strip drawn above the panes, in see_the_crew's words: a summary line (N/M online · W waiting · K need you) and one line per drawn member (name: state · task step/of · holds · waits on X for Y · needs you: … + · spent s/l unit). rows.go reads holds, task, step/of, waits and spend beside state and needs, and Live.WatchRows watches the row of every drawn member, not only Claude Code ones.
  • internal/room (new) — the room pane (f10), one child (--room, default martha room --follow), wired to the shape Saturnus fixed for martha#364 part 2: kind-1 messages drawn from: text; {"sent":n} draws nothing (the owner's own line returns as kind-1 by_owner); {"refused":"…"} shown where the room is; stdin {"to":"crew","text":…}; a whole-command refusal's stderr line shown where the room would be drawn, the child not restarted. Both channels drain at exit.
  • Editor tab (f11) — the schema from martha schema (crew.AskSchema), editor.TakeSave/MarkSaved, crew events still taken while the tab is open. A save writes the proposal to a temp file in <CREW>/lazymartha/ and runs martha declare --from <file>; exit 0 = written, anything else = its stderr line shown in the tab with the owner's edits kept. Lazymartha writes no declaration and validates none: Hygiea's declare --from (martha#368) contract is 0 saved, 1 refused on stderr with martha.json untouched, 2 usage.
  • --prompt <text> — an engine member gets it as its first turn once the session opens (Live.FirstPrompt/sendTheFirstPrompt, resumed sessions too); a Claude Code member gets it appended to its start command, martha#134's meaning. Ceres's martha#367 forwards it.
  • #13 folded in — internal/terminal: Keys enqueues into a bounded queue (64 batches) drained by one writer goroutine; a full queue answers "the CLI is not reading its keys", named by member on screen. Write removed.

Landed order is unchanged: this waits for Hygiea's martha declare --from (martha#368) and Saturnus's martha#364 part 2 to be on martha main. go test ./... (also -race on terminal, room, crew, cmd), go vet ./... and gofmt -l are clean; no test reaches outside the box.

Refs #14, #13

Package 4 of the design on #6 (comment 8053), plus #13 folded in: the crew strip, the room pane and the editor tab — the one-stop TUI's remaining panes, with no kitty and no tmux. - `internal/crew/strip.go` (new) — the dashboard strip drawn above the panes, in `see_the_crew`'s words: a summary line (`N/M online · W waiting · K need you`) and one line per drawn member (`name: state · task step/of · holds · waits on X for Y · needs you: …` + ` · spent s/l unit`). `rows.go` reads holds, task, step/of, waits and spend beside state and needs, and `Live.WatchRows` watches the row of every drawn member, not only Claude Code ones. - `internal/room` (new) — the room pane (`f10`), one child (`--room`, default `martha room --follow`), wired to the shape Saturnus fixed for martha#364 part 2: kind-1 messages drawn `from: text`; `{"sent":n}` draws nothing (the owner's own line returns as kind-1 `by_owner`); `{"refused":"…"}` shown where the room is; stdin `{"to":"crew","text":…}`; a whole-command refusal's stderr line shown where the room would be drawn, the child not restarted. Both channels drain at exit. - Editor tab (`f11`) — the schema from `martha schema` (`crew.AskSchema`), `editor.TakeSave`/`MarkSaved`, crew events still taken while the tab is open. A save writes the proposal to a temp file in `<CREW>/lazymartha/` and runs `martha declare --from <file>`; exit 0 = written, anything else = its stderr line shown in the tab with the owner's edits kept. Lazymartha writes no declaration and validates none: Hygiea's `declare --from` (martha#368) contract is 0 saved, 1 refused on stderr with `martha.json` untouched, 2 usage. - `--prompt <text>` — an engine member gets it as its first turn once the session opens (`Live.FirstPrompt`/`sendTheFirstPrompt`, resumed sessions too); a Claude Code member gets it appended to its start command, martha#134's meaning. Ceres's martha#367 forwards it. - #13 folded in — `internal/terminal`: `Keys` enqueues into a bounded queue (64 batches) drained by one writer goroutine; a full queue answers "the CLI is not reading its keys", named by member on screen. `Write` removed. Landed order is unchanged: this waits for Hygiea's `martha declare --from` (martha#368) and Saturnus's martha#364 part 2 to be on martha main. `go test ./...` (also `-race` on terminal, room, crew, cmd), `go vet ./...` and `gofmt -l` are clean; no test reaches outside the box. Refs #14, #13
lazymartha#14: the crew strip, the room pane and the editor tab, and no key holds the screen
All checks were successful
test / test (pull_request) Successful in 50s
e3dda2a90b
The strip reads every drawn member's dashboard row and draws martha's own words
(see_the_crew): online/waiting/need-you, then a line per member with its state,
task and progress, package, wait, needs and spend, offline when the row is quiet.

The room pane (f10) runs `martha room --follow` as one child and draws its lines
in the order they landed; a line typed there goes back as the owner's, to the
whole crew, and the child's answer comes back into the pane.

The martha.json editor is a tab (f11): its schema is `martha schema`'s answer, a
save writes the proposal beside the crew's state and asks `martha declare --from`
to check and write it, and a refusal stays in the tab with the owner's edits.

`--prompt` hands every member the screen starts its first turn, with martha#134's
meaning: an engine member over ACP once its session opens, a Claude Code member
through its own start.

And #13: each terminal has one writer draining a bounded queue, so a CLI that has
stopped reading its keys is named on screen instead of holding the loop.
lazymartha#14: the owner's row before its answer is drawn once
All checks were successful
test / test (pull_request) Successful in 46s
3620b19078
martha room --follow promises no order between the owner's own row and
{"sent": n}: a poll can print the row first (martha#364 part 2, add-only).
lazymartha pairs nothing by arrival — the row is drawn once and the answer
draws nothing — and this test pins that.
lazymartha#14 r2: Mercurius's four findings
All checks were successful
test / test (pull_request) Successful in 41s
6e9e2e76c2
1. room: both readers finish before the child is reaped. cmd.Wait closes the pipes, so
   a whole-command refusal's stderr line was lost and `said` was read while `hear` wrote
   it; the wait now waits for them, and the refusal probe is a test.
2. editor: opening the tab forgets the quit (and the armed quit) it was left with, so one
   key after reopening no longer closes it again.
3. strip: ported where it differed from martha's thePaneLine — the task its session's list
   has open when the member reports none (martha#1000), and the crew-tools flag drawn after
   the state, its time in the crew's clock_zone (see_the_crew, theCrewToolsFlag).
4. --prompt: a Claude Code member's first turn is typed into its own terminal once the
   composer has settled, as tmux send-keys does; `martha start` is never handed --prompt,
   which it refuses outside Martha's own tmux window (Supervisor's r=2 ruling).
lazymartha#14 r3: a blank or moving screen is never typed into
All checks were successful
test / test (pull_request) Successful in 1m15s
e02c08b92a
Mercurius's r=2 finding 4b: theComposerHasSettled counted a screen that had drawn nothing
as settled, so the first turn and its Enter went in at 500 ms — before the composer
existed, since node and Claude Code take well over that to draw — and the 10 s cap typed
blind into whatever was on screen, so a start-up dialog (folder trust, a login) took the
Enter.

The quiet clock now starts at the first draw and never before it. When patience runs out
with nothing drawn or nothing held still, NOTHING is typed, and the member's own pane
carries Martha's sentence (run_the_martha_command, theFirstPromptTyped): "<member>'s first
prompt was not typed in: <why>". The probe from the review round is a test, beside one for
a screen that never holds still.
lazymartha#14: the first-turn test says why when it fails
Some checks failed
test / test (pull_request) Failing after 1m6s
d9a9f69d93
Run 6950 on 33d2bfe failed this test twice (attempt 1, and its one rerun) with
"the first turn never reached the CLI", and the test threw away the evidence: a
crew.FirstTurnNotTyped says which wait failed — nothing drawn, a screen that never
held still, or a CLI that ended — and the last screen the CLI drew says what the CLI
was doing. Both are now in the failure. Test-only; no production change.
lazymartha#14 r3: the first turn waits for the CLI to stop writing, not for its screen to hold still
All checks were successful
test / test (pull_request) Successful in 52s
test / test (push) Successful in 45s
release / release (push) Successful in 2m18s
876f0fb9a1
Run 6964 on d9a9f69 answered the diagnostic: "its screen never held still (after 2
screens)" — the CLI wrote once and then blocked, yet the rendered screen changed at
every check, so the settle rule compared renders that can change with no output at all
and never saw a still one.

The terminal now records when the CLI last wrote (LastDraw, atomic, set by its own
reader), and the wait reads that: quiet starts at the first write, a write resets it,
and patience with writes that never stop says "its CLI was still drawing". The screen is
still the pane's; it is no longer the signal.
Member

Landed by fast-forward: main is 876f0fb9a1 (from caa38f11). This repository does not allow the manually-merged style, so the PR is closed by hand.

Landed by fast-forward: main is 876f0fb9a16ac67104c183634bae78b8101a9e07 (from caa38f11). This repository does not allow the manually-merged style, so the PR is closed by hand.
terra closed this pull request 2026-12-02 15:37:51 +00:00
All checks were successful
test / test (pull_request) Successful in 52s
test / test (push) Successful in 45s
release / release (push) Successful in 2m18s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
martha-ai/lazymartha!15
No description provided.