Skip to content

fix(domain): find what a draft change took out by identity - #793

Merged
ixuz merged 1 commit into
mainfrom
fix/draft-edit-cost
Nov 14, 2026
Merged

ixuz merged 1 commit into
mainfrom
fix/draft-edit-cost

Conversation

@ixuz

@ixuz ixuz commented Nov 14, 2026

Copy link
Copy Markdown
Member

What and why

Every change that took statements out of a release draft compared all of the draft's statements by value, to find the blank nodes the change left unnamed. It also compared every statement of the activities carried over from an earlier release. A keystroke in a draft's Making notes or Contact field did all of that on the main thread, so a draft with many statements froze the Studio while typing. The debounced write then applied each held keystroke again, at the same cost.

  • A change keeps the statements it leaves alone as the same objects, so what it took out is now found by identity. Only the blank nodes those statements name are checked.
  • A carried activity is compared only when it is the subject of a statement taken out or put in, and not at all when the draft carries none.
  • Setting the contact gathers only the ids that could clash with its own.
  • In the Studio editor, the next keystroke in the same field replaces a held Contact change, and a held Making notes change when the notes aren't left blank. The write then applies that change once.
  • A growth test types into Making notes on a draft with many statements. docs/studio.md and docs/testing.md are updated.

Refs: GHSA-3w9g-j4p3-r8mj

@ixuz ixuz added the bug Something isn't working label Nov 14, 2026
@ixuz
ixuz added this pull request to the merge queue Nov 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 14, 2026
Each change to a release draft that took statements out looked for the
blank nodes it left unnamed by comparing every statement of the draft
by its value, and compared every statement of the activities carried
from an earlier release. A keystroke in a draft's making notes or
contact field did all of that on the main thread, so a draft with many
statements froze the Studio while typing. The debounced write then
applied each held keystroke again, each at the same cost.

A change keeps the statements it leaves alone as the same objects, so
what it took out is now found by identity, and only the blank nodes
those statements name are looked at. A carried activity is compared
only when it is the subject of a statement taken out or put in, and
not at all when the draft carries none. Setting the contact gathers
only the ids that could stand in the way of its own. What is left is
a few cheap passes over the statements. In the Studio editor, a held
change of the contact, or of the making notes when it leaves some
text, is replaced by the next keystroke of the same field, so the
write applies it once.

Refs: GHSA-3w9g-j4p3-r8mj
@ixuz
ixuz force-pushed the fix/draft-edit-cost branch from 2f76418 to 866cd19 Compare November 14, 2026 19:03
@ixuz
ixuz enabled auto-merge November 14, 2026 19:03
@ixuz
ixuz added this pull request to the merge queue Nov 14, 2026
Merged via the queue into main with commit 5c59201 Nov 14, 2026
53 checks passed
@ixuz
ixuz deleted the fix/draft-edit-cost branch November 14, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant