Repository navigation
Name the thread "thread" everywhere, and group its commands under leaf thread - #1193
Merged
Merged
Conversation
…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]>
leaf-agent
approved these changes
Sep 25, 2026
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Leaf used two words for one thing:
conversationnamed the data (ids, the delivery envelope, Ask records,leaf conversation …,conversation.py,runtime/conversation/), andthreadnamed 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 resolveand theleaf conversationgroup become one group:leaf commentleaf thread openleaf reply/edit/resolveleaf thread reply/edit/resolveleaf conversation read/title/summarizeleaf thread read/title/summarizeleaf events --conversationleaf events --threadArguments and behaviour are unchanged, and the old names have no alias.
Data and code
conversationfield becomesthread(summary and title events, Ask records, page-state entries). The envelope'sconversationsbecomesthreads, and the subject, workflow and update-target kind"conversation"becomes"thread".browser.conversationbecomesbrowser.thread, and the event kindconversation_titlebecomesthread_title.x-conversationbecomesx-thread-seat, becausex-thread-surfacealready exists..lf-conversation*becomes.lf-thread-seat/.lf-page-thread*, because.lf-thread*is the panel's.leaf/conversation.py→leaf/thread.py,served_state/conversation.py→served_state/thread.py,assets/runtime/conversation/→assets/runtime/thread/, andreferences/conversation-threads.md→references/threads.md. Tests are renamed to match.threadname in the same scope. They are renamed:workflows.canonical_workflows,semantic-news.js,thread/presentation.jsandapplication.ts.Kept on purpose
references/conversation-loop.mdkeeps 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
check:browserandtest:browser(64), and the nightly render files the rename touches (about 1,680 tests).test_the_render_gate_holds_a_settled_slot_to_the_logs_decision) fails on main as well.