Skip to content

Hold connector ends to accepted order across tabs, late undo and reflow - #1623

Merged
quanvu309 merged 2 commits into
mainfrom
t3/connector-line-end-invariants
Nov 24, 2026
Merged

quanvu309 merged 2 commits into
mainfrom
t3/connector-line-end-invariants

Conversation

@quanvu309

@quanvu309 quanvu309 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A connector keeps the free point or live attachment the batch writes. Undoing an agent run that creates a frame and attaches an existing connector now restores the connector before removing the frame.

Apply the batch
  End is free or attached to a live node → keep it
  End still names a removed target → free it at its painted point
  Fold saves any remaining off-deck end as a point

Concurrent deletes still land quietly. The fold frees any end the deleting tab missed. A redo that writes the first delete's free point keeps that point. If the redo arrives after another tab changes only the other end, the resend keeps the other tab's change.

The same geometry feeds the canvas, filmstrip and capture, and the undo and offline replay paths. Agent tools and Aira use the shared edit rule. This round changes endpoint resolution and adds no design panel or PowerPoint import or export changes.

Before / after

Annotated before and after: The connector after undoing the agent run and reopening the deck

b12588c this PR
b12588cca: The connector after undoing the agent run and reopening the deck this PR: The connector after undoing the agent run and reopening the deck

Evidence

  • Before. The Doom reproduction passes the inverse directly to the fold and restores the original point. Passing it through the device's freeing step overwrites the point. The MCP run on the previous head saved (600, 250).
  • After. The same MCP run restores (230, 145) in Postgres and removes the frame. The browser regression draws the frame, attaches the line, presses Ctrl+Z twice, checks what saved, and reloads to check what paints.
  • The private browser stack reopened both saved decks. The frame was gone in both captures. The line's far end stayed fixed, and its start returned to the original point. Runs 2026-11-24T18-24-47-311Z-23741b and 2026-11-24T18-25-07-670Z-8bc788 produced the images.
  • TLC passed all active specs. The device model checked 136 states and replayed 176 edges. Restoring the old overwrite rule violates RestoresOriginalPoint at the undo press. The partial-fold model checked 461 states and replayed 1,010 edges through Postgres.
  • Node 24.22.3. The gate passed. Doom, live, MCP, render, web and root replays passed 2,603 tests in 337 files. API passed 747 tests in 81 files. The line-end, undo and offline browser specs passed 36 tests under the shared lock with four workers.

Merge danger

Door. Two-way. Migration 28 adds two endpoint indexes.

Blast radius. Connector edits, concurrent deletes and undo/redo. For a target the device never painted, the fold calculates the free point from stored boxes. If the target was laid out in a frame, that point can differ from its solved layout position.

@github-actions github-actions Bot added editor Touches the editor: canvas, slides, export and their screens aira Touches Aira, agent turns, MCP or usage document Touches edit order, the engine, the catalog or sync verify Touches the verify-airdesign skills or journeys specs Touches a TLA+ spec or its replay labels Nov 24, 2026
@quanvu309
quanvu309 force-pushed the t3/connector-line-end-invariants branch from c9afad7 to 560f87c Compare November 24, 2026 17:06
…s win

The device frees every end on a shape its batch takes off the deck at
the point it painted, an end the batch draws onto a shape off the deck
where it paints, and an end of a line an undo brings back inside a
frame where the line last painted. Its freed line write carries no
base, so the delete always lands and the last write wins. The deck
frees any end still on a shape off the deck after a batch, of a line
the batch takes a shape from, writes a geometry or parent to, or brings
back onto the deck, where the shape's stored box paints, and never
refuses a batch over a line end. The server reads the lines of every
shape the batch takes off the deck and of every subtree it brings
back, through endpoint indexes, and saves every line the fold freed.
An emptied text previews its freed end in the frame as the preview
lays it out. Modelled in specs/line-ends and specs/line-end-batches.
@quanvu309
quanvu309 force-pushed the t3/connector-line-end-invariants branch from 560f87c to b12588c Compare November 24, 2026 18:07
@quanvu309

Copy link
Copy Markdown
Collaborator Author

🤖 AI Agent responding on behalf of Quan Vu

ci failed on head d0dddb9 in tests this pull request does not edit. https://github.com/Rickvu309/AirDesign/actions/runs/45461799439

  • tests/browser/editor-speed.spec.ts:62: a 40-slide Doom deck does no picture work while no agent reads it and keeps a drag inside one frame

One fresh run on this head will tell. Land records a race only if these tests pass in it, and stops for a fix if they fail again.

Taking a fresh ci run with run attempt 1 by closing and reopening the pull request. If the fresh run fails, stop for a fix.

This is the one fresh run for head d0dddb9.

@quanvu309 quanvu309 closed this Nov 24, 2026
@quanvu309 quanvu309 reopened this Nov 24, 2026
@quanvu309
quanvu309 merged commit 3c892ed into main Nov 24, 2026
44 of 48 checks passed
@quanvu309
quanvu309 deleted the t3/connector-line-end-invariants branch November 24, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aira Touches Aira, agent turns, MCP or usage document Touches edit order, the engine, the catalog or sync editor Touches the editor: canvas, slides, export and their screens specs Touches a TLA+ spec or its replay verify Touches the verify-airdesign skills or journeys

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant