- A tab, once built, stays: hidden while another shows (invisible, kept
laid out), so switching back only shows it. The floating composer is kept
built too, shown where it floats (a hidden mirror never takes the model
picker: LaneTab.Composer `shown`).
- A hidden tab does no work: what Overview and the Board read goes through
held computeds (ds/hold) that keep their last value while the tab is
hidden; a shown tab wakes a frame after the click, so the click's frame
only shows it and the catch-up comes on the next. Progress rows and the
widgets' figures are held the same way; the Chat tab's streaming reply is
held while hidden (its lane stays watched, so nothing reloads on show).
- The tabs not shown are built in the background once the page has
settled (ds/stage `Idle`: one piece a frame, a widget, a Board card or the
transcript; out of layout until the last is in), and at once if opened
first.
Show chats now keeps an unread failure a day and a crew row with no chat
only while new: the sample's sccache thread (failed 25 hours before, its ask
answered) left the Map, and the crew-names test's unheard row with it. The
sample's failure is 22 hours old and the row joined now, as each test means.
The Map showed two "honeypot"s: the engine's device rows from earlier
registrations of the machine (17 and 11 days unseen) stayed under its name,
and an offline machine counted as in use by threads Show chats then hid, so
it stood empty ("Nothing running"), as X16 and DESKTOP did.
- Device rows of one name and platform are one machine, under the row in
use (this device, else one online, else the one seen last); their chats
go with it. Cloud sessions stay apart. No row is dropped from the data.
- A machine offline shows only for a thread still shown on it.
The Control room is three tabs, the one shown kept on this device
(`control_tab`), Cmd/Ctrl+Alt+1-3:
- Overview: the full Capture composer and the widgets (Needs you, Q&A,
Progress, Map, Scratchpad, Machines, Comms), show/hide/reorder as before.
- Board: the Board across the page, its figures over it.
- Chat: the Brain dump's chat read as any chat (lane_tab's transcript,
new `read` kind), watched only while the tab shows.
Only the tab shown is built. Capture's floating composer is on every tab
(Overview's once Capture is scrolled away), one draft, chips and model;
on Chat it sends a dump as Capture does. A card's Show dump goes to
Overview, where Capture's history is.
Every zgx dependency and [patch] entry points at katulevskiy/zgx rev
e49ae7a3c (branch linux-idle-spin-ac935c6): zeronsh/zgx ac935c6, the rev
pinned until now, plus only the Linux idle-spin fix. On Wayland a granted
frame that presented nothing left no frame callback pending, so the event
loop busy-waited between a rate-limited animation's steps (52-82% of a
core with a status ring on screen; 7-9% with the fix).
Temporary: back to zeronsh/zgx at a rev that has the fix once
zeronsh/zgx#2265 merges.
"done" is finished and not seen since; crew chats nobody opens stay so for
good, so Show chats kept every one of them on the Map (154 of 218 lanes on a
700-chat account, the oldest weeks old). Unread now shows whatever the mode
for a day after the chat last moved (UNREAD_FOR), then as any finished chat.
A crew row whose chat the Map never heard of (gone, or not reported) always
showed: 48 lanes on a 700-chat account. It now shows while it joined within
the window (a chat just started, not heard yet), and in All.
The Control room froze on a 1044 x 6356 Timeline (218 lanes): the Map grew
with every lane, and the Timeline and Topology drew one canvas the field's
height, past zgx's 32 MiB raster limit, which skipped the window's frame.
- Every view sits in a scroll as tall as its content up to three quarters
of the window (360 to 900 points).
- The Timeline's chart and the Topology's rails draw through kit.Tiled:
canvases 512 points high, each drawing its band (lanes outside skipped,
text in the band it starts in, paths through kit.path to move with it).
- tests/orch_map_bounds: a 165-thread fleet in every view stays within the
bound and under the raster limit; the page keeps answering.
RUST_LOG replaced the whole filter, so RUST_LOG=info logged loro's
"Diagnosing EncodedBlock" lines on every snapshot export and commit
(thousands a minute under load). They stay at warn unless RUST_LOG names
loro itself.
read_orchestration copied every dump ever to keep the newest 50, and every
ask ever made. It now copies only the newest 50 dumps, and the asks still
current: every open one, plus closed ones from the last 14 days or among the
newest 20 closed. Older rows stay in the registry (synced, saved, readable
by id); they are only out of the state every reader copies and every
watcher is sent.
- escalate, bring-back, chase, wake and the board queue scan the rows
without the registry lock (Orchestration::scan) and read each row they
change again under it before writing; wake and the queue look up one
chat row instead of reading every chat.
- The progress loop observes only the session rows that changed since the
last event (it observed every session, each unfollowed one with a
registry read).
- Every one-shot model run (progress notes, the end-of-turn borderline
check, reply verdicts, Q&A condensing) goes through one limiter: at most
two at once engine-wide, one run shared by callers with the same input,
and replies kept by input (30 min; 5 min for no reply, so an unsure
verdict isn't asked again each turn start and end). A note is skipped,
whatever asked for it, when the transcript hasn't changed since the last.
- Timing logs at target perf (debug) for the timers, notes and model runs,
and once a minute a stats line: RSS, registry rows per kind, unsent ops,
warm chat docs, followed chats and the limiter's counts.
persist copied the replica and wrote it to SQLite under the registry lock:
in a release build a save held it for up to 1.4 s and every reader and
writer (the orchestration timers, session writes, chat lookups) waited
behind it. Now the rows a save records are copied under the lock
(RegistryDoc::begin_save), and encoding and the SQLite write happen outside
it; saves stay serialized by the registry_base lock. A write made during a
save goes to the next one; a save that isn't stored puts its rows back as
unsaved.
The registry lock is taken through a timed guard: waits and holds of 5 ms
or more log at target perf (debug) with where it was taken, and each
thread counts the registry locks it holds, so long work can assert it
holds none.
scan_orchestration gives a scan the orchestration rows without waiting on
the lock: the published value when it is current or the lock is busy,
read now otherwise. Also row counts per kind (stats) and a selective cached
read (read_cached_with) that copies only what a reader needs.
Capture's composer opened the Brain dump chat as a lane, so the host built
and published its whole transcript (381 messages, 1.14 MB as JSON) into
chat.lane.control-capture.messages, though Capture never shows it. The
composer is now lazy: till the pointer comes over it, it takes the keys or
its model is asked for, its session is the chats list's row (agent and
model), and nothing is watched. Once used, the host's session as before.
The newest receipt and the history build a frame after the composer
(ds/stage). The history builds its latest ten rows, ten more on a click;
a board card's source past them widens it. Each row's hues keep their
table while unchanged.
Sandbox, Capture alone: lane 1,142,686 bytes -> empty; build 29-41 ms ->
16-25 ms (history closed), 50-59 ms -> 33-46 ms (history open).
A need carried its whole chat row, so any sessions push touching that chat
(its activity, its title) handed every row a new item. Rows now get only
the fields they show, the previous table kept while equal, so a new ask
or a republish wakes its own row alone.
Its first opening loaded screens/control/page inside the menu's build, past
the script budget when the main thread was busy (the sidebar_crew flake).
Test runner, first open: 49-98 ms -> 3.7-4.9 ms.
Every thread's row was built in the frame the Map opened: 231-552 ms on
the sandbox's fleet. Its rows stand where the layout puts them, so they
now come twelve a frame without moving any. Sandbox, Control Room open
with the Topology: worst frame 231-235 -> 89-124 ms.
Progress.rows and Progress.listed were worked out on every read and handed
out anew on every sessions or timeline push, so every reader ran again
whether or not a row changed. Now each is one ui.computed, owned by the
script, that gives back the table it gave before while what it says is
the same; the minute a fresh row counts by is a state of its own.
Sandbox, Control Room, 10 sessions pushes: sessions-caused script
351 -> 254 ms, worst frame 254 -> 140 ms.
people.Timestamp moved on each minute with anime.createTimer { loop },
which the animation engine plays every frame: one timestamp on screen
(git, comments, rows that show a time) kept the window drawing at 30 fps
and, on Linux, the event loop spinning, for as long as it showed. Seen in
the sandbox after a burst of status changes: one clip left playing, the
app at ~60% of a core on any page until a reload. Now ui.every(60000),
owned by the timestamp.
The list's clock ticks at the display's rate, every row's height and ink
read again each tick, until every fold and slide has arrived. A motion
whose end was NaN or inf (a place measured as either) never arrived, and
the clock never stopped. Now one past 5 s, or with no finite end, counts
as arrived.
Loaded on the first click, inside the page's build (and the sidebar's view
menu's), they cost that open about a quarter of a second more. Now loaded
two seconds after the shell comes up, one a frame. Sandbox: the first VPN
orchestrator page open after a reload, first frame 291 -> 102 ms.
ds/stage holds what a page builds later (its room kept, one a frame, lowest
rank first); the Control Room's staged widgets use it too. The VPN
orchestrator's page (51 crew, each with a Progress strip) built in one
115-377 ms frame on open; now its worst frame is 48-81 ms.
Built at once, the Map, the Scratchpad, the Board and the rest took
0.4-1.4 s in one frame on open (the window not answering meanwhile). The
first two widgets in the page's order build with it; each other holds a
block's room and builds in its own frame (a timer of its own builds it a
little later should the pump's owner go first).
Sandbox, same data, warm open: first frame 400-1370 -> 36-40 ms, worst
frame 83-98 ms, settled 200-250 ms.
Topology is already the Map's default; a Map left on the first Graph
(heavy on a big fleet) is moved to the Topology once, until the new
Graph takes its place. Chosen again, the Graph stays.
The first Graph stepped its force simulation three times a frame and set
its tick each time, so its canvas laid the whole web out again every
frame (label placement and line routing): on a big fleet one frame took
more than a script call's 50 ms, and the app stopped answering (1192 of
1201 budget aborts in the live log).
- Settling runs a frame every 33 ms, as many steps as fit in 6 ms
(12 at most), 90 frames a run at most, and draws nothing until still.
- A layout past 15 ms leaves out the thread names still to place (not an
orchestrator's, nor the one under the pointer) and the lines' second
bowing; a name's free-spot test looks only at nearby marks (grid).
- Off screen (on_visible, or the window not shown) nothing runs: no
settling (it waits and goes on when back), no pulses, no drawing, no
web rebuilt as the world changes every few seconds.
- Markers follow the web once still, not each step; a dragged node is
drawn at most every 120 ms while the web settles round it.
tests/orch_map_graph_perf.test.luau on the 100-thread fleet: settles with
no script error (was: time budget exceeded), 4 layouts; 10 s off screen
with status changes: 0 draws, ~4 ms of script (was 7 draws, ~890 ms).
The roller beside a note being written (a row's refreshing, or What's up?
asked) rolled for as long as the row said so; a host that never wrote the
note back kept it rolling forever. Whether it refreshes is now one
selector (it flips only when it really changes), and after SPIN_MAX
(20 s) the roller gives way to a still refresh mark until the note comes
back or it's asked again. (The roller itself plays only while it shows.)
Every Progress unit's bindings read the shared row table (and through it
every session and the engine's rows), so one thread's change ran every
unit's clocks, note and activity again. Each unit now holds its row, the
parts of its session it shows (title, agent, activity) and its context in
ui.computed selectors; a change elsewhere reruns those lookups and draws
nothing. On the 100-thread fleet a status change reads the clocks 2.5
times, was ~280 (tests/orch_perf.test.luau).
A thread's status change ran every card's status line again (a hundred
cards, each reading the whole session list and the progress rows through
several bindings). Each card now derives what it shows in its own
ui.computed selectors (owner, place, lead row, lead status, todo, ask,
stalled, word, steps, clock): a write anywhere reruns those few small
lookups, and a card's bindings only when its own value changed.
Adds ui/orch_perf_fixture.luau (the Control room on a 100-thread fleet),
ds/orch_perf_trace (plain run counters) and tests/orch_perf.test.luau:
one status change works out 1 card's line, was ~440.
ds/orch_data's chats, orchestrators, crew_by_chat, items, open_asks and
needs are kept per input value (weak-keyed: a state hands every reader the
same table), so the dozens of computeds that join a sessions push share one
walk of its 700-odd chats instead of each cloning the archived rows again.
Sandbox, Control Room, 3 sessions pushes: sessions-caused script
161 -> 45 ms, total 405 -> 284 ms, worst frame 257 -> 119 ms.
Every chat view switch logged "kept chats let go of: N, M MB", often the
same line three times in a row (533 lines in 20 minutes live). Said again
only when the count or size (to 0.1 MB) changes.
ds/status grows a shared stepper (status.step/unstep, status.Stepped,
status.sine_at): an element set at each 100 ms step while it shows, a
watchdog restarting the clock if what started its timer went. The Control
Room's breathing cell (orch_cells) and hue dots (orch_hue) use it off macOS
instead of 30 fps anime loops that kept the Linux event loop spinning.
Sandbox, Control Room open, idle: ~48% -> 7% of a core; no clip plays.
A 30 fps anime loop on Linux keeps zgx's event loop turning between its
frames (a frame that draws nothing asks no frame callback, so the next
redraw is handed out at once): one working ring on screen held the main
thread at ~50% of a core, idle. Off macOS the ring sets its shaderTime and
the dot its opacity from one ui.every(100) clock that runs only while one
shows, so the loop sleeps between steps. macOS keeps its baked loops.
Sandbox, same data, plain chat page with one ring showing: 53% -> 6% CPU.
ds/orch_map_visibility: visible(chat, now, ctx) -> "show" | "fade" |
"hide" with an opacity, context(orch_now, mode?, window?), filter(list,
now, ctx), and the person's choice (ui.persist control_map_show, default
"recent", an hour). Always shown: an orchestrator's or the Brain dump's
own chat, a chat at work or asking, unread (done or failed, unseen), with
an open ask not put off, or on a card in Review. "Recent" fades a chat
through the window's second half, then hides it; "Active only" hides it.
The shared model applies it, so the Graph, Topology, Timeline and
Machines views (and the Control room's Machines widget) keep the same
rule: a hidden chat leaves its machine, its lines and message dots with
it; a fading one carries its opacity. The page's Map world carries the
choice and a minute clock, and Topology's and the Graph's layout caches
key on each chat's verdict, so nothing keeps a hide. The Map's menu has
Show chats. Settings offers 4 hours among the windows (the default).
The sample's long-finished titlebar chat is idle and seen (no unread
output), as the Map's tests meant it; their own world is judged at the
sample's time.
Tests: ui/tests/orch_map_visibility.test.luau; settings_orch at 4 hours.
The default idle window is now 4 hours. A setting the person chose is
marked (crewIdleHoursSet, written by updateSettings with a window); a
stored 12 that was never chosen (the old default written along with
another setting) reads as 4, and any window the person chose stands.
split_compound and split_top found their verbs and separators in a
Unicode-lowercased copy and sliced the original with its offsets; a
letter whose lowercase is longer ("İ") could shift them off a char
boundary and panic the engine. They lowercase ASCII only (the same bytes
at the same offsets) and slice with get().
A thread's turn ended "The Topology variation pick and the graph-label
decision (accept round 9 or keep iterating) are still waiting on you."
That was one question, so the person's later Topology pick answered it
whole and R9 got no ask.
turn_question::split_compound splits "the A and the B … are still
waiting" into one decision per subject, each with its options from its
own parenthesis. The start's pass for cards in Now takes each thread's
latest decision since its first card in Now was delivered, judges each
part on its own (reply_answers), and raises the unanswered ones as asks
with stable ids (chat, message, part) on the card each belongs to: the
one whose title shares the most words with it ("R9" and "round 9"
alike), else the thread's first card in Now. A part answered since
closes any open ask for it. A live turn end splits the same way. A part's
turn is <message>#<part>; its close by a reply finds the message.
The start's pass for cards in Now judged only a thread's latest reply
and the outcome texts, so a decision a thread asked before moving on to
other work (R9 on 9ad131f1) got no ask. Now a card's pending decision is
the most recent one its thread asked since the card's delivery (within
its last 50 messages), however much other work came after, still raised
only when no later message answers it (reply_answers).
"The engine-rebuild question is still waiting for you in Needs you." had
read as a new decision: a plain statement that points to a question
already asked (Needs you, an ask) is now none. And a turn-end ask is not
raised over an open ask the chat raised itself in the same words.
Each mark's place and reach is worked out once per layout, and marks,
names and the points along lines and rims are filed in a grid of 32px
cells: a bow, a detour, a name's place looks only at what is near it,
still tested exactly. On the live fleet a layout took over 50 ms (the
script's budget, so it never finished and was tried again every frame);
it now takes about 23 ms.
Map Graph: the layout (islands, names, lines routed round them) is worked
out only when what it is made from changes: the view, the pointer, the
theme, every mark's place, name and state, every machine's heading and
load. A pulse no longer restarts the settling: it runs a loop of its own
that only draws again, the pulses moving along the lines already laid.
What only a test reads (each pulse's distance off its path) is worked out
only while a test asks (`control_map_graph_trace`). The hover card no
longer fails on a Map narrower than the card.
Progress: rows, the chats they're joined with, the orchestrators and the
crew are each worked out once for what they're made from, not once per
row and field and open ask; a reader still follows their sources.
Transcript: the waiting line's working word no longer calls a function
not yet defined.
It no longer closes when a frame of the engine's state lacks its ask (it
keeps the ask as last seen), Escape closes it directly, and a close the
modal makes on its own within 250ms of opening (its focus scope not
taken) is let go once.
A pick shows "Sending" with Undo through its 5s window and stops counting
toward Needs you's total and urgent figures (and the sidebar's) at once.
Once the engine takes it, "Answered · <answer>" shows for 2.5s and the
row slides out; an answer the engine still lists open comes back after 30s.
A refused, failed or timed-out answer or defer undoes the pick: the chips
come back with "Couldn't send your answer: <reason>" and Retry.
Answered asks go to a folded Recent answers list at the foot of Needs you.
The Control room fixture stands in for the host per mode (this build, a
refusing engine, an app without the answer action, an engine from before
options) and gains republish and asks-gone fixtures for the overlay tests.
orchestration.answer and defer wrap the host call: a missing host action
falls back to the answerAsk/deferAsk op (the answer as plain words, the
option's label and any words after a dash), an engine that refuses the
option or calls the answer empty is asked once more with the plain words,
and a call with no reply in 15s is rejected as a timeout.
The start's pass skipped every card marked as moved by hand, so a card
the Brain dump had moved into Now that was still waiting on a decision
("Map machine headings: decide R9") got no ask. The mark keeps a
card's column, never its question: after re-stating, every routed card
in Now (marked or not; not approved) whose thread's latest reply to it,
its route's outcome or its own outcome text waits on a decision gets
its ask raised on it, unless a message since the asking one answers it
(reply_answers), which closes any open ask for it instead. Its column
is left as it is. The raise-or-close step is shared with the Review
re-statement.
The notes were read-only until the engine's first Scratchpad frame, so an
engine without the Scratchpad (an older build) refused every key without a
word. Now the notes always take typing; the host says when the engine
refuses the watch, and the widget says so ("Scratchpad needs the engine
update; your text isn't saved", or the app update for an app without
it), reading Not saved. What was typed is kept, never overwritten by the
engine's first copy, and saved once the engine has the Scratchpad.
The wheel follows the Map's web: a plain scroll over the Scratchpad is the
page's; pressed into, Notes and the drawing take it until Escape or a
press elsewhere lets it go (the drawing also when the pointer leaves it);
Cmd/Ctrl-scroll and a pinch zoom the drawing.
Screenshot runs can type into a field (`:target:text`).
The person's Scratchpad is theirs: the Brain dump writes or appends to it
only when explicitly asked ("add this to my scratchpad"), and otherwise
routes ideas as before (something for later is a Later card). The tools
say the same.
The notes kept a wheel over them even unfocused, and the drawing took
every wheel to pan, so scrolling the page stopped dead over the widget.
Now the notes hand an unfocused wheel to the page (focused, they scroll
themselves and keep it, as the composer does), and the drawing pans and
zooms only once pressed, while the pointer stays over it.
The copy opens the file once through a pinned descriptor (no link followed),
checks that handle and reads no more than the cap. Stored pictures are named
by their SHA-256 and written without clobbering, so two never share a file.
Remote pictures are kept only for https to a public name: no IP literals,
local or bare names, or credentials.
orchestration.answer_ask({ id, option?, text? }) answers with a 1-based
option and/or words; orchestration.defer_ask({ id, until? }) puts an ask
off until a time in Unix seconds, or brings it back.
Pictures an ask names are copied into the uploads store when it is raised
(pictures only, at most 15 MB, from the thread's folder); URLs pass through.
answerAsk with an option delivers its label and any words; deferAsk (the
person's) hides an ask until its time, when the engine clears it and
banners once. Tool asks get the asking message as their turn when it ends.
The MCP ask tool takes options with images and scores, a recommendation,
links and context; answer_ask takes an option.
Ask and AskOption gain images, scores (ordered), recommendation, links,
context and deferredUntil, all optional on the wire. AnswerAsk takes an
option; DeferAsk puts an ask off. The turn-end detector now reads lettered
variants (lists or table rows, number columns as scores), option detail,
pictures (markdown, paths, brace patterns) and who they belong to, the
recommendation and its why, branch and PR links, and the message's summary.
Needs you and a board card waiting on a decision show its question in a
line and its options as chips, the recommended one ringed and starred; a
chip answers at once with Undo for five seconds. The question or the
expand opens the overlay: the question, whose and when, links, context,
options as cards with pictures (the lightbox), scores and the
recommendation; 1-9 and a click choose, Enter decides, Defer puts it off.
A card waiting on a decision, or an ask's thread name, opens the thread
at the message that asked. A deferred ask's card says Deferred.
orchestration.answer(id, { option?, text? }) (option 1-based) and
orchestration.defer(id, until_ms?). ds/orch_decide keeps a pick in its
Undo window before it is sent and reads an ask's options, scores,
recommendation and pictures; data.needs leaves a deferred ask out until
its time.
route.open_session(id, { message }) takes the chat's transcript to that
message (an ask's turn) near the top of the view and lights it with the
accent, fading over about two seconds. An open chat just jumps; a message
not in the rows yet is gone to as the history brings it; scrolling first
lets the jump go; an unknown one leaves the latest. Without a message,
nothing changes.
A thread's pending decision was taken as answered by any message that
reached it after the asking turn, in a turn-end ask's close and in the
start's backfill. Now:
- a message no agent relayed (the person in the thread, the Needs-you
answer, an answered ask's delivery) answers it;
- one relayed by the Brain dump or an orchestrator answers it when it
names one of the question's options (no model), else when the cheap
one-shot model says it answers or decides this very question;
- unsure, no, or no model: the ask is raised or kept, so a pending
decision is never lost. A verdict is kept per chat, question and
message, so a message is judged once.
The start's backfill (settle_card_states) raised an ask for a card left
in Review waiting on a decision. It now raises none when a message
reached the thread after the message that asked (the person's reply in
it, a relayed answer, an answered ask's delivery: the rule a turn-end
ask's close by a reply follows), and closes any open ask for it as
answered in the thread, with that message. Nor for a card approved or
moved by hand. The thread getting newer work is no staleness signal on
its own: an unanswered question is still raised.
The node under the pointer (a thread, an orchestrator, a machine's tab)
shows a grip beside it; dragged, it is a reference to the node for
Capture's composer. A plain drag still places the node, and the space
still pans: the field keeps its press, so the grip sits over it, outside.
Scrolled down, the page's middle is now the Scratchpad's notes, which keep
a wheel over them (overscroll contain) once anything has been pressed, so
a wheel there never moved the page.
Board cards, Progress rows, the Map's threads, orchestrators and machines,
Comms, Q&A and Needs-you asks are drag sources carrying { ref = ... }
(ds/orch_ref); a Board card's one payload also keeps its column move.
Capture's drop zone alone takes them: a chip per ref, once each, sent as
the dump's refs, never as attachments.
Its model footer inside the panel, a collapse button in the panel's head
instead of the knob over its corner (the knob shows bare only), and the
page under it no longer reads through.
One composer in two places: scrolled up out of view, Capture's composer
floats bottom-centre (one line, a knob counting what it carries); the knob
opens it out (chips, model), Escape folds it back. Draft, chips and model
are the same state (LaneTab.Composer mirror), the keys follow it between
the two, and the slot's session stays watched until its last placement
goes. It is its own drop zone, rises over a toast stack beside it, and
Cmd+Shift+K (Cmd+K is Search) or a bare / focus it wherever it shows.
Fixture ui/control_float_fixture.luau for its pictures; tests in
ui/tests/control_floating_composer.test.luau.
A dump carries refs (cards, chats, orchestrators, devices, asks, Q&A and
comms entries), cleaned and listed to the Brain dump in a fenced block. A
route names one as reference: a reply on an ask answers it through the
AnswerAsk path, a comment on a card goes to its thread (else its
orchestrator, else its detail), a chat or Q&A follow-up goes to that chat,
and a device is the placement hint for a new thread or card. The MCP route
tool takes reference.
A card in Review shows Approve and Request changes… under its status
line and in its menu. Approve sends approveItem; Request changes opens
a small box for what to change (put away on Escape or when left empty),
sent with requestChanges to the card's thread. Wired on the Control
room's and an orchestrator's board.
Columns, as the person defined them: Now is all work in progress; Review
is finished work that needs their evaluation, saying what to look at;
a pending decision or question is an ask (Needs you) on a card still in
Now; Done is finished with nothing for them; Blocked is failed.
A task route's state was read backwards for its card: a turn that ended
while its thread still worked (a background build, subagents, todo
left) filed the route Answered, and Answered meant Review; so did a
thread's progress message to the Brain dump. Now Answered is Now. A
finished turn whose last message waits on a decision (turn_question::
detect, a borderline one settled by the cheap model) keeps its route
going: its card stays in Now, the question one ask on it. Else what it
leaves to evaluate (an open pull request, a result it asks to be
checked, screenshots of what landed) is the route's review: its card is
in Review, its outcome starting "Review: <what>". Nothing: Done.
Review has an end: approveItem (Done, approvedAt recorded, kept Done)
and requestChanges (the text to the card's thread, the card back in
Now), the person's alone.
Threads on an older host (one without turn-end asks, like a 0.3.2
engine) now get their questions raised by the engine that launched them
(a dump of its own routed to them, or their orchestrator runs there),
once their transcript has synced; the ask's id (chat and message) keeps
it one.
At start, a routed card left in Review by the old rule, never moved by
hand, is re-judged once: Now while its thread works; Now with the ask it
never got when its thread's latest reply to it, its route's outcome or
its own outcome text waits on a decision; Review when something is left
to evaluate; else Done.
"Waiting on your decision." stays a decision whatever its paragraph
says next, and a bare "Recommend …" after a question keeps it open.
Markdown notes with live styling and preview, and a native canvas board
(pen, box, ellipse, arrow with an elbow, text, select/move/resize/delete,
colours, undo/redo, pan and zoom). Autosaves through one debounced path
with a quiet saved/syncing state, takes remote edits live, and restores
earlier versions from a history menu. Part of the widget set; expands to
a full page with Notes and Draw side by side.
The person's long-term ideas, notes and diagrams, kept apart from work:
nothing written here routes or makes an item. A Markdown body plus a
renderer-agnostic drawing layer, stored as registry rows (parts sized for
the room's op limit, tagged so a torn write is never stitched in), with
50 snapshot slots folded to about one a minute per editor for undo and
restore. Scratchpad / WatchScratchpad RPCs; scratchpad_read, _write and
_append tools: the Brain dump edits, orchestrators and crew read.
Queued stands left of Now: Up next (planned: real work waiting for its
turn or a slot) and under it Later (inbox: someday, remind me, ideas,
never started on their own), folded until opened, its count on its head
and its fold kept in the Control room. Dragged between the groups a card
changes its state; into Now it starts. Move to offers Up next and Later.
Blocked stands between Now and Review while it holds a card. The ten-card
cap counts Queued as a whole. The engine's states are unchanged; the
Brain dump and orchestrator prompts and the item tools describe inbox as
Later and planned as Up next, and a route's chip and a held card's word
say so too.
Settings → Orchestration: "Auto-archive orchestrator chats" (on) and
"Archive after" (1h, 6h, 12h, 1 day, 3 days, 7 days), the profile's
synced settings written through `updateSettings`; the sidebar view
menu's Orchestrators group has the same switch as "Auto-archive idle
chats". The host passes the settings in the orchestration state.
The view menu's scroll gets an id, so its rows past the window's room can
be brought into view in tests.
Tests: ui/tests/settings_orch.test.luau on settings_orch_fixture.luau.
A sweep on each engine (shortly after start, then every 12 minutes)
archives the crew threads it hosts once idle for the profile's window:
chats with childKind crew and a crew row, never an orchestrator's or the
Brain dump's own. Idle from the latest of its creation, its last message,
its last turn's start and end, waiting on its own work, joining the crew,
its last report, and its last unarchive. Kept while working, awaiting
input, waiting on its own work, with an open ask of its, or with its card
in Now or Blocked.
It archives through the chat row as the person's Archive does. Its card
keeps its column; the thread leaves the card's threads and stays as a
chat link. The crew row notes when its chat is seen archived and when it
is seen unarchived again (revivedAt), so an unarchive restarts the idle
time. Each archive is logged with its reason and idle time.
Settings: a synced `orchestrationSettings` row (crewAutoArchive, on;
crewIdleHours, 12, held to 1..720) in the state every engine reads, and
an `updateSettings` op for the person alone.
Inbox and Blocked stand only while they hold a card (Blocked too while
one is carried, to be put there); the other columns take their room.
Each column shows ten cards, "Show N more" under the rest: one choice
for every column, kept in the Control room as its map view is. Done's
head clears it: every Done card taken off as Delete takes one, its chat
untouched, one Undo putting them all back.
Any card is the person's to move (Move to, or a drag), loose Brain dump
cards and orchestrators' alike; the board and the op already allowed it,
and now the move sticks. An upsertItem that sets a card's state marks it
moved (movedAt) with its route's state then (movedRouteState). Deriving
the card from its route (sync_card, the start's pass, sweeps) keeps its
column while the route's state is that one; once the route moves on (a
failure, a reroute, work finished since), the route's state is the
card's again and the mark is spent.
At start, a routed card that is in another column than its route says,
never marked and not Blocked, was set by hand before the mark existed
(the Brain dump re-stated six live cards so): it is marked, and kept.
Blocked ones whose route didn't fail are still re-derived. Both once.
Waiting on you shows on the card the ask names (its thread's newest
delivery), else the thread's newest card at work; its other cards, Done
or Review, say nothing of it. A quiet ask (a "hasn't answered" chase)
marks no card or Progress row; the bridge passes quiet through.
A card's state now follows its route alone: Done, Review, Now, and
Blocked only for a failed route. A thread's open ask had made every card
of that thread Blocked, finished ones included. After a restart a
startup chase ("hasn't answered") opened for a few seconds while the
outcome pass filed six finished routes, and its close never re-synced
the cards, so they stayed Blocked.
- A turn-end ask names the card of its thread's most recent delivery
(a route outcome's ask, that route's card), updated when asked again.
- Closing a chase re-syncs its thread's cards, as other closes do.
- At start, cards Blocked though their route didn't fail are re-stated
from their route, once (idempotent; a card the person moved stays).
- A chase or a "where should this go?" raised during a turn no longer
counts as the thread's own ask, which had kept its question from
being raised.
- A task route's outcome is the reply to its own delivery, up to the
next route delivered to the same thread (one thread's routes all got
its newest reply).
- "…are still waiting on you" and "…is still yours to make" read as
a decision for the person.
The startup pass and each five-minute sweep log one line: how many chats
and routes were looked at, and how many answers were filled.
A condensed answer that reads as a title ("Board Inbox And Next Columns")
is dropped, and the reply's first real sentence stands. The one-shot runs
on the harnesses' title path, whose system prompt asks for a 3-5 word title
in Title Case and overrides the answer instructions.
"In the map it shows Haiku even though Composer has Opus, which one is
correct? please verify" was taken for work: the trailing "verify" read as a
request. A fragment whose only requests are to check the answer (verify,
check, confirm, double-check, look into it) and that asks a real question
of its own is now Direct. Requests to change something stay work, as does a
sentence that is itself the request ("can you check whether CI is green?").
Tests: that question and four like it as positives; every negative stands.
The new Inbox-to-Now test drags a Board card in a 2600-point window. With
Q&A in the right column, the Board starts lower than that, so the window is
3000 points, as for the Board's other Control room test.
Like chats_now, the Map's thread-name index (named) was a ui.computed at
the top of screens/control/page, made inside the first build of the screen
and gone with it once the room was left.
A reply that synced in after every retry, or that came while the engine
wasn't running and whose thread hasn't ended a turn since, had nothing to
take it in. A sweep of this engine's question routes still delivered now
reads each target's transcript every five minutes, starting after the
startup pass, and records the reply it finds as any other (quietly when
old).
Test: a reply that synced in with no turn end is taken in by the sweep,
with its own time, and only once.
A long-lived thread goes on to other work in the same turn after it
answers, so the turn's last word was often a status line, not the answer.
The answer is now the first reply of the turn that's more than a line
("Looking." aside), else its last text.
An ignored test, live_replay, runs the rule over a copy of a real replica
and an orchestration snapshot, offline and read-only.
Several questions sent to one long-lived thread each take the reply that
follows their own delivery (`answer_to`). One sent right before another
message takes the first reply after it. The route's `answeredAt` is when
that reply was written, so answers taken in late (after a restart, or a
transcript that synced in later) say when they came. They are recorded
quietly too: no banner and no Comms line for news older than ten minutes.
The Q&A shows "Answering" only while the thread is on a turn begun since
the question was delivered. A thread busy with something else shows
Waiting. Chat rows carry `turn_started` (the working turn's start) and
routes carry `delivered` for this.
Tests: two questions to one thread and two in a row (answer_to); late
replies taken in, each answering its own question at its own time and
quietly, plus an answer relayed to the Brain dump (engine); Answering vs
Waiting (Q&A).
screens/control/progress made its chats, the rows it stands in for, every
row and the widget's list as ui.computeds at its top level. Its first
requirer builds a screen (screens/shell/boundary), so those belonged to
that build. Once it was gone (the Control room left) they kept their last
values, and Progress could show nothing working while threads ran. They are
now worked out as they're read. Progress is shared by several screens, so a
rebuild per page would not do.
Test: load the Control room as the shell does, leave and come back, then a
thread starts working and shows in Progress. It failed before.
The shell requires screens/control/page while it builds the screen
(screens/shell/boundary), so a ui.computed made at the module's top level
belongs to that first build. Once the person left the Control room and came
back, `qa_entries` and `chats_now` were gone with the old build and kept
their last values. A Q&A dismissal was saved but the list never changed,
and new answers never showed. Both are now made again with each Page.
Tests load the page as the shell does (control_qa_screen_fixture), leave
and come back, then dismiss (gone at once, still gone after another
remount, back with Undo) and let an answer arrive. Both failed before.
The Q&A fixture's world moves to control_qa_world so both fixtures share it.
data.waiting_for_you takes the Q&A's counts (passed in: orch_qa reads
orch_data) and adds its answers not read yet. The head's "need you"
counts both; Needs you's own figure stays its rows.
An ask raised from a thread's turn end shows under Needs you with its
question, its options and a quick reply, and a way into the thread; one
gone stale unanswered is urgent and leads. The thread's board card says
"Waiting on you" on its status line (in the warning's ink once stale),
and its Progress row reads the same instead of idle or done.
data.waiting_for_you is the one count of what waits on the person; the
Control room's head reads it.
An ask a thread raised with its ask tool is the person's (its crew rule
says it asks only what its orchestrator can't decide), and a thread that
left the crew is no longer its orchestrator's to answer for. Both are
checked again where the answer is written.
At each turn end of a thread orchestration launched (crew, routed or
started by the Brain dump or an orchestrator, their subagents, an
orchestrator itself), a question for the person becomes an ordinary ask
under Needs you. Its id is the chat and the asking message, so a turn
gives one ask; the same question asked again updates (or reopens) it.
A crew thread's ask also goes to its orchestrator as a [Crew ask] turn;
it may answer it with the new answer_ask tool (its own crew's open asks
only). An ask closes when answered from Needs you, when any message
reaches the thread after the asking turn, or when a later turn with no
reply between says it did one of the options. An open ask left 30
minutes is made urgent once and shown again on its thread's host.
It replaces orch/engine-flow's stand-in: ends_on_question reads with
turn_question::detect, and ask_for (a message to the Brain dump, a
route's outcome) raises through the same path, so a thread that says its
question in a message and ends its turn on it has one ask, with options.
A thread that ends its turn on a plain-text decision ("Should I open a PR,
or merge it?") is idle, not awaiting input, so its question lived only in
its transcript. proto/turn_question reads the end of a final message:
decision-shaped questions are asks (with their options), other questions
at the end are borderline for a small model, and closers, rhetorical
questions, self-answered ones and questions put to someone else are not.
Ask gains origin (tool | turnEnd), turnId, updatedAt, escalatedAt and
answeredVia; the orchestrator prompt and a [Crew ask] text let an
orchestrator answer its crew's asks when its goal settles them.
A checkbox in the sidebar view menu's Show section, persisted with the
other Show toggles (shell_sidebar_show_orchestrator_chats), on by
default. Off, the chats an orchestrator started are left out of the
project and device groups; the Orchestrators section, the Control room
and the Map are unchanged.
Tests: ui/tests/sidebar_crew.test.luau (default on, off hides them by
project and by device, kept for the next launch, the row's checkmark).
A crew thread is called by its own title, else its role in the crew,
else its board item's title, else "Crew thread" and its id: in the
Map's Machines, Topology, Timeline and Graph, the Control room's
Machines, an orchestrator's crew and the sidebar's crew rows. A crew row
whose chat isn't heard yet, or has no title of its own, was drawn as a
bare dot.
The sample's side chats and crew carry `name` as the host's rows do;
orch_map_fixture's map_crew_names draws the case the Map got wrong.
createChat takes the chat's title and writes it on the row it creates,
and the Zeron MCP's create_chat passes it there instead of renaming the
chat after it has joined its crew. A crew thread is never listed
untitled, by the Map, the sidebar or a peer, while its first turn runs.
A Cloud chat, whose row its machine's host may write, is still renamed
after.
A card's thread starts only on a device its orchestrator's crew may use,
and a crew thread runs with no more sandbox or access than its
orchestrator, whoever starts it. A full crew's queued card is checked
against the crew's devices before it waits. Two crew report tests wait
for what they check instead of racing it.
What the person says should wait becomes a card instead of a thread: later,
someday, remind me, next week go to Inbox; after X, once Y is done, then,
low priority go to Next. Cards keep the project they're about (spaceId,
deviceId) and start there.
startItem starts an Inbox or Next card: a thread in its project with the
card's title and detail as the first prompt, linked on the card and
recording the card it was started for. The person moving a card with no
thread to Now does the same. An orchestrator starts only its own cards,
and when its crew is full (maxRunning) the card stays in Next saying why
(waiting); when a slot frees, the most urgent, oldest waiting card starts.
A crew thread create_chat can't start for a full crew waits in Next too.
control_hover_cards: a chip's card under the chip, staying put as the pointer
crosses into it, Open opening and closing it, click-to-pin surviving the
pointer leaving and another chip, Escape, an outside click and the chip again
letting it go, Tab and Enter reaching Open; the answer line's card and the
text's, hanging from the word. control_receipt: the chip's menu from a
secondary click.
Capture's part card sat on an unseen box that moved to the word under the
pointer on every move, and went as the pointer left the text: the card
jumped word to word and was gone before the pointer reached Open.
ds/hover_card gains Anchored, the one hover card with actions: it hangs off
its anchor's box (zgx's placement, flipping and clamped to the window), stays
while the pointer crosses into it, pins on a click on the anchor until a click
outside, Escape or the anchor again (one pinned at a time, no other card over
it meanwhile, focus in it for the keys), and closes as an action in it leaves.
Capture's route chips now show their part's card and pin it on a click (their
menu is the secondary click's, the Menu key's, Shift+F10's); the answer line's
card and the text's are on Anchored too, the text's hanging from the word the
pointer rested on and moving only after a rest on another.
The sidebar listed only top-level chats and hides orchestrators' own
chats (they have their own section), so an orchestrator's crew threads,
which the host keeps under the orchestrator's chat, showed nowhere.
They are now listed in their project and device like any chat, once,
with the orchestrator's hue dot after the title ("Started by <name>" on
hover). Untitled, a thread is named by its crew role, then its board
item's title. The Orchestrators section is unchanged; side chats stay
unlisted; an archived crew thread stays hidden, as the host gives none.
Tests: ui/tests/sidebar_crew.test.luau on sidebar_crew_fixture.luau.
A crew thread (a chat an orchestrator started) is listed under the
orchestrator's chat in `children`, and that row had no project, so
nothing could list it under one. Child rows now carry `project` (a known
spaceId, as a top-level row's), `branch`, and `name`, the chat's own
title alone (nil while untitled), so a caller can fall back otherwise.
The read and dismissed marks, the opened entries and the "show all" toggle
now live in ds/orch_qa beside the entry model, so the page only feeds it
the dumps. The thread link reads "Go to <thread>", so it no longer shares
the receipt's "Open <thread>" label. The quiet line lines up under the
question's words. Two Control room tests get room for the taller right
column: the Board's dump test window, and the scroll-hold test's offset.
A new widget under Needs you lists every question the person dumped,
newest first. Each entry shows the answer from the thread it went to (a
preview, or the whole reply rendered as markdown when opened), a link into
that thread, when it was asked and answered, or that it is still waiting.
Unread answers are the only filled cards and carry a dot. Opening an entry
or its thread marks it read. Where the pointer rests, an entry can be
marked read or unread, or dismissed (with Undo). Read and dismissed marks
are kept per device (ui.persist `control_qa`), and opened entries are kept
in named states. Entries are keyed and never reorder, so answers arriving
change them in place.
In Capture, a dump's question parts are also washed in their hue, like a
highlighter.
The router's `question` intent now means a direct question the person
wants answered. Its prompt says so, and a deterministic check of the
person's own words (zeron_proto::direct_question) only takes the tag
away: work asked in a question's shape becomes a task, a rhetorical
question becomes info. The bridge marks each route `direct` with the same
check, which also covers routes from before it.
A route also keeps when its first answer came (`answeredAt`), for the
Control room's Q&A.
A card is its title (two lines at most, a long one clamped) and one line:
its orchestrator's hue, then only what says something: urgent or high as
a word, how its thread stands (working, stalled, needs you, failed), its
todo's cells once a step is done, and one clock. Its menu's "…" shows on
hover; right-click, drag and click are as before. The card's look lives
in ds/orch_card for other Control room cards to share.
The Brain dump's route takes a short title for a task (3 to 6 words, as
an item title reads) and the card takes it; the routed message stays the
card's detail. A route without one (an older Brain dump) still gets a
title made from its message.
The Control room's page scroll and an orchestrator page's live state kept
their offset as the scroll's own state, made as the page is laid out. A
page made again (Settings or a thread opened from it and Back, the
orchestrator a moment unknown while the host publishes) opened at its top,
and a page whose content was short for a moment (widgets built again) had
its offset clamped and written back, so it stayed at the top once the
content returned.
ds/kept_scroll keeps the place in a named state of the page's own and
takes only the person's moves as the place (wheel, press, scrolling keys,
or further down than it was); a move the view makes alone to fit is not,
and the place comes back as the content grows to hold it.
Tests: ui/tests/control_scroll_holds.test.luau.
Every task route the Brain dump delivers gets one card linked to its thread
and route, following it (Now, Review, Done, Blocked) with the route's answer
as its outcome; addToBoard puts any chat on the board. A dump may carry the
person's pick for the Brain dump (agent, model, reasoning), checked and kept
on its chat.
On boot and on every registry change, a device whose name (trimmed, case-insensitive) an earlier device already has renames its own row to the lowest free <name>-N. Earlier = createdAt (a row without one counts as earliest), tie: the larger id yields. Only a device's own engine renames it, so engines never trade renames and older peers aren't fought; a colliding <name>-N continues the series of <name>. A person's rename to a taken name is numbered the same way; a unique one stays. Cloud machines keep their names.
A chip starting half a point in (a centred column of an odd width) hung its
menu from a 1-point box at x.5; the compositor's anchor rectangle came out
-1 wide and Hyprland closed the connection ("Invalid box"). The menu's
point now sits on whole window points (ds/menu_point), a chip opens its
menu from its current element, and a menu with nothing to choose opens no
panel.
Crew are parallel work: each pill hangs on an arm off its orchestrator's
hue trunk, one row each, its running command beside its title; the
pill-to-pill connectors are gone. An orchestrator's lines are one shape.
An agent adds to its crew only chats whose parent is already its own chat: never a reserved hidden chat (by row or by id), an orchestrator, another chat's delegate, or the person's own top-level chat (joining would hide it from their sidebar). An agent's crew createChat of an id that already exists is refused, so the idempotent create can't double as addToCrew. The person still adds any plain thread.
The route finds a chat under another (sessions.now.children), so the Map,
crew cards, crew updates, receipt chips and comms all open crew threads;
route.find_chat says where any chat is listed.
The Brain dump's lifted ceiling and every role come from orchestration rows only; an agent can't create a chat with a reserved (Brain dump or voice) id. An agent's crew child must be its own (the caller is the orchestrator and the parent), checked like addToCrew. A report's, ask's, addToCrew's and upsertItem's item and threads stay the caller's orchestrator's; loose items only by claiming them. WatchOrchestration's first frame is the state as it is now. Op tests for every refusal.
Tests for the receipt (parts, answers, a new dump lighting in turn, an
unsure part placed), Needs you, the Map and the layout. Orchestration's
pieces in the gallery. The map's layout is a module of its own; the
sample keeps a todo's count as it shifts times. Zeron v2's composer and
page take the Control room and orchestrator routes as pages of their own.
Capture with the newest dump's receipt (its parts underlined in their
destinations' hues, lit one after another as they're placed, a chip per
part to open or move it, unsure parts' likely places as buttons), Needs
you (asks answered in place, chats awaiting input), the Map (machines as
lanes, orchestrators as stations, crew pills on their hue lines, pulses
along them as agents talk), a stand-in Board, Machines and Comms. Two
columns from 1100 points; widgets hidden and moved per device; plugins'
widgets at slot:zeron.orchestration.widgets. ui/control_fixture.luau and
control_page_fixture.luau draw it from the orchestration sample.
orchestration.op and orchestration.loads_wanted are refused while a
template is a preview, and the window may send only the person's ops:
report, ask, route and dumpDone are an agent's, through Zeron's tools.
src/orchestration.rs watches WatchOrchestration and WatchComms, and
WatchDeviceLoads while a screen wants it, publishing them to the scripts
in the shape the sample has; orchestration.op forwards one op to
Orchestrate. Session rows carry activity (while working) and todo, and
top rows their parent and child kind.
account/orchestration wraps the host's orchestration state, comms and
loads with the ops the screens use. ds/orch_hue turns an orchestrator's
hue into paint for each scheme; ds/orch_data joins orchestration with the
sessions for drawing. /control and /orchestrator/:id are pages of their
own, as a plugin's is (the orchestrator page is a placeholder).
Orchestrator, crew, board, asks, reports and Brain dump types, the four
orchestration RPC names, Session activity/todo fields, the crew child
kind, and the Luau sample every client screen is drawn against.
2026-11-12 18:44:35 -08:00
295 changed files with 81684 additions and 735 deletions