Skip to content

Give the shown extent, the coarse-pointer query, and the text keeper one owner each - #1277

Merged
max-sixty merged 2 commits into
mainfrom
consolidate-keepers-extent
Sep 27, 2026
Merged

max-sixty merged 2 commits into
mainfrom
consolidate-keepers-extent

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner
  • rect.js owns union, the box that covers some boxes, and geometry.js owns
    shownExtent(el), the box an element's shown parts cover. Margin pin placement and
    the response field's room both read it; the private copies in margin-layout.js
    and composing/surface.js are gone, and the surface's clipped unions use union.
  • pointer.js owns coarsePointer, the one (pointer: coarse) query that the
    soft-keyboard submit binding, the response surface, and the target chooser read.
    The keyboard dispatcher's closure now includes pointer.js, which imports nothing.
  • passages.js exports GENERATED; target-references.js imports it.
  • margin-entries.js asks motion.js reducedMotion() for the agent-arrival cue.
  • widget-elements.js adds keepsText(node, text), the text half of keeps, and
    relabel now keeps its words and data-lf-gen instead of rewriting them. Widgets
    get el and keepsText through widget-api.js. Every "set the text only if it
    changed" copy in the kernel and packages calls it instead, and pr-review drops its
    setText/make copies of keepsText/el.

Behaviour that moved: relabel given the words a node already says writes nothing,
so it no longer replaces that node's children, and the relabel guards in
lf-command and lf-visual-review are gone. keepsText compares the stringified
value, as keeps does, so a caller may pass a count.
presentation.js keeps its inline guard, since importing widget-elements.js would
pull that module's graph into the presentation module's startup imports.

Collisions: the uncommitted Codex thread-general-interface tree edits composing/surface.js (its createResponseSurface parameters and a thread/panel-elements.js import), geometry.js (declareOccluder), and widget-api.js (the Thread exports). This change touches other hunks in each.

Left as they are: lf-targeting's own GENERATED = "[data-lf-gen]" asks a narrower, package-local question. lf-agent's word helper stays because that file uses el as a parameter name throughout. lf-visual-review's make writes through relabel with a says choice, so it is not a copy of el.

🤖 Generated with Claude Code

max-sixty and others added 2 commits September 26, 2026 21:51
…one owner each

- `rect.js` owns `union`, the box that covers some boxes, and `geometry.js` owns
  `shownExtent(el)`, the box an element's shown parts cover. Margin pin placement and
  the response field's room both read it; the private copies in `margin-layout.js`
  and `composing/surface.js` are gone, and the surface's clipped unions use `union`.
- `pointer.js` owns `coarsePointer`, the one `(pointer: coarse)` query that the
  soft-keyboard submit binding, the response surface, and the target chooser read.
  The keyboard dispatcher's closure now includes `pointer.js`, which imports nothing.
- `passages.js` exports `GENERATED`; `target-references.js` imports it.
- `margin-entries.js` asks `motion.js` `reducedMotion()` for the agent-arrival cue.
- `widget-elements.js` adds `keepsText(node, text)`, the text half of `keeps`, and
  `relabel` now keeps its words and `data-lf-gen` instead of rewriting them. Widgets
  get `el` and `keepsText` through `widget-api.js`. Every "set the text only if it
  changed" copy in the kernel and packages calls it instead, and `pr-review` drops its
  `setText`/`make` copies of `keepsText`/`el`.

Behaviour that moved: `relabel` given the words a node already says writes nothing,
so it no longer replaces that node's children, and the relabel guards in
`lf-command` and `lf-visual-review` are gone. `keepsText` compares the stringified
value, as `keeps` does, so a caller may pass a count.
`presentation.js` keeps its inline guard, since importing `widget-elements.js` would
pull that module's graph into the presentation module's startup imports.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit caa3203 into main Sep 27, 2026
5 checks passed
@max-sixty
max-sixty deleted the consolidate-keepers-extent branch September 27, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants