Skip to content

List a checkout's preview in the band of the session that started it - #7423

Merged
max-sixty merged 2 commits into
mainfrom
mod-line-missing
Nov 27, 2026
Merged

max-sixty merged 2 commits into
mainfrom
mod-line-missing

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Since #7061 a checkout's bin/leaf, run from a session's shell, serves a page for no session. So the page a session developing Leaf talks to the user on, usually a leaf-dev preview --user, was missing from Leaf's line above Claude Code's prompt, which listed only claimed pages. Of 34 Leaf sessions that served a page after #7061, 10 handed the user only such previews and 4 more used both.

A server for no session now names the session whose shell started it in its row (started_in, passed to the detached server as --started-in, since it starts with no harness identity). The pages follower lists those pages beside the held ones and does nothing else with them (no line forks, notes or watches), since such a page may be at another protocol. The hook gate lets the follower through only where a readable row names the session, so a session with no page still starts no uv.

To weigh: the 90 s step limit follows the band, so it now also holds in a session whose page is a checkout preview, whose input likewise arrives only between steps. The row's shape moves to 62 (state.ROW_SINCE), so a checkout behind this commit stays out of the band and All pages until it merges main.

Max asked for the fix. Tests: follower, module-through-launcher, --user preview, server run and gate cases; the module and preview tests fail without the change. leaf-dev journey run claude-code passed every step but boundary across two runs (fork-busy failed once on the agent not delegating); boundary's 300 s wake timeout also fails on other branches this week.

This was written by Claude Code on behalf of max-sixty

Since #7061 a checkout's `bin/leaf`, run from a session's shell, serves a page
for no session. So the page a session developing Leaf talks to the user on,
usually a `leaf-dev preview --user`, was missing from Leaf's line above
Claude Code's prompt, which listed only pages the session claims. Of 34 Leaf
sessions that served a page after #7061 landed, 10 handed the user only such
previews and 4 more used both, so the line was empty or short in about four
sessions in ten.

A server for no session now names the session whose shell started it in its
row (`started_in`). The detached server starts with no harness identity, so
its starter passes the session (`--started-in`). The pages follower lists
those pages beside the held ones and does nothing else with them, since such
a page may be at another protocol: no line forks, no notes, no watches. The
hook gate lets the follower through only where a row names the session, so a
session with no page still starts no uv. The 90 s step limit follows the
band, so it now also holds in a session whose page is a checkout's preview:
that preview's input also arrives only between steps.

The row's shape moves to 62 (`state.ROW_SINCE`, declared where the gate can
read it). A checkout behind this commit writes rows the installed Leaf doesn't
read, so its previews stay out of the band and All pages until it merges main.

Tests: the follower lists an unclaimed page whose row names its session; the
module draws it in the band through the real launcher and gate; a `--user`
preview's row names the session, and `server run` hands its server the
session; the gate passes the
follower only where a readable row names the session. The module and preview
tests fail without the change.

> _This was written by Claude Code on behalf of max-sixty_
@max-sixty
max-sixty merged commit f4fce18 into main Nov 27, 2026
6 checks passed
@max-sixty
max-sixty deleted the mod-line-missing branch November 27, 2026 18:58
max-sixty added a commit that referenced this pull request Nov 27, 2026
…reverting #7423 (#7431)

Reverts #7423 and routes the pages a Leaf-development session hands the
user through the session's own `leaf`, as a session in any other project
would. Then those pages are claimed like any other, and the band lists
them without new code.

#7423 taught the Claude Code band to list a checkout's `leaf-dev preview
--user` pages by naming the starting session in the server's row
(`started_in`), with a hidden server flag, a second kind of session page
in the follower, a hook-gate branch and a row-shape bump. All of that
existed only because Leaf-development sessions talked to the user on
checkout previews, which `AGENTS.md` ("preview a Leaf page whose source
is a file in `.tmp/`") steered them to. Max wants Leaf pages served
during Leaf development exactly as outside it, with minimum machinery,
so this removes the machinery and fixes the guidance instead:
`/developing-leaf`'s "Run `leaf`" now says to serve the conversation
page through the session's own `leaf` and to link a checkout preview
from it for trying a runtime change. The row shape returns to its
pre-#7423 form.

To weigh: a page that needs the branch's runtime now reaches the user as
stills on the session's page plus a preview link, not as the page they
comment on. Max asked for this direction. Tests: the hooks, gate, Claude
Code module, server lifetime and preview tests pass; `check:browser` and
`check:hooks` pass.

> _This was written by Claude Code on behalf of max-sixty_
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.

2 participants