Skip to content

Name the thread "thread" everywhere, and group its commands under leaf thread - #1193

Merged
max-sixty merged 2 commits into
mainfrom
thread-rename
Sep 26, 2026
Merged

max-sixty merged 2 commits into
mainfrom
thread-rename

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Leaf used two words for one thing: conversation named the data (ids, the delivery envelope, Ask records, leaf conversation …, conversation.py, runtime/conversation/), and thread named the UI (the Threads panel, thread cards, help text). This settles on thread everywhere. It reverses the direction #1010 took; the user chose it.

Commands

leaf comment, leaf reply, leaf edit, leaf resolve and the leaf conversation group become one group:

Was Now
leaf comment leaf thread open
leaf reply / edit / resolve leaf thread reply / edit / resolve
leaf conversation read / title / summarize leaf thread read / title / summarize
leaf events --conversation leaf events --thread

Arguments and behaviour are unchanged, and the old names have no alias.

Data and code

  • Keys: the conversation field becomes thread (summary and title events, Ask records, page-state entries). The envelope's conversations becomes threads, and the subject, workflow and update-target kind "conversation" becomes "thread". browser.conversation becomes browser.thread, and the event kind conversation_title becomes thread_title.
  • Registry and CSS: x-conversation becomes x-thread-seat, because x-thread-surface already exists. .lf-conversation* becomes .lf-thread-seat / .lf-page-thread*, because .lf-thread* is the panel's.
  • Modules: leaf/conversation.py → leaf/thread.py, served_state/conversation.py → served_state/thread.py, assets/runtime/conversation/ → assets/runtime/thread/, and references/conversation-threads.md → references/threads.md. Tests are renamed to match.
  • Name collisions: four places would have put the new name on an existing thread name in the same scope. They are renamed: workflows.canonical_workflows, semantic-news.js, thread/presentation.js and application.ts.

Kept on purpose

references/conversation-loop.md keeps its name, because it covers the whole agent–user loop (banner, status, handoff), not threads. The remaining hits are plain English about an agent's chat, Codex's own context, or vendored third-party text.

Checks

  • The everyday suite passes, as do the runtime folds (125), check:browser and test:browser (64), and the nightly render files the rename touches (about 1,680 tests).
  • One nightly render-gate test (test_the_render_gate_holds_a_settled_slot_to_the_logs_decision) fails on main as well.
  • Snapshots and the corpus are regenerated.

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

max-sixty and others added 2 commits September 25, 2026 16:20
…af thread`

Leaf used two words for one object: "conversation" for the data and "thread"
for the UI. This reverses #1010 and settles on "thread" throughout, with no
aliases and no reader of the old names.

Data and protocol:
- Event field `conversation` -> `thread` (summary, title, Ask records,
  page-state entries); event kind `conversation_title` -> `thread_title`.
- Delivery envelope `conversations` -> `threads`; subject, update and
  workflow kind `"conversation"` -> `"thread"`.
- Served state `browser.conversation` -> `browser.thread`; the publisher's
  `effective.conversation` -> `effective.thread`; widget `read().conversation`
  -> `read().thread`; presentation region `conversation` -> `thread`.
- Registry key `x-conversation` -> `x-thread-seat`; the seat box class
  `.lf-conversation` -> `.lf-thread-seat` (`data-lf-thread-seat`), and the
  page-side card classes `.lf-conversation-thread|msg|head|body|summary|
  resolved|open` -> `.lf-page-thread[-…]`, since `.lf-thread`,
  `.lf-thread-head` and `.lf-thread-summary` already name the panel's.

Modules: `leaf/conversation.py` -> `leaf/thread.py`,
`served_state/conversation.py` -> `served_state/thread.py`,
`assets/runtime/conversation/` -> `assets/runtime/thread/`,
`references/conversation-threads.md` -> `references/threads.md`, and the
tests that named them. Public widget API `conversationInput` ->
`threadInput`, `landInConversation` -> `landInThread`, `conversationBox`
-> `threadBox`. Where the old runtime name collided with an existing
thread one: `revealConversation` -> `scrollThreadIntoView`,
`renderConversations` -> `renderSeats`, `heldConversation` ->
`heldThreadOrSeat`, `conversational` -> `discussed`.

CLI: `leaf comment|reply|edit|resolve` and the `leaf conversation` group
become one `leaf thread` group with `open` (was `comment`), `reply`,
`edit`, `resolve`, `title`, `summarize` and `read`, each with its old
arguments. `leaf events --conversation` -> `--thread`. Registry clauses,
references, SKILL.md, package guidance, CLI output, docs and tests name
the new commands; the CLI help test now also records `leaf thread --help`.

"Conversation" stays only as plain English for the agent's own chat or a
host's: `references/conversation-loop.md` and its links, "after the
conversation", Codex's per-conversation process, and third-party text.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit bee62e5 into main Sep 26, 2026
5 checks passed
@max-sixty
max-sixty deleted the thread-rename branch September 26, 2026 00:04
max-sixty added a commit that referenced this pull request Sep 26, 2026
A page's server is whatever Leaf ran the start, while its browser
runtime is whatever the last `leaf page init` copied in, and nothing
compared the two. After #1193 renamed `conversation` to `thread`, a
post-rename server serving a pre-rename page left the page throwing
`read failed: can't access property "threads",
state.browser.conversation is undefined` on every state read. The page
stayed up while it was broken.

Now every one-page server refuses such a page and names the fix:

```
<page> was vendored from another Leaf's runtime: its layer names sha256:…, and this Leaf (<path>) ships sha256:…. Leaf serves and checks a page only against the runtime it ships, so re-vendor it with `leaf page init <page>`.
```

### Where it lives
- `layer.foreign_runtime(page_dir, layer)` is the one comparison of the
page's recorded `$layer.runtime` with this Leaf's
`payload_runtime_fingerprint()`. It replaces the render gate's
`_refuse_a_foreign_runtime`.
- `http.page_endpoint` calls it, and every one-page server is built
through it: `server start`, `server run`, `server run --temporary`, a
revival by `leaf wait`, a `--user` preview's restart, and the render
gate's own server.
- `cmd_serve` now builds the endpoint before it takes the server lease
or writes `service.json`, so a refused start writes nothing and gives
the claim back. A server that is already running is still reused.

### What changes for agents
- **After a plugin update:** an older page stays down until it is
re-vendored. `leaf wait`'s revival is refused and prints the `leaf page
init` message.
- **In a checkout whose runtime JS was edited:** pages vendored before
the edit refuse to start until they are re-vendored. Previews re-vendor
on every runtime edit anyway.
- **Limits:** the fingerprint covers only `assets/runtime/`, so a
contract change made only in Python passes it. `layer-registry.md` says
so. The MCP App's `ProcessPageServer` isn't built through
`page_endpoint` and doesn't check the runtime. Its stale side is usually
the long-running `leaf mcp` process rather than the page, so `leaf page
init` would be the wrong advice there. `layer-registry.md` records that
gap too.

### Tests
- A refused `server start` exits non-zero, names both runtime ids and
`leaf page init`, and takes no claim, writes no `service.json` and holds
no lease. After `page init` the start succeeds.
- A wait doesn't revive a dead enabled service over a mismatched page,
and it prints the `leaf page init` message.
- Both tests fail on main.

Results: the everyday suite passes, as do the nightly session, server,
layer, export and gate files and `npm run test:runtime`. Pre-commit is
clean.

> _This was written by Claude Code on behalf of max-sixty_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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