Repository navigation
Give undo, the root's server view, and state watching one owner each - #1219
Merged
Merged
Conversation
Undo. The server's view of each revision now emits the final list of gestures that document can take back, and the browser applies no rule of its own: `z` takes the head, a widget's Undo filters it to its own entries. The view drops an approval of another stamp, an action whose widget and verb the document (or frozen thread markup) does not hold, and a page action a later revision restated. `z` no longer requires an action to have been made on the shown revision, the rule #450 stated for both paths and #666 dropped from the widget path so carried decisions stay undoable; a later revision's markup placing the unit is refused at the door (`absorbed`), and the restated case is now the view's. `z`, the widget undo branch, and reactions withdraw through one `withdraw(event)` door, and the controller no longer restates the candidate lookup. Behaviour that moved: - `z` takes back a decision carried into a later revision, as the widget's own Undo already could. - `z` takes back a thread widget's action even while its element is not rendered, instead of skipping to an older gesture. - A reaction chip withdraws a standing reaction while an unrelated gesture is sending or a reading is being applied; like a widget's Undo, it waits (with the same notice) only while another accepted action awaits presentation or the reaction itself is unsent. The `z` walk alone needs the page settled, since its target is whatever is newest. - A widget undo the page refuses now says why. Server view. The publisher resolves the shown revision's view once, as `effective.view` less its transport basis, replacing `effective.updates`, `publishedAt`, and `lifecycle`. `runtime.view`, updates.js, the undo walk, and projection coverage read it. Semantic news now reads page obligations from the shown revision rather than the active one, so an Ask a waiting activation adds becomes news when a revision holding it is presented. state-application's `stale()` is the publisher's `overtaken(state)`, which `adoptable()` also uses. Watchers. `watchAsks` is now `watchProjection` with its own reading, as `watchUpdates` and `watchHistory` already were: first call on the next microtask, coalesced per microtask, nothing while the owner is disconnected. It no longer calls synchronously, and it may repeat an unchanged set. packages.md, projection-watch.js, and updates.js state that. `COLLAPSE` lives in runtime/collapse.js, which passages.js, the composing modules, and projection/model.js import; the Python parity test reads it there. passages.py's comment still names leaf.js as its home; that file is held by another change. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
previously approved these changes
Sep 26, 2026
# Conflicts: # scripts/browser/generated/browser-runtime.js.map # scripts/browser/generated/browser-runtime.manifest.json # skills/leaf/assets/vendor/browser-runtime.js
leaf-agent
previously approved these changes
Sep 26, 2026
# Conflicts: # skills/leaf/scripts/leaf/served_state/browser.py
leaf-agent
approved these changes
Sep 26, 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.
Undo. The server's view of each revision now emits the final list of
gestures that document can take back, and the browser applies no rule of
its own:
ztakes the head, a widget's Undo filters it to its own entries.The view drops an approval of another stamp, an action whose widget and
verb the document (or frozen thread markup) does not hold, and a page
action a later revision restated.
zno longer requires an action to havebeen made on the shown revision, the rule #450 stated for both paths and
#666 dropped from the widget path so carried decisions stay undoable; a
later revision's markup placing the unit is refused at the door
(
absorbed), and the restated case is now the view's.z, the widgetundo branch, and reactions withdraw through one
withdraw(event)door,and the controller no longer restates the candidate lookup.
Behaviour that moved:
ztakes back a decision carried into a later revision, as thewidget's own Undo already could.
ztakes back a thread widget's action even while its element is notrendered, instead of skipping to an older gesture.
is sending or a reading is being applied; like a widget's Undo, it waits
(with the same notice) only while another accepted action awaits
presentation or the reaction itself is unsent. The
zwalk alone needsthe page settled, since its target is whatever is newest.
Server view. The publisher resolves the shown revision's view once, as
effective.viewless its transport basis, replacingeffective.updates,publishedAt, andlifecycle.runtime.view, updates.js, the undo walk,and projection coverage read it. Semantic news now reads page obligations
from the shown revision rather than the active one, so an Ask a waiting
activation adds becomes news when a revision holding it is presented.
state-application's
stale()is the publisher'sovertaken(state),which
adoptable()also uses.Watchers.
watchAsksis nowwatchProjectionwith its own reading, aswatchUpdatesandwatchHistoryalready were: first call on the nextmicrotask, coalesced per microtask, nothing while the owner is
disconnected. It no longer calls synchronously, and it may repeat an
unchanged set. packages.md, projection-watch.js, and updates.js state
that.
COLLAPSElives in runtime/collapse.js, which passages.js, the composingmodules, and projection/model.js import; the Python parity test reads it
there. passages.py's comment still names leaf.js as its home; that file
is held by another change.
Checks run locally:
npm run check:browser,npm run test:browser,npm run test:runtime, pre-commit,tests/test_interact_server.py,tests/test_interact_contract.py, the everyday browser files this touches (test_render_semantic_news.py,test_render_application_boundary.py), and the nightly undo, watcher, and version selections (test_render_outbox.py,test_render_reactions.py, and-kselections of projection, widgets, margin, options, navigation).🤖 Generated with Claude Code