Repository navigation
Give each margin control its receipt in the model, and list a target's controls once - #2522
Merged
Merged
Conversation
…the seat The margin chose a control's workflow receipt by hand: it painted the target's agent work over the primary control after the cluster rendered, and cleared the control to nothing when it stopped carrying that work. The Page Map chose the same receipt in its model, falling back to the control's own. So a package control with its own `workflowReceipt` that gave up the primary seat showed its own receipt in the Page Map and none in the margin. `marginInventory` now gives every control item its `receipt` by one rule (the target's on the surviving primary, its own elsewhere), and the Page Map reads its controls from those items instead of re-deriving them from the offers. Receipts are seat state: each seat paints what its projection chose, on every pass, through `presentContributionReceipts`, which the `contributionReceipts` template directive now wraps. The margin's clusters and readings, the inline Thread seats and page annotation views call it; `presentContributionEntry` no longer paints a record's receipt or turn, and the margin's carrier bookkeeping is gone. Behaviour change: a control that stops carrying its target's agent work goes back to its own receipt in the margin, as it already did in the Page Map. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…iews Page annotation views built their control list a third way, from the offers in declaration order, and painted each control's own receipt. In `data-annotations="page"` the inventory has already dropped the target's workflow item once a control carries it, so that work showed nowhere in the view while the Page Map showed it on the primary. `entryControls` in margin-model.js is now the one list of a target's controls, in canonical order with each control's receipt; the Page Map and `view.controls(entry)` both read it. Behaviour change: a page annotation view shows the target's agent work on its primary control and lists controls in the canonical order its contract names. The feature gallery painted its receipt and turn samples through `presentContributionEntry`, which no longer paints them; `widget-api.js` now exports `presentContributionReceipts` and the gallery calls it. Margin control items lose their constant `surface` field. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
previously approved these changes
Oct 12, 2026
# Conflicts: # skills/leaf/assets/runtime/annotation-overlay/margin-cluster-view.js
leaf-agent
reviewed
Oct 12, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The receipt change has no review finding, but I’m withholding approval on this head because test fails in check:browser: the committed protocol contract still says protocol 1 while the registry says 2. lint then fails because it depends on test. #2536 addresses both gate failures.
leaf-agent
approved these changes
Oct 12, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 12, 2026
Main exported readingPaint from presence.js (#2568), which lf-diff imports and module-authoring.md documents, so it stays an authoring export; this branch's removal of renderRetired and textNodesUnder stands. Main also split a margin control's receipts out of presentContributionEntry into presentContributionReceipts (#2522), so the reference documents both. 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.
The margin kept its own copy of the rule that picks a contribution control's workflow receipt. #2504 moved the Page Map to a model-owned receipt, but the margin still painted the target's agent work over its primary control after the cluster rendered, and cleared that control to nothing once it stopped carrying the work. So a package control with its own
workflowReceiptthat gave up the primary seat showed its own receipt in the Page Map and none in the margin. Page annotation views (data-annotations="page") built their control list a third way and painted only each control's own receipt. Because the inventory drops the target's workflow item once a control carries it, that view showed the target's agent work nowhere.One rule now decides it.
marginInventorygives every control item areceipt: the target's receipt on the surviving primary and the control's own everywhere else.entryControls(entry)inmargin-model.jsis the one list of a target's controls, in canonical order. The Page Map andview.controls(entry)both read it. Receipts are seat state, so each seat paints what its projection chose on every pass throughpresentContributionReceipts, which thecontributionReceiptstemplate directive now wraps. The margin's clusters and readings, the inline Thread seats, page annotation views and the feature gallery all call it, andwidget-api.jsexports it.presentContributionEntryno longer paints a record's receipt or turn, and the margin's carrier bookkeeping is gone.Review item 50, "the margin keeps its own copy of the contribution receipt rule"
module-authoring.md) names.margin-model.js,margin-map-model.js,contribution-controls.js,annotation-view.js,inline-contributions.js,widget-api.js,margin-projection.js,margin-cluster-view.js) and the feature gallery widget, and excludes the regenerated corpus copy.test_each_seat_agrees_with_the_page_map_on_a_controls_receiptruns once with margin annotations and once with page annotations, and both fail onmain. With the margin,editshows no receipt where the Page Map showspicked_up. With page annotations,editshowspicked_upwhereworkingbelongs. Themargin-modelruntime test checks that the cluster, its focused options and the Page Map read the same receipts, and the gallery atlas test now also checks the "On you" turn.