Skip to content

fix(canvas): keep nodes dragged together adjacent in a Column/Row Frame - #433

Open
cxxxxxn (cxxxxxn) wants to merge 109 commits into
microsoft:mainfrom
cxxxxxn:fix/masonry-group-drop
Open

cxxxxxn (cxxxxxn) wants to merge 109 commits into
microsoft:mainfrom
cxxxxxn:fix/masonry-group-drop

Conversation

@cxxxxxn

Copy link
Copy Markdown
Contributor

Summary

Dropping a multi-selection into a Column or Row Frame placed the nodes apart, with members that were already in the Frame interleaved between them. Each dragged node was inserted into the reading order by its own coordinate.

  • One block. Nodes dragged together now enter each track as one contiguous block at the leading member's coordinate, keeping their relative order. This applies to a drop into another Frame and to a move inside one.
  • A nudge changes nothing. A drag that leaves every member at its existing ordinal does not gather the selection.
  • Preview and commit share one solve. Both derive the order from solveMasonryPlacement over the full set of dragged nodes, and the preview draws a footprint per dragged node. Before, the preview treated only the grabbed node as moved, so its footprint could differ from where a multi-selection landed.

Stacked on #386

This builds on the Column/Row reading order (layoutOrder) introduced by #386, which is not on main yet. The branch is #386's head plus one commit (e0e4e9cb4); until #386 merges, this PR's diff also shows #386's commits. Review only that commit.

Not changed

  • SET_NODE_GEOMETRY and REORDER_NODES still order each moved node by its own position. Their moved set includes reflowed peers, so gathering there would misorder them.
  • Grid keeps its own shared planner (planStructuredDrop).

Testing

  • New unit test resolveNodeDragStop.masonryGroup.test.ts: cross-Frame drop, same-Frame move, nudge.
  • New Playwright spec structured-multi-drop.spec.ts: the same three cases in a real browser, asserting the saved order, the rendered order, and that each node lands on its live footprint.
  • pnpm typecheck, pnpm format, pnpm lint:fix (0 errors), shared canvas-engine tests, web src/handler + src/store tests, and structured-drop.spec.ts pass on this branch.
  • Not covered: Cmd/Ctrl-click multi-select (the spec selects by marquee).

🤖 Generated with Claude Code

cxxxxxn (cxxxxxn) and others added 30 commits November 6, 2026 20:35
… order

Add strict ordered diff, replay and inversion; integrate snapshots and identity remapping. Give Column/Row independent reading lists and relative Agent placements while preserving Grid cells and existing collaboration gates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Server-side core that saves one canvas mutation reliably: result-record
lookup by request id, admission under the Workspace lease and Space
mutex, shared-engine execution, and an atomic commit of state, events
and the result record on SQLite, PostgreSQL and Disk (redo). Also keeps
content operations, sessions, result lookup, the structural snapshot,
commit replay with the SSE stream, and attaching Review records to a
commit.

This is the phase C work reduced to that core. Removed relative to the
full snapshot on archive/phase-c-full-2026-11-11:
- per-Space coexistence machinery (operation marker, per-backend
  activation flag, legacy-write rejection, RFS alias of the routes);
  one process-wide switch HUABU_CANVAS_OPERATIONS (off by default)
  now gates the operation routes
- durable derived-work queue, metadata/cover/title/agent owners and
  their forks in legacy services, undo, Review accept/revert,
  retention and the maintenance loop

Kept independent hardening on legacy paths: Workspace lease across
mutex queueing, RFS upload scoping and no-overwrite creation.

Nothing calls the core in production yet; the switch is off.
Server suite: 11 failures remain, all in files identical to the parent
commit (video-cover, external-watcher.real, image-gen and web-search
entry, world-previews suite error).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
SpaceHandle.write can now persist a result record (principal + request
id -> stored response) atomically with the state and delta log, and
maintains per-node version stamps (created / membership) once a Space
has a lazily created baseline. Adds SpaceHandle.save (lookup, stamps,
record) and basis helpers.

SQLite/PostgreSQL: migration v5 (space_save_heads, space_save_results),
same transaction as the write. Disk: write-ahead intent under
.history/save with idempotent recovery. Spaces without a baseline and
writes without a result pay one key lookup / one stat.

Contract tests run on every backend; crash-recovery fixtures cover
SQLite and Disk. PostgreSQL remote tests were not run locally.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
executeOnServer accepts an optional request id and read version:
- a request id is looked up before any preparation; the same request
  returns the stored output (replayed, no publish, no re-import), a
  different body is rejected; new work saves the result record in the
  same write, including no-op and conflict outcomes; an unknown save
  outcome surfaces as such
- a read version rejects commands whose targets were deleted, or moved
  between frames for geometry/parent/order/align/distribute commands,
  via an admit hook in the shared engine (stale-target, stale-parent)
- the sync update event and the output carry the request id

Calls without either input behave as before; no existing test changed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- execute (RFS and /api/canvas) accepts an optional operationId and
  basis, returns operationId/basis/replayed, and maps the executor's
  errors to 409 operation-id-reused, 409 basis-unknown and 503
  operation-outcome-unknown; GET execute/:operationId returns a stored
  response
- every query response and node download carries the current basis
- huabu-rfs execute attaches a request id per invocation, retries a
  dropped or timed-out request under the same id and bytes, prints the
  id on final failure, accepts --operation-id and --basis, and gains
  `result <operation-id>`
- agent-facing guides describe basis, the request id and safe retry

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The executor derives Review records before the write and passes them
to SpaceHandle.write, which stores the coalesced per-thread list in
the same atomic unit as state, delta, result record and stamps on all
three backends; the best-effort append after the write is gone and a
replay never appends twice.

Thread attribution on both execute routes is dropped unless the thread
belongs to the Space. All machine-token callers still share one
principal, so this checks membership, not which agent is calling.

Also: exported and imported Spaces no longer carry .history/save (an
imported Space starts without a baseline); the stored-result lookup
answers 404 for results that are not RFS executes; core reliable-save
executor cases now also run on SQLite.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Reliable save now lives in the executor and SpaceHandle.write, so the
parallel operation path is removed: canvas/operations, the
SpaceOperationStore port with its rules and three backend adapters,
the Disk redo adapter, the shared canvas-operations protocol, the
operation branch of the sync stream and the HUABU_CANVAS_OPERATIONS
switch. Migration v6 drops the tables v3 created for it.

Shared SQL text and pure rules for save and Review coalescing move to
storage/backends/sql. Architecture docs describe the request id, read
version, result records and node version stamps; the realtime-sync
proposal carries a status note on what is superseded.

PostgreSQL schema tests for v6 need a real database and were not run.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Conflicts:
- canvas.route.ts: upstream dropped the owner-only check on agent
  execute batches; kept that removal and this branch's request-id and
  basis handling
- preprocessing/dispatcher.ts: both workspace imports are needed
- agent-thread.service.test.ts, setFrameLayoutCells.test.ts: both
  sides added tests; kept both
- external/agenetes: taken from upstream as is; this branch no longer
  changes the subtree (upstream fixed ACP close during startup itself)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Node writes and the executor now hold a Workspace lease, so a suite
that runs them without a configured Workspace (video-cover) or with a
partial workspace mock (world-previews) failed. Both suites pass on
main; this branch broke them. Provide the lease in their mocks.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The separate operation path these notes referred to was removed. Describe
what the execute write does with an order-only change today and which
read-version checks cover placements.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The [ and ] shortcuts pass the whole selection to REORDER_NODES, which
rejects a selection that spans containers or includes a locked layer.
Nothing happened and nothing was shown. Check admission in the resolver
and show an auto-dismissing warning instead.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
An execute batch that only changes layer order committed with empty
deltas, so other open pages kept the old stacking until reload.

executeOnServer now attaches the batch's SetSiblingOrderEvent list as an
optional orderEvents field on the update notification and the execute
response. The browser replays it after the entity deltas; events that do
not fit the local forest leave the entity-only result in place and fall
back to the existing reload when there are no unsaved local edits.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Two real browser contexts open the same Space. Each case (move, create,
delete, accent colour, layer order, two writers on different nodes, note
body, execute control) has a 'current' test pinning today's behaviour and
a 'target' test.fixme stating the intended behaviour. Set
E2E_RUN_SYNC_TARGETS=1 to run the targets as expected failures.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…updates per property

A ui command batch now runs locally and is then sent to POST /execute by a
serial send queue with a request id and the page's client id; a failed
request is repeated with the same id. Free-drag drops and resize previews
are sent by the batch that closes the gesture. Incoming updates, including
the page's own, are applied per property unit: a unit this page changed and
has not had confirmed keeps the local value, and the remote value is kept
as the unit's last confirmed value. A person's edit takes no undo snapshot
and does not change selection on another page. The remaining whole-Space
PUT and any reload wait for the queue.

The update event gains an optional source field.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e close

While a queued execute request keeps failing the page shows a persistent
unsynced notice and retries on its own, at once when the browser comes back
online. After 8 failed attempts or 60 s the queue stalls and the user
chooses between keep trying and reloading the Space without the unsent
changes; the page never reloads over them by itself, the whole-Space PUT is
held, and leaving the Space is refused. On page close unanswered batches
are sent with keepalive under their existing request ids and the browser is
asked to confirm.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nds; keep the PUT for the rest

Undo and redo, patchNodeSilent and measured heights now reach the server
through the send queue whenever commands can reproduce their result; the
proposal read from the state difference is run through the engine first
and used only if it gives exactly the intended state. An undo entry
records what its edit changed, so once another page's edit has been
applied an undo puts back only that. A measured height is applied locally
and reported once, after the node's content save, and not over a
measurement already on the server.

The whole-Space PUT stays for what no command can say (a node coming back,
a cleared data key, layout around renderer-measured children, the title).
While one is pending, edits join it instead of the queue, and what waits
for it — like what a pointer gesture has changed so far — is held against
incoming updates.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
When a Space is open on several pages, each page now sees the others: a
coloured cursor at the other page's pointer, and an outline in the same
colour around the nodes that page has selected, is dragging or is editing.
A marker stands for a page (colour from the server, device label from the
page); the payload has room for a person's name later.

Presence is ephemeral. A page reports through POST /presence and receives
the others as `presence` events on the existing Canvas Sync stream. The
server keeps it in memory per Space, outside the sync publisher, and drops a
page on leave, when its stream closes, or after 75 s of silence. The browser
keeps it in its own store, so nothing enters the Space record, its version,
undo or a save, and a pointer tick re-renders only the cursor layer. A drag
is reported as "being moved"; the position still arrives on drop.

The page id is the existing originator.tabId, moved to its own module.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Two devices open one Space with different pan and zoom. B must see A's
cursor and the outline of the node A selected where they belong under B's
own viewport, see that A is moving or editing a node without the drag being
streamed, and lose both markers when A closes or navigates away. Neither
page may save anything or change the Space version while doing so.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A node-content save does not change the Space version, so the other
pages were only told that a node had been saved and kept their copy
until they reloaded. Each of them now fetches the node named by the
invalidate event and shows it, with its revision as the new save
baseline, unless it has unsaved content of its own for that node; that
case keeps the existing content-conflict choice. The save names its
page so the saving page does not fetch what it wrote.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ge undo

RESTORE_NODES puts nodes and edges back as a page's undo history holds
them: a node not named in `replace` is inserted with its id and content
and must not exist; one named there must exist and is replaced in place,
keeping the data keys the command lists. Parents must exist and be
containers, a node returns under a lock only as the member it was, Agent
Nodes cannot be inserted and never change type. The command is UI-only: it
is not in the agent schema and is refused for an agent batch.

MERGE_NODE_DATA patches take `unset`, the data keys (or `style.<leaf>`) to
remove, admitted like a write of the same key. JSON drops a key whose value
is undefined, so a page states the removal there.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
While another page reports a node as being edited, this page cannot
start editing its body or title: the preview is read-only with a notice,
in-place editing and renames are refused with a short hint. Moving,
resizing and styling stay allowed. The lock lives only in presence. It
ends when the editor loses focus or closes (after the last save has been
answered), when the window loses focus, after two minutes without input,
and with the page's presence. The content revision check remains the
safety net for a race.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…_SIZE

Text, Question and Space Shortcut nodes have no authored height, so the
headless engine could lay a Frame out around them only from the `measured`
a whole-Space save carried. APPLY_MEASURED_SIZE reports the box a renderer
measured: it is stored as `data.measuredSize` with the key (content
revision and authored width) it was measured under, mirrored to
`measured`, and the affected Frames are laid out again by the executor's
end-of-batch pass. An item whose key no longer matches the node is ignored,
as is an unchanged box, so neither writes a version. UI-only like
APPLY_MEASURED_HEIGHT, and refused for an agent batch. RESTORE_NODES seeds a
returning node's `measured` from a box reported for exactly its content.

Also gives the restore test's seeded sidecars the content field the store
type requires.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
PATCH /canvas/:id/title advances the version without touching a node. It
published a snapshot, which every open page answered by loading the Space
again. It now publishes the update from the previous version to the new
one, with no deltas and the new title (an optional field on the update
event), so pages stay in step and show the title without a reload. The
conversation-owner stream refreshes on it as it did on the snapshot.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…r pointers

Presence markers now use the node accent palette (teal, orange, purple,
green, red, amber) through the existing accent foreground tokens instead
of six tokens of their own; amber uses the darker variant so the label
text stays legible in the light theme. A pen is reported while it hovers
and while it is in contact, and a single finger is reported at its
contact point and for a moment after it lifts. Two fingers navigating
are not reported.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`unset` is a page's way to state a removal JSON cannot carry. An agent
clears with null where a field allows it, and its schema never carried
`unset`; a batch that claims the agent origin over HTTP is now refused too.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Every writer that still ended in PUT /api/canvas/:id now sends commands
through the send queue, or is local by nature:

- Undo and redo plan their commands in sync/restorePlan.ts: per-property
  commands where they exist, RESTORE_NODES for a node or edge that comes
  back (the server writes its content in the same batch) and for a
  surviving node no property command reaches. The plan is run through the
  engine as the one batch the server will execute; when the engine would
  not reproduce the snapshot the page shows what the commands give, so page
  and server agree. A returning Agent Node keeps its association path and
  content hold; its edges and order follow in a gated batch. The restoring
  batch waits for the node's sidecar DELETE, and content saves and
  preprocessing for the node wait for the batch.
- A data patch that clears a key with undefined is sent with `unset`.
- Frame layout around renderer-measured children stays this page's own;
  the measured box is reported with APPLY_MEASURED_SIZE and the server lays
  the same Frames out. A page reports only when its own measurement of a
  content changes, never in answer to another page's box.
- The Space title goes to PATCH /canvas/:id/title; pages learn it from the
  rename's update.
- Read-model hints and the rollback of a failed creation are local only.
  The load-time Frame-header migration is sent as geometry commands and
  the Space is loaded again. The page-close flush is the queue's keepalive
  flush.

With no caller left, saveCanvas, the structure scheduler, the dirty
detector, the version-conflict state and its toast, and the save
reconciliation helpers are removed. drainPendingSaves waits for the queue,
pending associations and content; a request that was failing is retried at
once and one more failure rejects the drain, as a failed PUT used to. The
action-log buffer is flushed when the queue drains.

Tests that asserted the PUT are rewritten for the commands that replace it;
the PUT-only cases (version conflict, structure-save retry, edits joining a
pending PUT) are removed with the code.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Page A undoes a deletion and a type change, clears a data key, grows a Text
inside a hug Frame, shows a read-model hint and renames the Space. Page B
holds an undo entry from before. The spec asserts that neither page sends
PUT /api/canvas/:id, that page B never fetches the Space again or reloads,
that it shows page A's results, and that its own undo still works.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…save

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Node content between pages, the one-editor-at-a-time lock and the presence
changes, on top of the browser no longer saving the whole Space.

Conflicts:
- multi-page-sync-baseline.spec.ts: case (f) is content-sync's two passing
  tests; the `target` switch and its leftovers are gone. The store fields
  drop-structure-put removed (`versionConflict`, `isSaving`) are not read;
  the conflict-toast count already asserted stands in for them.
- canvasSyncStore.test.ts: both sides' tests, with one mock set that has
  the Space title setter and the remote-content hooks.
- canvas-realtime-sync.md: content fields reach other pages through the
  content path, there is no whole-Space PUT, and the renderer box is
  reported through APPLY_MEASURED_SIZE; the gaps either branch closed are
  removed, and sentences that still described the PUT, its 409 path or
  the structure scheduler are rewritten.

Also needed for the two to fit:
- content-sync.spec.ts and canvasStore.remoteContent.test.ts read
  `isSaving` / `pendingSave` / `versionConflict`; they now ask
  `hasUnsavedCanvasEdits()`.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
cxxxxxn (cxxxxxn) and others added 26 commits November 16, 2026 19:50
…ions of a batch

Describes nodeContentRevisions on the update event and the execute
response: which nodes are named, that the value is read back from storage
after the commit and what that costs per backend, every publisher, what a
stored result record carries, and what a page does with a content change
that names no revision. Lists the remaining places the page hashes a node,
all of its own content. The Phase 3 paragraph of the freshness plan now
describes the implemented state.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
huabu-rfs sends a request id with every execute, and the route accepts a
request id only from an authenticated caller. The fixture registered the
RFS routes without any identity, so the standalone installer's first
execute was answered 401 (the Space Kits step of CI). The fixture now
resolves the machine principal as the RFS transport does.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A node's content revision hashed content, src, properties and
propertyDisplayKeys. A custom property changed by anyone therefore moved
the revision of the body: a person typing got a conflict prompt for a tag
an agent added, and two writers of different properties refused each
other.

nodeRevisionOf now hashes content and src only (CONTENT_REVISION_KEYS).
Custom properties are independent small items, like colour or position.
The revision of a node without properties is the same string as before,
and nothing stores a revision with a node, so no data is migrated.

The review card's CREATE fingerprint still covers properties: it answers
what a revert would destroy, which is another question.

Server and page follow in the next commits; they are not consistent with
this one on their own.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Content PUT. A request that carries only properties and/or
propertyDisplayKeys is applied to the stored record without a revision
check, on every node type; an expectRev in it is ignored. A request that
also carries a body checks expectRev for the body as before, and when the
body is refused the property patch is still applied in the same pass
under the Space's write mutex: the 409 says so (propertiesApplied) and
the invalidate is published. Nothing that was accepted before is refused
now.

