Repository navigation
Chrome paints follow what they read - #2830
Merged
Merged
Conversation
The banner's status, the floating panel, the version picker, the pages drawer, approval and the `m` keys each paint through one `watchProjection` now, so a publication repaints them when a part they read moves, and none of them names its inputs by hand. Their own mechanical inputs (an open menu, a comparison, a press in flight) ask the same watcher to paint again through `refresh()`, which draws the first paint at once when none has run yet. How the server answered the latest read is in the publication (`reach`: waiting, reached, unreachable, refused or broken), set by adoption, the state feed and a failed startup, so the status reads it with the reading it adopted instead of the state feed and state application pushing each answer at `renderStatus`, `renderVersions` and `renderOthers`. `pageStatus` takes the reach in place of a null or an Error standing for it. Approval's words are derived where they are read (`approvalReading`), rather than read back from what the banner last painted, so the floating panel's Versions view follows the approval's own inputs. The ledger's readings (`entry`, `unpresented`, `releasable`) select their parts instead of reading the whole publication, which a handler run inside a collected paint would otherwise refuse. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The panel took the banner's status and the picker's model as each painted them, so its paint followed those producers rather than the inputs. Both are derived where read now (`statusReading`, `versionsReading`), and the panel's watcher follows what they read; upgrade and a comparison, which are mechanical, still ask it to paint. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/assets/runtime/banner.js
leaf-agent
previously approved these changes
Oct 14, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 14, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 14, 2026
The [main CI run](https://github.com/max-sixty/leaf/actions/runs/38507012987) failed its preview startup test because the test held the page transaction lock while waiting for the preview server to stop. Since #2812, stopping checks the page's claim inside that transaction, so the stop could not complete and the test never arranged the interrupted fetch it meant to examine. The test now aborts its first registry fetch when a runtime edit starts the preview replacement. It records that the startup notice was visible even if recovery navigates to a new document, then checks that the replacement serves the edited theme at the same address. This keeps the failure and recovery behavior under test without blocking the claim-guarded stop. The failing test reproduced on the original `main` tree and passes on this branch against current `main` (`uv run pytest -q -n0 tests/browser/test_render_export.py::test_a_service_that_goes_away_mid_start_says_only_that_and_comes_back`). Pre-commit checks pass. The run's other failure, the async projection wake case, passes on merged #2830 and on current `main`. Co-authored-by: leaf-agent <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Oct 14, 2026
The floating On panel now titles itself by its active list. Its browser test still expected the thread view's back link to say “On”; the visible link says “On me” when the user entered from that list. This PR updates the assertion to the chosen title and keeps the return navigation check. The case failed on [main CI run 38512364290](https://github.com/max-sixty/leaf/actions/runs/38512364290) and passes with this change (`uv run pytest -q -n0 tests/browser/test_render_floating_panel.py::test_on_shows_an_ask_as_its_message_and_reply_comes_back`). The run's startup and outbox cases pass on current `main`, which includes #2835 and #2830. Its intermittent margin counter failure remains tracked in #2793; the focused case passed four times on current `main`. Refs #2793 Co-authored-by: leaf-agent <[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.
First step of the full cutover to one reactive norm, where a paint follows the parts of the publication it reads (#2815 and #2822 did the four document regions). This does Leaf's chrome: none of its paints names its inputs by hand or has a reading pushed at it any more.
Chrome paints are watchers. The banner's status, the floating panel, the version picker, the pages drawer, approval and the
mkey repaint each paint through onewatchProjection. The floating panel had two named watchers plus a hand-written selection of the undo list, asks, document, active revision and agent; the status hadrenderStatus(state)pushed by the state feed plus a hand selection of the queues and agent; the picker and the pages drawer hadrenderVersions(state)andrenderOthers(state)pushed by state application. Their own mechanical inputs (an open menu, a comparison, a press in flight) call the same watcher'srefresh(), which now draws the first paint at once when none has run (projection-watch.js).The server's reach is in the publication. How the server answered the latest read is
reachon the root (waiting,reached,unreachable,refused,broken;build/browser/application.ts), set by adoption, the state feed and a failed startup, and it starts no semantic epoch. The status reads it with the reading the page adopted, andpageStatustakes it in place of a null or an Error standing for it.Derived where read. The status, the versions and approval's words are derived where they are read (
statusReadingandapprovalReadinginbanner.js,versionsReadinginversion.js) rather than read back from what the banner and picker last painted, so the floating panel's paint and the banner toolbar's Versions and latest rows follow their own inputs; upgrade and a comparison, which are mechanical, still ask it to paint. The ledger's readings (entry,unpresented,releasable) select their parts instead of reading the whole publication; a handler the pages drawer's paint ran synchronously released pending sends and threw "a collected read took the whole publication".Evidence.
pnpm run checkpasses; the state feed's Node test now asserts theunreachableandbrokenreach (and fails with the feed'ssetReachremoved). About 70 focused browser tests pass: banner status (loading, offline, refused, broken, announcements, publication links), floating panel (threads, On, approval, notices, status in the field), version picker and menu, pages drawer, approval, On me counts and themwalk.