Repository navigation
Draw the hooks module apart from Leaf's Python in How it works' forks material - #6548
Merged
Merged
Conversation
… material How it works drew Leaf as one participant in the take sequence, so the round trips between Leaf's hooks module and Leaf's Python showed nowhere. Now: - The take sequence (Forks tab) has a participant for each process: the page server and `leaf hook`, grouped as Leaf's Python, and the hooks module, the line fork, the working fork and the main thread, grouped as in Claude Code. Each arrow says what crosses, from the follower's report through `$.model.fork`, `$.agent.spawn` and the run's end. Its caption says which half writes what, in place of "Leaf here is its Python and its hooks module together". - The turn-end check's section on the Workflow tab gains a sequence drawn the same way, from the main thread's turn ending to the lines Leaf queues for it. - A paragraph after the forks map says the module only carries out Python's instructions, and why: a session's module is often older than its Python, so a change to a fork changes only the Python. `carrier.py` joins the topic's sources. - The anatomy timeline's Leaf lane splits into Leaf's Python and the hooks module. The module's lane holds its fork calls and run-end reports at the times Claude Code's debug log recorded in the 19:38 run. The line fork and working fork lanes take the forks' own times from that log (the `$.model.fork` call's duration; `agent_completion`), where they had used the moments Python noted them, which put a run's end after the module had reported it. The prose follows: the first run ended at 15.6 s, and the second line fork took 1.5 s. The forks map is unchanged. A page rule draws the sequences' groups as grey grounds without an outline, which otherwise read as extra lifelines. Max picked building this on the fork-messages page (open item 30 there), from drafts drawn there.
leaf-agent
approved these changes
Nov 19, 2026
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.
How it works drew Leaf as one participant in its fork sequences, so the round trips between Leaf's Python and Leaf's Claude Code hooks module showed nowhere. This draws them apart:
#take-sequence): the page server andleaf hook(Leaf's Python) and the hooks module, line fork, working fork and main thread (in Claude Code), each arrow labelled with what crosses. Its caption says which half writes what.#turn-end-sequence): a sequence of its own, drawn the same way.#forks-carrier, after the forks map: the module only carries out Python's instructions (carrier.py), so a change to a fork changes only the Python.carrier.pyjoins the sources.The forks map is unchanged.
To check: the take sequence is now about 1,020 px tall at the column's width, against 520 before, and scrolls sideways in its box on a phone. The module's times, like the timeline's other times since #6489, come from the run's recording rather than checked-in data.
From open item
#30on the fork-messages page, where Max picked building it.Tests:
tests/model/test_product_page.py,dev/tests/model/test_product_page.py, the product-preview test indev/tests/model/test_interact_preview.py;leaf page check --renderon the docs preview is clean apart from advice it already gave. Each diagram was looked at as Firefox draws it, light and dark, at desktop and phone widths.