Agents. collectMergeConflicts requires expectRev, and a prior read, only
for a MERGE_NODE_DATA patch entry that rewrites content. A properties-only
entry applies without either, and with a stale or meaningless expectRev.
An entry with content and properties is refused as a whole when the body
revision is stale. No revision is injected for a property patch, and
inspect_nodes no longer records a metadata freshness nobody reads. The
tool descriptions say so.

A PDF's extracted text is a derived body and was only checked while
properties shared its revision; the metadata-only revision accepted for
that (derivedBody) is removed.

Tests: the property patch against a stale and an absent body revision, a
body save after somebody changed a property, a stale body with and
without properties beside it, two writers on different keys and on the
same key, a list value as one value, agent patches without a read.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… revision

A body save quotes the body's revision and carries no property nobody
changed on this page. A property edit (commitProperties) is one request
of its own keys, without a revision, a body or a title, in a lane of its
own: it is sent while the node's body is unsaved, in flight or frozen by
a conflict, it is not unsaved content of the node, and its answer does
not move the body's baseline. A property changed in the store (undo,
redo) is saved as the keys that changed, a removed key as null.

Properties that arrive while a body is unsaved here are shown: from
another page's save by a fetch that takes the properties and leaves text,
title and baseline; from an update by applying the keys the batch
changed. A key changed and not saved here keeps its local value. A body
that arrives while a property edit is on the wire is shown at once, and
the node is read once more after the edit's answer.

The queue no longer fetches, merges and resends a property save that was
refused as stale, keeps no property baseline, and does not freeze a node
or ask Keep mine / Load latest for a property. A property save that
genuinely fails is still retracted with Retry. "The same content" for the
identical-content rule is the body.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
propertyMerge.ts rebased a property edit onto the server's properties
after its save had been refused for another writer's key. Nothing is
refused for that any more, and nothing calls it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Two pages changing different properties at the same moment: one request
each, none refused. The same property: the last writer wins on both pages
and the server, nobody is asked. An agent changes a property while a page
types the body: the page shows it, its save is taken, both stand. An
agent adds a tag right after a body save, without a revision and with a
stale one; its body rewrite is still refused.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
One rule for pages and agents: the content revision protects the body
(content, src); custom properties are per-key patches without a revision.
The agent guides and the Space skill say that properties need no
expectRev and no prior read, and that a body rewrite still does.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Its one caller was the property merge, which asked whether a body it was
about to take in was still being typed elsewhere.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ct choice

