Skip to content

Add Build plan and live sync status to the document toolbar - #453

Open
MaggieAppleton wants to merge 13 commits into
living-sync-loopfrom
living-build-ui
Open

MaggieAppleton wants to merge 13 commits into
living-sync-loopfrom
living-build-ui

Conversation

@MaggieAppleton

@MaggieAppleton MaggieAppleton commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds a build control to the document toolbar. Once Jev judges the document ready, a one-click Build plan button appears. It drafts the graph, approves it, and starts the build on the viewer's local agent, with no review step. After the first build, the same slot shows In sync, Building…, or Out of sync with a reason. The Build view lists tasks with the commits made to each pull request.

Stacked on the living sync loop PR. Everything is behind LIVE_BUILD.

What changed

  • Readiness. readiness.ts asks Jev whether the document is complete enough to build, falling back to a word and heading heuristic when Jev is unavailable. Documents already living, built, or implemented are skipped. Readiness is pushed to the client when it changes.
  • Build plan button. build-plan-button.tsx runs draft, approve, start in one press, and points to the Build view if no local agent can take the build.
  • Sync status. build-model.ts derives the slot's state and hint from the live snapshot and rebuild builds.
  • Build view. Lists each task with its pull request commits.
  • Protocol and server. Readiness and sync fields added to the implementation protocol and routes.

Toolbar slot

stateDiagram-v2
    [*] --> Hidden
    Hidden --> BuildPlan: Jev judges ready
    BuildPlan: Build plan
    BuildPlan --> Building: click
    Building: Building…
    Building --> InSync: build delivered
    InSync: In sync
    InSync --> OutOfSync: edits not yet built
    OutOfSync: Out of sync
    OutOfSync --> Building: rebuild starts
    Building --> OutOfSync: rebuild fails
Loading

Screenshots

States were captured with patched snapshots on a fake-GitHub server.

Hidden on a thin document, visible on a ready one, and the toolbar while building:

Sync states (in sync, out of sync, building), and the Build view with commits per pull request:

Build button hidden on a thin document

Build plan button visible on a ready document

Toolbar while building

In sync status

Out of sync status

Building status

Build view with commits per pull request

Testing

Unit tests cover the readiness judgement, build model, and live sync. The screenshots above come from a fake-GitHub run.

On 10 Oct I ran this end to end on github.com/MaggieAppleton/margin with a Copilot coding agent (copilot --acp --allow-all):

Follow-up fixes from that run, now in this branch:

  • 1cca44f: Build plan queues behind a running prototype instead of being refused, and readiness ignores callouts.

Verified end to end (second run, 10 Oct) with copilot --acp --allow-all on github.com/MaggieAppleton/margin:

With LIVE_BUILD off, nothing changes: no readiness judgement runs, the toolbar slot stays hidden, and the Build view behaves as before.

Stack

Base is the living sync loop PR; merge after it, rebase-only.

Queueing a build behind a running prototype or another document's build on the same connection is LIVE_BUILD-only. With the flag off, a busy workspace is refused with the previous 409 ("workspace is offline or busy").

Review fixes (restack, 2026-10-12)

🤖 Generated with Claude Code

@MaggieAppleton
MaggieAppleton added this pull request to stack #455 October 10, 2026 11:10
@MaggieAppleton
MaggieAppleton marked this pull request as ready for review October 10, 2026 12:28
@MaggieAppleton
MaggieAppleton force-pushed the living-build-ui branch 2 times, most recently from 74ff468 to 9cb891d Compare October 10, 2026 17:32
@MaggieAppleton
MaggieAppleton force-pushed the living-build-ui branch 2 times, most recently from 18c5bf3 to 151d98d Compare October 10, 2026 20:11
@MaggieAppleton
MaggieAppleton removed this pull request from stack #455 October 12, 2026 10:23
MaggieAppleton and others added 3 commits October 12, 2026 13:46
The server judges, after edits settle, whether a document is complete
enough to build (Jev, else a word and heading heuristic) and exposes it
as buildReady on the implementation snapshot. A Build plan button in the
document toolbar drafts tasks and starts them with no review step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Once the first build has delivered, the header's Build plan slot becomes a
quiet status: Building while a rebuild runs, In sync, or Out of sync with a
hint saying whether the edits will build shortly, are waiting for the
builder's agent, or failed to rebuild. Build lists every rebuild's tasks
after the first build's and each pull request's commits, newest first.

The server announces the implementation when an edit flips the document in
or out of sync, and the snapshot carries the builder's login and the live
task list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Construct BuildReadiness only when LIVE_BUILD is on, expose liveBuild on
the session so the client hides Build otherwise, skip documents that are
live or built, bound and forget judgements, re-judge after a mid-run
edit, and forward Jev errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaggieAppleton and others added 10 commits October 12, 2026 13:46
…fixture

The room chunk now reads LIVE_BUILD from the session itself, so the initial
chunk stays within its gzip budget. The research close fixture evaluates
closeRoom from main.ts, which now references buildReadiness.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build plan on a connection that is only busy with a prototype now queues
the build there instead of refusing it; the sweep keeps it claimable until
the prototype finishes and the toolbar explains the wait. Only a missing
connection maps to the start-your-agent prompt. Readiness is judged on the
document without its callouts, so spike results no longer flip the verdict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…automatically

A first build waiting on the agent's prototype now reads Queued in the header and
the Build view, with the reason visible. The one-click draft request carries build:
true so the Planner no longer reports its tasks as unapproved and unstarted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, and flag blocked live tasks

A decision raised while Build plan drafts tasks no longer drops the press:
the header waits on the decision, then redrafts and starts the build. The
server keeps the request in memory until the build starts or it is
cancelled, so it survives a reload.

Build plan on a second document while the agent builds another now
queues behind it and starts in order when the agent frees up, and the
header says which document it is waiting for.

A living document in sync but with outstanding blocked tasks now reads
"Needs attention", and an out-of-sync one notes it will retry them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The container build measured the initial JavaScript at 81502 B gzip, just
over the 81500 B budget, after chunk hashes changed. The panel icon is
inlined into that chunk; merging its five identical strokes into one
group saves about 80 B gzip without changing how it draws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without the flag a busy workspace is refused with the previous 409 again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Whitespace only: dprint's indentation for lines a whitespace-insensitive rebase
kept at their old depth.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Whitespace only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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