Skip to content

Release removed markup after a Copy pointer press - #2708

Merged
leaf-agent merged 1 commit into
mainfrom
fix/ci-38317918344-copy-pointer-retention
Oct 13, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/ci-38317918344-copy-pointer-retention

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Cause

The Copy control stored the latest pointerdown composedPath() in a module-level array. A click on markup later removed by a live revision kept the clicked node and its section alive until another pointer press. Two forced-GC cases in the failed main run exposed this retention.

Change

Store path membership in a WeakSet. The Copy control can still decide whether its click began on the shown control, while the path does not keep removed nodes alive.

Verification

  • The link and selection cases of test_a_revision_releases_the_served_markup_it_removes failed before the change and all three cases pass after it.
  • Two focused code-copy browser tests pass.
  • pnpm run test:runtime: 392 tests passed.

The Copy control kept the last pointerdown composed path in a module-level array. A click on served markup could therefore keep an entire removed section alive after a live revision. Keep path membership in a WeakSet so the following click can still verify its source while detached nodes can be collected. The link and selection release cases failed before this change and pass after it.
@leaf-agent
leaf-agent merged commit ca59b06 into main Oct 13, 2026
2 checks passed
@leaf-agent
leaf-agent deleted the fix/ci-38317918344-copy-pointer-retention branch October 13, 2026 01:05
max-sixty added a commit that referenced this pull request Oct 13, 2026
main gained #2697, #2700 and #2708. The three files that conflicted
(event_contracts.py, findings.py, work.py) take main's content with the
sweep's edits re-applied by .tmp/standing/apply.py; the "not visible under the
page's standing outcomes" message moved from work.py to findings.py, and the
script now edits it there. main added no other non-glossary "standing".

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.

1 participant