Skip to content

Give each site page one reader: Using, Pages, How it works and Extending - #5836

Merged
max-sixty merged 3 commits into
mainfrom
agent-a8aa816beca1c8fde
Nov 11, 2026
Merged

max-sixty merged 3 commits into
mainfrom
agent-a8aa816beca1c8fde

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Reorganizes leaf.page so each guide has one reader: /using/ for the person working on a page (panel, comments, status, keyboard and touch), /pages/ for a page's author (contents, themes, layout), /how-it-works/ for the mechanism (now with Event log and Threads tabs), and /extending/ for package authors (now with the developer galleries and a Registry keys tab). /ui/, /threads/, /event-log/ and /registry/ go, with no redirects, so links to them from outside the repository return 404. Examples cards also name the bundled packages each example uses.

Sections move whole by id, so their wording is main's apart from a few rewrites the commit message lists. Two of those correct stale claims on main: Gone quiet named a "Got it" stage that now reads Delivered, and the voice rule left out Replying. Status readings keeps the full derivation, as decided. Every internal link was re-aimed and the site build's dead-link check passes. The site-structure note is deleted now that both of its decisions are made.

Max compared both sites rendered from main and chose this structure (Ref #4052). He has asked for a follow-up: Using should centre on the floating panel, threads and On Me, and Pages may belong under How it works.

Tests: tests/model/test_product_page.py, dev/tests/model/test_product_page.py (test_a_composed_part_refuses_an_authored_copy fails on main too) and pnpm run check:worker were run locally, plus a full site build.

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

A candidate for #4052's site structure (Decision B), built so it can be compared
rendered. Decision A is settled: the site keeps the full status derivation, so
Status readings moves unedited. notes/site-structure.md records both.

Routes:

- /using/ (new): the person working on a page. The panel and rail, who can
  open a page (access keys, leaf.page privacy), data lifetime and offline
  exports; comments, the practice thread, anchor kinds and how a thread
  ends; the update labels, thread readings, On Me, the panel's line, status
  readings and notices; the keyboard and touch routes.
- /pages/ (new): the page's author. UI's Pages, Themes and Layout tabs,
  external data, and asking the user (x-awaits and --obligation).
- /how-it-works/: the mechanism. event-log.html becomes its Event log tab
  with one explanation of the fold, and threads.html's passage, revision,
  drawing, message-widget, title and summary sections its Threads tab. The
  agent's side of progress joins Workflow.
- /extending/: gains the developer galleries and a Registry keys tab, the
  new home of the x- key index (leaf_dev.docs composes it into whichever
  page holds the slots).
- /examples/: each card names the bundled packages whose elements its
  example uses, composed by leaf_dev.docs from the example's markup.
- /ui/, /threads/, /event-log/ and /registry/ go, with no redirects;
  /data-structures/ and /website/ stay as they are.

Sections move verbatim by id; every internal link was re-aimed at its
target's new page, and the site build's dead-link check passes.

Rewritten text:

- Stages of an update: what marks Delivered on each harness moves into How
  it works' harness table as a "Delivered when" column. Fixes two stale
  claims: Gone quiet named a "Got it" stage, which Delivered replaced, and
  the voice rule omitted Replying, which also reads in the agent's voice
  (thread/workflow.js).
- Page addresses: the stable URL (service.json, watcher restarts, page
  claim) and recovery through the serving reference, in place of one
  `--host` command for every harness.
- Revisions gains version comparison (Compare, v), which no page covered.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two tests in the later tiers still load pages this PR deletes. The PR's test job doesn't run either tier, so its checks can pass while main's next --run-main/nightly run fails on them:

  • tests/browser/test_render_anchors.py, test_page_search_reads_a_docs_captions_title_apart_from_its_text, is parametrized with [("ui", "window The workspace"), ("threads", "there The quote")]. named_source("ui") and named_source("threads") now raise no source named …. The captions moved: "The workspace fills the window" is in docs/pages.html (<strong>A large window</strong>) and "Words still there … The quote" is in docs/how-it-works.html. So the parameters become ("pages", "window The workspace") and ("how-it-works", "there The quote").
  • tests/journeys/test_site.py, test_published_product_page_renders, is parametrized with ["index", "event-log", "how-it-works"]. product_page(site, "event-log.html") no longer exists. The event log is now a tab of how-it-works, which this test already renders, so event-log can be dropped, or replaced with using so the new prose page gets the render gate too.

Neither line is in the diff, so I can't attach suggestions. I can push both changes as one commit if you'd like.

This PR settles #4052, "Decide the site's structure before release": it picks the structure, keeps the full status derivation and deletes notes/site-structure.md, which the issue linked. The follow-up Max asked for is new work, not what #4052 left open, so the description could say Closes #4052 instead of Ref #4052.

Two open PRs edit pages this one moves. #5835 rewrites #titles-model in docs/threads.html, and #5833 edits docs/how-it-works.html. Whichever lands second has to carry its edit into the section's new home.

The page-search caption test read ui.html and threads.html, and the product
render gate rendered event-log.html, all removed. The caption test now reads
Pages' workspace caption; the render gate renders Using in Event log's place,
as a guide of prose, tables and a live sample.
@max-sixty
max-sixty merged commit 769d509 into main Nov 11, 2026
5 checks passed
@max-sixty
max-sixty deleted the agent-a8aa816beca1c8fde branch November 11, 2026 21:38
max-sixty added a commit that referenced this pull request Nov 14, 2026
…pace run can't freeze the tab (#5843)

Page search froze the tab on some multi-word queries. `findText` joined
the query's words with `(?:[ws]+|edge)+`, a nested quantifier, so
wherever the page's raw text held the first word followed by a long
whitespace run and then something other than the next word, the regex
engine tried every split of the run. On the Using guide, "card It opens"
was still stuck in `findText` when a five-minute probe gave up; a CDP
pause showed the stack. The gap is now the single class `[ws edge]+`,
built from `COLLAPSE_CHARS` as `GAPS` already is, which matches the same
strings in one pass. Searching a part at a time (#5875) doesn't help,
since the backtracking happens inside one `exec`: the new test still
times out on main.

The docs caption test gets back the How it works case #5836 dropped when
it hit this. A new Chromium case on a small page with an 80-space run
times out on the old pattern and passes on the new one.

Found while landing #5836 (Ref #4052); Max asked for it to land. Tests
run: the page-search browser tests in
`tests/browser/test_render_anchors.py`, the passage runtime tests and
`pnpm run check:browser`.

> _This was written by Claude Code on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Nov 14, 2026
Folds the Pages guide into Extending, which now opens with Pages and
Layout tabs before its package tabs, and retires `/pages/`. Extending's
reader becomes whoever builds on Leaf, from a page's own markup to a
package: its boundary ladder already starts at a page, and Pages' themes
now sit beside the CSS contracts that build on them.

Pages' Contents and Themes tabs become the Pages tab, opened by the
first sentence of Pages' old introduction; its Layout tab moves as is.
Sections move whole by id, and two ids Extending already used are
renamed (`page-sources`, `page-boundaries`). Extending's lede,
description and scope sentence now name pages as well as packages, and a
few sentences that pointed across the two guides now point within the
page. The sentences in Using, How it works and README that sent readers
to Pages now send them to Extending. `/pages/` returns 404 with no
redirect, like the routes #5836 removed. Every link inside the
repository follows its section, and the route bar and the Worker's route
test drop `/pages/`.

Max picked this home on the #4052 decision page; it is the last change
that issue asked for (Ref #4052, already closed). An independent
reviewer used the built site cold and read the moved prose against main,
and its findings are folded in. Live preview:
http://macbook-pro-7.tail85bb6a.ts.net:8764/extending/

Tests: a full site build, `pnpm run check:worker`, the product-page
model tests (`test_a_composed_part_refuses_an_authored_copy` fails on
main too), and the docs caption page-search test, now on Extending.

> _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