Repository navigation
Classify each view's threads under its own registry, and drop the browser's re-filter - #2623
Merged
Merged
Conversation
…wser's re-filter The server read every view's frozen threads under the active revision's registry, so a view pinned to an earlier revision got thread decisions its own widgets could not draw, and the browser filtered them out again with a JavaScript copy of `same_state_operation`. Each view now carries its own `thread` reading: `WorkReading.viewing(page)` reads the log beside that revision's document and registry, and the thread projection, its asks, each thread's attention and `after`, the view's queues and its undo offers all derive from it. The threads themselves still fold under the published page's containment. The browser reads `views[revision].thread` and keeps no filter; `sameStateOperation` and its Node test go (Python's `same_state_operation` keeps the earlier-Leaf case, held by `test_interact_document.py`). `approval_history` moves to the top of the browser state, since it reads no registry. User-visible change: on a pinned earlier revision, a frozen ask whose answer that revision's registry defines differently now shows open, with its thread the user's turn, instead of answered with the decision silently missing. The active revision's reading is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Oct 12, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
This wire change needs a page-protocol bump. browser_state no longer serves browser.thread, but a page vendored by the current protocol-2 Leaf still runs its own state-application.js, whose receiveState reads state.browser.thread.threads; it will throw before presenting the page. layer.incompatible_layer accepts that page because $events.protocol remains 2. Raise the kernel protocol in skills/leaf/assets/registry.json so the server refuses those pages with the existing re-vendor instruction, and update the protocol-dependent checks.
A page vendored at protocol 2 runs a `state-application.js` that reads `browser.thread`, which the server no longer serves, so the server now refuses it and names `leaf page init`, as `layer-registry.md`, "Page protocol", asks of a served-state change. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 12, 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.
The server read every view's frozen threads under the active revision's registry. A view pinned to an earlier revision therefore received thread decisions its own widgets could not draw, and the browser filtered them out again with a JavaScript copy of
same_state_operation(kept for that reason in #2482). Each view now carries its own thread reading, and the filter and its copy are gone.Server
WorkReading.viewing(page)reads the log beside another revision's document and registry, sharing the task log and the published page's containment, so the threads themselves fold as before.browser_statetakes each view's reading from it: the thread projection, the asks, each thread'sattentionandafter, the view's queues andapproval_blocking, and its undo offers all derive from that one reading. The active view reads exactly what it read before.Wire shape:
browser.threadbecomesbrowser.views[revision].thread(threads,projection,asks).approval_historymoves tobrowser.approval_history, since it reads no registry.page statereads the active view's thread.The page protocol moves to 3. A page vendored at protocol 2 runs a runtime that reads
browser.thread, so the server now refuses that page and namesleaf page initto re-vendor it (layer-registry.md, "Page protocol").build/browser/protocol-contract.d.tsrestarts at 3.Browser
normalizedProjection,normalizedQuestions,foldThreads' input,projectView, semantic news and frozen-message preparation read the view'sthread.sameStateOperationand its Node test are deleted. Python'ssame_state_operationkeeps the earlier-Leaf case, whichtest_interact_document.pyholds. The Node test of the left-out entry also goes, since no entry can arrive that the view's registry does not classify.Behaviour
On a pinned earlier revision, a frozen ask whose answer that revision's registry defines differently now shows open, with its thread the user's turn. Before, it showed answered while the decision itself was silently missing. The active revision is unchanged.
Tests
test_questions.py::test_a_pinned_view_reads_its_frozen_threads_under_its_own_registryserves both views of a log whose frozen widget's verb changed operation between registries. It checks each view's thread projection, ask status, attention and queue. Whenviewingis made to return the active reading, the test fails.pnpm run checkpasses, includingtest:runtimeand the bundle comparison.interact_support.served_thread, which takes the only served view's thread.