A node frozen by a body conflict now sends the properties changed in the
store by themselves. When that request failed, the generic failure path
replaced the conflict's failure record and dismissed the Keep mine / Load
latest toast for a Retry toast, leaving the node frozen without its
choice. The conflict stays the record of the node; the properties remain
queued and go out with the next save.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Main at 95d06ff: managed identity for Azure blobs (microsoft#385). No conflicts.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…tch does

A page that only received a deletion sent DELETE …/nodes/:nodeId after its
own pending sidecar writes, which could be seconds later — after another
page's undo had restored the node and its body. The server's execute already
deletes the record in the deleting commit, so the browser sends nothing, and
the route answers success without touching the record of a node that is in
the Space.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
An edit made while the Space was loading was sent to /execute (the gesture's
batch, a patch, an undo, a measurement report). The whole-Space autosave used
to skip while loading; restore that for the command path: nothing is sent
while isLoading or before the first successful load of the open Space, and
such an edit changes this page only until the load replaces it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Covers the wait after a confirmed batch whose update the stream has not
delivered: the Space is reloaded when the wait runs out, and not when the
stream copy arrives in time. The wait is exported as ECHO_TIMEOUT_MS so the
test does not hard-code it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
browserSync forgot the wanted reload before calling it, the store ignored
the result and loadCanvas swallowed the error (getCanvas even turned a
transport failure into 'not found'). After a refused command the version is
in step, so nothing asked again and the page stayed diverged, while the
after-reload callback ran anyway.

loadCanvas now reports how it ended, a failed same-Space load keeps the page
as it is, the reload is asked for again with a backoff (500 ms doubling to
10 s), one at a time, and what follows a reload runs only after a load that
succeeded.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… in place

The reload gate looked only at the content queue, so a reload wanted while a
text node was being typed into (its draft is in the control until blur), a
title was being renamed or a property field had focus ran at once; and
loadCanvas set isLoading, which made CanvasPage swap the canvas for the
loading surface and unmount whatever held the text.

A wanted reload is now held while the page is editing (the presence editing
tracker's node, or another focused text control of the canvas) or dragging,
and runs when that ends. A same-Space reload asked for by sync is a refresh
in place: isLoading stays false, the canvas stays mounted, the viewport is
left alone and surviving nodes stay selected; a load this page's own work
overtook is not used and is asked for again.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…sture

isUnsentUnit excludes content keys and the read-model keys (contentMissing,
contentDuplicate, duplicateFiles, measuredSize), but the gesture prelude, the
tick submission and the in-flight holds used isContentUnit only. A read-model
hint patched in during a drag was therefore sent as MERGE_NODE_DATA with the
closing batch, and a structure patch that landed during a drag that was then
cancelled was never sent at all.

All of them use isUnsentUnit now, and a gesture that moves nothing — a click,
a cancelled drag — sends what else reached the store during it, without any
placement.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nteed progress

Disk swept expired result records at most once an hour per Space and
process, at most 64 files, and only among the first 512 directory entries —
which, with hash-named files, may all be fresh. A browser stores a record per
edit, so the directory grew without bound.

Each stored result now leaves an empty marker under expiry/<day>/. Every
write that stores a result removes up to 64 results of the oldest day that is
wholly past the 14-day window: every entry read is one removed, results/ is
never listed, and the per-write cost is one listing of expiry/ (one entry per
day). A record stays replayable for at least 14 days and at most one day
more.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ncipal

Presence entries were keyed by a page id the page chooses, on read-access
routes. Any reader could overwrite another page's label, pointer or
selection, evict it with presence/leave, use up its rate window, fill the 32
places, and report up to 200 editingNodeIds so that every other page showed
those nodes read-only. The page id echoed as originPageId could likewise be
quoted by another principal to make a page skip a save it had not seen.

- An entry is keyed by (principalId, pageId); report, leave and stream
  close reach only the caller's own entries.
- Another principal sees a page under a server-assigned id and with the
  identity provider's name; displayName is gone from the report schema.
- editingNodeIds is taken only from a caller with write access.
- At most 16 pages and 120 reports/s per principal and Space.
- originPageId is passed on only to streams of the saving principal.
- One canvasPageIdSchema for originator.tabId, the PUT pageId, presence and
  the stream query.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…tial

The canvas execute route trusted originator.source from the body, refused
only 'system', checked commands by type name alone and ran the body revision
check only for 'agent' — so any caller could say 'ui' and overwrite a body
with MERGE_NODE_DATA or a RESTORE_NODES replace, and a malformed ui command
ended in a TypeError and a 500. Scope was enforced in five places.

- admitExecuteRequest decides once, before the engine: a request made with
  an agent or machine credential cannot be 'ui' (403); every command is
  checked against the shape of its type (400 INVALID_COMMAND); a ui
  MERGE_NODE_DATA may not set or unset a body key and a ui RESTORE_NODES
  replace must keep the body (400 UI_BODY_WRITE).
- isAllowedFor(source, command) in the engine is the one rule for which
  commands a source may issue; the four per-handler source checks are gone
  and every UI-only type is out of scope for an agent.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…t they do

No behaviour change.

Removed: BrowserSync.isBusy / whenQuiet and their waiters; commitNodeMetadata
(test-only callers) with the two tests of it; InFlightSet.has; the exports of
discardUnsentCanvasEdits, drainNodePreprocessing and unitsOf; originator.userId;
the INSERT_SAVE_RESULT alias; the contentRevisionOf wrapper.

Renamed: _setStateNoAutosave -> _setStateRaw, autoSaveMiddleware ->
contentSaveMiddleware, hasUnsavedStructureOrContent -> hasUnsavedContent,
applyDeltasFromAgent -> applyServerDeltas.

Comments and docs that described removed designs (structure autosave, the
whole-Space PUT, M2/M3/P2 notes, docs/node-content-api-split.md, schema
v4/v6, the content PUT advancing stamps) now describe what is there.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Brings in select all, cut, per-Space Preview state and PDF undo (microsoft#410)
and the first-turn model fix (microsoft#411).

Conflicts:

- canvasStore.ts: the branch's imports and content-queue wiring are kept
  (no structure scheduler, no `retryStructure`). Main's rule for a
  restored PDF or video — derive the server-only data again, at once —
  moves to where a restore is answered under this branch: `sendRestore`
  asks for it per node the server took back, and the content queue's
  `onRestoredContentPersisted` (Agent Nodes) uses the same helper.
  Cut needs no change: it ends in the `DELETE_NODES` intent, which is a
  command batch through the send queue.
- nodeContentFields.ts: both additions kept (`withContentPatch`,
  `SERVER_DERIVED_SIDECAR_NODE_TYPES`).
- canvasStore.restorePersistence.test.ts: the branch's file is kept;
  main's two new cases are ported to observe the restoring `execute`
  batch instead of a content PUT, plus one for a refused restore.
- canvasStore.spaceOwnership.test.ts: main's cut cases use
  `_setStateRaw` and observe the deleting and restoring batches and the
  fake server instead of `waitForDeletes`.

Main added no SQL migration and no command type.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…to the page

A load leaves a PDF's extracted text out, but a node-scoped content
fetch (another page's save, preprocessing, the catch-up after connecting)
adopted it, so whether a page held the text depended on which events it
had seen. A page that held it also put it on the clipboard and into the
batch that restores a cut or deleted PDF, and the server then never
derived the text again as main's PDF undo intends.

A fetch now gives a body only to types a load gives one to; a page that
already holds a PDF body keeps following the server's.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Two browser contexts with real keyboard, mouse and clipboard: a cut on
one page empties the other, a paste arrives there with bodies, edge and
Frame child, undoing brings the originals back with bodies and edges,
and a cut PDF with its Note returns linked, with the Note's text and the
PDF's text extracted again. The receiving page never reloads, loads the
Space again or gains an undo entry.

Documents cut, paste and the restore of server-derived data in
canvas-realtime-sync.md.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Dropping a multi-selection into a Column or Row Frame inserted each node
into the reading order by its own coordinate, so established members
whose coordinate fell between two dragged nodes ended up interleaved
with them.

Nodes dragged together now enter each track as one contiguous block at
the leading member's coordinate, keeping their relative order. This
applies to a drop into another Frame and to a move inside one. A drag
that leaves every member at its existing ordinal changes nothing, so a
small nudge of a non-adjacent selection does not gather it.

The live drop preview and the committed drop now derive the order from
one solve (`solveMasonryPlacement`) over the full set of dragged nodes,
and the preview draws a footprint per dragged node. Previously the
preview treated only the grabbed node as moved, so its footprint could
differ from where a multi-selection landed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@cxxxxxn
cxxxxxn (cxxxxxn) marked this pull request as ready for review November 19, 2026 09:49
Copilot AI balanced review requested due to automatic review settings November 19, 2026 09:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Legacy Column/Row Frames without layoutOrder can incorrectly reorder selected nodes during a nudge because the comparison lacks a geometry-derived baseline, and this case needs a regression test.

1 open issue
What changed in this PR

This PR builds on #386’s Frame reading-order support to keep nodes dragged together adjacent within Column/Row tracks. The targeted commit is e0e4e9cb4; the supplied diff also contains inherited synchronization and persistence changes from #386.

Changes:

  • Inserts multi-node drags as contiguous blocks within each destination track, including moves inside a Frame.
  • Adds no-op nudge handling and shares placement calculations between preview and commit.
  • Adds unit and browser coverage for cross-Frame drops, same-Frame moves, and nudges.
File Description
space-kits/​issue-tracker-setup/​tests/​rfs.integration.test.mjs Authenticates request-ID integration tests.
packages/​shared/​src/​utils/​node-label.ts Shares label-protection rules.
packages/​shared/​src/​utils/​conversation-title.ts Shares title ownership and precedence.
packages/​shared/​src/​utils/​basis.ts Encodes and parses read versions.
packages/​shared/​src/​utils/​basis.test.ts Tests read-version validation.
packages/​shared/​src/​utils/​agent-node-transition.ts Guards Agent node projections.
packages/​shared/​src/​types/​canvas/​node.ts Adds reading-order and measurement fields.
packages/​shared/​src/​types/​canvas/​index.ts Exports new canvas types.
packages/​shared/​src/​types/​canvas/​execution.ts Adds stale-target failure reasons.
packages/​shared/​src/​types/​api/​space-operations.test.ts Tests versioned operation contracts.
packages/​shared/​src/​types/​api/​rfs.ts Defines upload and reliable-execute contracts.
packages/​shared/​src/​types/​api/​ink-sigil.test.ts Moves validation tests off removed PUT.
packages/​shared/​src/​types/​api/​index.ts Exports layout and presence contracts.
packages/​shared/​src/​types/​api/​frame-layout.ts Defines structured Frame layout schemas.
packages/​shared/​src/​types/​api/​common.ts Updates error-contract documentation examples.
packages/​shared/​src/​types/​api/​canvas-presence-limits.ts Shares presence limits and timings.
packages/​shared/​src/​types/​api/​agent-node.ts Updates editable-node and projection schemas.
packages/​shared/​src/​index.ts Exports shared synchronization helpers.
packages/​shared/​src/​canvas-engine/​height/​index.ts Exports renderer measurement helpers.
packages/​shared/​src/​canvas-engine/​height/​freshness.ts Validates renderer measurement freshness.
packages/​shared/​src/​canvas-engine/​diff.ts Optionally emits sibling-order events.
packages/​shared/​src/​canvas-engine/​container/​zorder.ts Materializes rendered forest order.
packages/​shared/​src/​canvas-engine/​container/​index.ts Exports forest-order helper.
packages/​shared/​src/​canvas-engine/​commandScope.ts Centralizes command-source restrictions.
packages/​shared/​src/​canvas-engine/​commands/​setNodeParent.ts Validates reparents and preserves sibling order.
packages/​shared/​src/​canvas-engine/​commands/​setNodeGeometry.ts Updates reading order after position changes.
packages/​shared/​src/​canvas-engine/​commands/​initializePdfNote.ts Supports page-provided Note IDs.
packages/​shared/​src/​canvas-engine/​commands/​index.ts Registers restoration and measurement commands.
packages/​shared/​src/​canvas-engine/​commands/​dissolveFrame.ts Removes obsolete autosave wording.
packages/​shared/​src/​canvas-engine/​agentNodeOwnership.test.ts Updates editable-data contract tests.
packages/​shared/​src/​canvas-engine/​__tests__/​change.test.ts Tests sibling-order inversion.
docs/​proposals/​node-write-unification-plan.md Clarifies revision co-delivery guarantees.
docs/​proposals/​node-height-ownership-model.md Records revised collaboration measurement design.
docs/​proposals/​agent-node-fsm.md Updates documented sync method name.
docs/​proposals/​agent-node-freshness-cas-plan.md Documents server-issued revision baselines.
docs/​architecture/​space-preview.md Removes structural PUT documentation.
docs/​architecture/​question-node.md Documents lifecycle leases and storage terminology.
docs/​architecture/​note-node.md Documents cross-page content and editing locks.
docs/​architecture/​node-auto-height.md Documents synchronized measurement commands.
docs/​architecture/​agent-reachback.md Documents reliable execute and upload safeguards.
apps/​web/​src/​store/​conversationPreparation.test.ts Updates raw-state test setup.
apps/​web/​src/​store/​conversationOwner.ts Replays server deltas with content revisions.
apps/​web/​src/​store/​canvasStore/​sync/​testing/​contentRevisions.ts Models server revisions in sync tests.
apps/​web/​src/​store/​canvasStore/​sync/​syncStatus.ts Derives user-facing send status.
apps/​web/​src/​store/​canvasStore/​sync/​pageId.ts Creates a shared page identity.
apps/​web/​src/​store/​canvasStore/​sync/​__tests__/​syncStatus.test.ts Tests send-status transitions.
apps/​web/​src/​store/​canvasStore/​siblingOrderReplay.ts Replays server sibling order defensively.
apps/​web/​src/​store/​canvasStore/​save/​unloadFlush.test.ts Tests unsent-edit unload handling.
apps/​web/​src/​store/​canvasStore/​save/​structureSaveReconciliation.ts Removes legacy save reconciliation.
apps/​web/​src/​store/​canvasStore/​save/​eventBuffer.ts Documents send-queue event flushing.
apps/​web/​src/​store/​canvasStore/​save/​__tests__/​structureSaveReconciliation.test.ts Removes obsolete reconciliation tests.
apps/​web/​src/​store/​canvasStore/​save/​__tests__/​preprocessQueue.restore.test.ts Updates raw-state mock.
apps/​web/​src/​store/​canvasStore.signOutSave.test.ts Removes legacy structure-save setup.
apps/​web/​src/​store/​canvasStore.questionCardScale.test.ts Updates state setup for command-based saving.
apps/​web/​src/​store/​canvasStore.previewLifecycle.test.ts Updates raw-state test setup.
apps/​web/​src/​store/​canvasStore.postCreateEditing.test.ts Updates raw-state test setup.
apps/​web/​src/​store/​canvasStore.noteHeight.test.ts Removes obsolete save-state fields.
apps/​web/​src/​store/​canvasPresence/​localEditing.ts Detects editing that should defer reloads.
apps/​web/​src/​store/​canvasPresence/​localEditing.test.ts Tests editing detection boundaries.
apps/​web/​src/​store/​canvasPresence/​deviceLabel.ts Generates device presence labels.
apps/​web/​src/​store/​canvasPresence/​deviceLabel.test.ts Tests browser and device labels.
apps/​web/​src/​store/​canvasHistoryManager.test.ts Tests remote-content preservation through undo.
apps/​web/​src/​pages/​CanvasPage/​CanvasPage.tsx Removes legacy conflict-toast cleanup.
apps/​web/​src/​pages/​CanvasPage/​CanvasPage.deepLink.test.tsx Updates loading and raw-state fixtures.
apps/​web/​src/​i18n/​resources/​zh-CN/​common.json Adds Chinese sync and presence messages.
apps/​web/​src/​i18n/​resources/​en/​common.json Adds English sync and presence messages.
apps/​web/​src/​hooks/​useSketchStrokeMove.test.tsx Updates raw-state test setup.
apps/​web/​src/​hooks/​useSketchHoverRouting.test.tsx Updates raw-state test setup.
apps/​web/​src/​hooks/​useDesktopContent.test.tsx Updates desktop save mocks.
apps/​web/​src/​hooks/​useActivelyViewingQuestion.test.ts Updates raw-state test setup.
apps/​web/​src/​handler/​canvasPointerRecognizers/​viewportNavigation.test.ts Updates raw-state test setup.
apps/​web/​src/​handler/​canvasCommand/​utils/​frameLayout.ts Emits Frame reading-order patches during relayout.
apps/​web/​src/​handler/​canvasCommand/​uiIntent.ts Reports invalid reorder selections.
apps/​web/​src/​handler/​canvasCommand/​resolvers/​resolvePasteClipboard.ts Remaps copied Frame reading lists.
apps/​web/​src/​handler/​canvasCommand/​resolvers/​resolveNodeDragStop.ts Solves grouped reading order before reflow.
apps/​web/​src/​handler/​canvasCommand/​resolvers/​__tests__/​resolveReorderNodesRelative.test.ts Tests reorder admission and rejection.
apps/​web/​src/​handler/​canvasCommand/​resolvers/​__tests__/​resolveNodeDragStop.masonry.test.ts Asserts committed masonry reading order.
apps/​web/​src/​handler/​canvasCommand/​__tests__/​postEffects.web.test.ts Updates post-effect test arguments.
apps/​web/​src/​components/​Space/​SpaceDeletionDialog.test.tsx Updates save-recovery mocks.
apps/​web/​src/​components/​Panels/​ChatPanel/​useNodeMentionTypeahead.test.tsx Updates raw-state test setup.
apps/​web/​src/​components/​Panels/​ChatPanel/​ChatContextSources.test.tsx Updates raw-state test setup.
apps/​web/​src/​components/​Panels/​ChatPanel/​ChangeReviewCard.tsx Uses raw state for temporary previews.
apps/​web/​src/​components/​Panels/​Canvas/​selectionChrome/​SelectionOutline.tsx Supports custom presence outline colors.
apps/​web/​src/​components/​Panels/​Canvas/​presence/​usePresenceLabel.ts Formats localized presence labels.
apps/​web/​src/​components/​Panels/​Canvas/​presence/​CanvasPresenceLayer.tsx Mounts presence reporting and overlays.
apps/​web/​src/​components/​Panels/​Canvas/​MultiSelectResizer.tsx Closes gestures after empty resize commits.
apps/​web/​src/​components/​Panels/​Canvas/​MultiSelectResizer.test.ts Adds gesture-closure mock.
apps/​web/​src/​components/​Panels/​Canvas/​MoveSelectionPopover.test.tsx Removes legacy save-state dependency.
apps/​web/​src/​components/​Panels/​Canvas/​Canvas.tsx Mounts presence; clarifies viewport persistence.
apps/​web/​src/​components/​Nodes/​text/​TextNode.tsx Checks remote editing before entry.
apps/​web/​src/​components/​Nodes/​spacePreview/​SpacePreviewNode.test.tsx Updates raw-state mocks and assertions.
apps/​web/​src/​components/​Nodes/​question/​QuestionNode.tsx Guards title editing with presence locks.
apps/​web/​src/​components/​Nodes/​question/​questionCompose.ts Applies confirmed identity through raw state.
apps/​web/​src/​components/​Nodes/​question/​questionCompose.test.ts Updates raw-state test setup.
apps/​web/​src/​components/​Nodes/​note/​NoteNode.tsx Blocks appends during remote editing.
apps/​web/​src/​components/​Nodes/​NodeWrapper.tsx Ensures resize gestures close.
apps/​web/​src/​components/​Nodes/​NodeWrapper.test.tsx Adds gesture-closure mock.
apps/​web/​src/​components/​Nodes/​frame/​FrameNode.tsx Guards Frame title editing.
apps/​web/​src/​api/​canvasSync.ts Adds page identity and content catch-up.
apps/​web/​src/​api/​canvasPresence.ts Sends best-effort presence reports.
apps/​web/​src/​api/​_routes.ts Adds presence and content-change routes.
apps/​web/​e2e/​space-shortcut.spec.ts Uses dedicated title endpoint.
apps/​web/​e2e/​space-save-navigation.spec.ts Tests execute-based structure-save failures.
apps/​web/​e2e/​preview-tab-drag.spec.ts Updates raw-state fixture setup.
apps/​web/​e2e/​fixtures/​ink-toolbar.tsx Updates raw-state fixture setup.
apps/​web/​e2e/​fixtures/​ink-sigil-rendering.ts Updates raw-state fixture setup.
apps/​web/​e2e/​chat-queue.spec.ts Updates raw-state fixture setup.
apps/​web/​e2e/​chat-node-mentions.spec.ts Updates raw-state fixture setup.
apps/​web/​e2e/​chat-context-sources.spec.ts Updates raw-state fixture setup.
apps/​server/​src/​utils/​json.ts Shares JSON validation and canonical hashing.
apps/​server/​src/​modules/​workspace/​legacy-workspace-activation.test.ts Seeds topology through execute.
apps/​server/​src/​modules/​storage/​storage.ts Exposes reliable-save storage capability.
apps/​server/​src/​modules/​storage/​ports/​contracts/​blob-store.contract.ts Tests disposable blob-copy isolation.
apps/​server/​src/​modules/​storage/​ports/​blob.ts Documents disposable materialization leases.
apps/​server/​src/​modules/​storage/​backends/​sqlite/​structured-store.ts Wires SQLite reliable-save support.
apps/​server/​src/​modules/​storage/​backends/​sqlite/​space-save.crash-fixture.ts Exercises save transaction crash points.
apps/​server/​src/​modules/​storage/​backends/​sqlite/​schema.ts Adds save records and change tracking.
apps/​server/​src/​modules/​storage/​backends/​sqlite/​contracts.test.ts Tests node storage across reopen.
apps/​server/​src/​modules/​storage/​backends/​sql/​node-rules.ts Defines persistent content-change positions.
apps/​server/​src/​modules/​storage/​backends/​sql/​log-rules.ts Shares Review-record merge logic.
apps/​server/​src/​modules/​storage/​backends/​sql/​codecs.ts Reuses shared JSON serialization.
apps/​server/​src/​modules/​storage/​backends/​postgres/​structured-store.ts Wires PostgreSQL reliable-save support.
apps/​server/​src/​modules/​storage/​backends/​postgres/​schema.ts Adds save records and change tracking.
apps/​server/​src/​modules/​storage/​backends/​disk/​structured-store.ts Wires Disk save and recovery support.
apps/​server/​src/​modules/​storage/​backends/​disk/​space-save.crash-fixture.ts Exercises Disk save crash points.
apps/​server/​src/​modules/​storage/​backends/​disk/​space-import.ts Clears imported reliable-save history.
apps/​server/​src/​modules/​storage/​backends/​disk/​legacy/​canvas-store.ts Reads sidecar modification times.
apps/​server/​src/​modules/​storage/​backends/​disk/​layout.ts Defines reliable-save storage paths.
apps/​server/​src/​modules/​storage/​backends/​disk/​blob-store.ts Safely resolves and copies blobs.
apps/​server/​src/​modules/​storage/​backends/​blob/​materialization.ts Shares disposable blob materialization.
apps/​server/​src/​modules/​storage/​backends/​azure/​blob-store.ts Reuses shared blob materialization.
apps/​server/​src/​modules/​security/​space-access.test.ts Tests execute-route access controls.
apps/​server/​src/​modules/​remote_fs/​space-capabilities.ts Advertises layout and request-ID capabilities.
apps/​server/​src/​modules/​remote_fs/​node-meta.ts Attaches read versions to downloads.
apps/​server/​src/​modules/​remote_fs/​node-meta.test.ts Tests read-version response headers.
apps/​server/​src/​modules/​preprocessing/​video-cover.test.ts Mocks Workspace operation leases.
apps/​server/​src/​modules/​preprocessing/​stages/​enrich.ts Enables Office text enrichment.
apps/​server/​src/​modules/​preprocessing/​loaders/​youtube.loader.ts Loads service provisioning lazily.
apps/​server/​src/​modules/​preprocessing/​label-policy.ts Reuses shared label-protection policy.
apps/​server/​src/​modules/​preprocessing/​dispatcher.ts Leases and scopes preprocessing by Workspace.
apps/​server/​src/​modules/​identity/​request.ts Tracks machine-authenticated requests.
apps/​server/​src/​modules/​identity/​multi-user.scenarios.ts Updates execute and title access scenarios.
apps/​server/​src/​modules/​identity/​http.ts Marks Agent credential authentication.
apps/​server/​src/​modules/​canvas/​world-preview-policy.ts Guards target removal through unset patches.
apps/​server/​src/​modules/​canvas/​space-query.ts Includes read versions in query responses.
apps/​server/​src/​modules/​canvas/​space-move-plan.ts Remaps moved Frame reading lists.
apps/​server/​src/​modules/​canvas/​space-move-plan.test.ts Tests reading-order preservation across Spaces.
apps/​server/​src/​modules/​canvas/​space-card.route.ts Broadcasts title changes as versioned updates.
apps/​server/​src/​modules/​canvas/​portable-reads.e2e.test.ts Tests command-owned node deletion.
apps/​server/​src/​modules/​canvas/​node-prompt.test.ts Verifies body-only revision semantics.
apps/​server/​src/​modules/​canvas/​import-space-identity.ts Remaps imported reading-order IDs.
apps/​server/​src/​modules/​canvas/​import-space-contracts.ts Extends command and order-event remapping.
apps/​server/​src/​modules/​canvas/​import-space-contracts.test.ts Tests layout placement remapping.
apps/​server/​src/​modules/​canvas/​canvas-sync.ts Carries authenticated event-origin context.
apps/​server/​src/​modules/​canvas/​canvas-sync.test.ts Tests transient invalidation delivery.
apps/​server/​src/​modules/​canvas/​canvas-spatial.ts Exposes structured Frame layouts in inspection.
apps/​server/​src/​modules/​canvas/​caller-principal.ts Scopes content-save echoes by principal.
apps/​server/​src/​modules/​canvas/​agent-node-association.ts Broadcasts stored content revisions.
apps/​server/​src/​modules/​canvas/​agent-command-preparation.ts Limits injected revisions to body rewrites.
apps/​server/​src/​modules/​canvas/​agent-command-preparation.test.ts Tests body-only revision injection.
apps/​server/​src/​modules/​agent/​tools/​handlers/​fs-read.ts Removes separate metadata read tracking.
apps/​server/​src/​modules/​agent/​tools/​handlers/​fs-read.test.ts Tests property edits without body conflicts.
apps/​server/​src/​modules/​agent/​tools/​handlers/​canvas-write.ts Updates body-conflict recovery guidance.
apps/​server/​src/​modules/​agent/​tools/​handlers/​canvas-query.ts Stops inspection from recording body reads.
apps/​server/​src/​modules/​agent/​tools/​executor.ts Removes inspection read-set plumbing.
apps/​server/​src/​modules/​agent/​node-ref.ts Exposes layouts and body-only revisions.
apps/​server/​src/​modules/​agent/​functional-text.ts Cleans up aborted external text tasks.
apps/​server/​src/​modules/​agent/​functional-text.test.ts Updates cancellation cleanup assertions.
apps/​server/​src/​modules/​agent/​conversation-title.service.ts Reuses shared title precedence.
apps/​server/​src/​modules/​agent/​conversation-title.conversion.test.ts Checks broadcast content revisions.
apps/​server/​src/​modules/​agent/​conversation-title-node-store.ts Shares title projection and revision delivery.
apps/​server/​src/​modules/​agent/​conversation-owner.route.ts Refreshes owner presentation after renames.
apps/​server/​src/​modules/​agent/​agent-thread.service.ts Verifies Space ownership of threads.
apps/​server/​src/​modules/​agent/​agent-thread.service.test.ts Tests thread ownership resolution.
apps/​server/​src/​modules/​agent/​agent-node-lifecycle.ts Leases lifecycle transition operations.
apps/​server/​src/​modules/​agent/​agent-node-binding.test.ts Tests binding lease admission and release.
apps/​server/​src/​modules/​agent/​acp/​external-agent-realization.test.ts Adds Workspace lease test dependency.
apps/​server/​src/​app.ts Registers canvas presence routes.

Review effort: Balanced

!individual?.layoutOrder ||
!blockIds ||
blockIds.size < 2 ||
sameLayoutOrder(readLayoutOrder(frame.data), individual.layoutOrder)

This branch has not been deployed

No deployments
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