NEC-324: Obsidian's own canvas stacking reaches the document as a reorder, and two vaults doing it at once keep a conflict copy #316

Merged
nectenda-agent merged 10 commits from worktree-nec-324-obsidians-own-canvas-stacking-reaches-th into main 2026-10-25 00:13:25 +01:00
Collaborator

Task: NEC-324 — https://projectron.nerchure.com/tasks/344

Obsidian 1.14 loads every canvas card after the first group at zIndex -1 and moves each to the top of the stack as it is first drawn, so panning restacked the board and the next edit carried that in as a reorder of every card drawn since: 14 cards for one colour change, and a conflict copy of the whole board when two vaults did it at once (NEC-314's replay). The live binding now places those unplaced cards in the order the view already shows as it binds, and afterwards only the cards a remote draw or an undo brought in, never a card the user has just made. The fake canvas now stacks as Obsidian 1.14 does, the order-keys log line names its caller, and SAFE-A20 and docs/sync-limitations.md say so. Verified: local gate, seed 1584194348 replay with B on 1.13.7, a fresh canvas hardness hour, two fresh-context reviews. Rides along NEC-335, a race in the markdown-links e2e test (FLAKE-21).

Spec: docs/changes/NEC-324-canvas-stacking-not-a-reorder/spec.md

Also fixes NEC-335: markdown-links e2e reads a note's links in a second look after waiting for them, and finds none when the reading view redraws in between

Changelog

Panning across a large canvas no longer restacks its cards in the other vault, or keeps a conflict copy of the board when two vaults are open at once.

Task: NEC-324 — https://projectron.nerchure.com/tasks/344 Obsidian 1.14 loads every canvas card after the first group at zIndex -1 and moves each to the top of the stack as it is first drawn, so panning restacked the board and the next edit carried that in as a reorder of every card drawn since: 14 cards for one colour change, and a conflict copy of the whole board when two vaults did it at once (NEC-314's replay). The live binding now places those unplaced cards in the order the view already shows as it binds, and afterwards only the cards a remote draw or an undo brought in, never a card the user has just made. The fake canvas now stacks as Obsidian 1.14 does, the order-keys log line names its caller, and SAFE-A20 and docs/sync-limitations.md say so. Verified: local gate, seed 1584194348 replay with B on 1.13.7, a fresh canvas hardness hour, two fresh-context reviews. Rides along NEC-335, a race in the markdown-links e2e test (FLAKE-21). Spec: `docs/changes/NEC-324-canvas-stacking-not-a-reorder/spec.md` Also fixes NEC-335: markdown-links e2e reads a note's links in a second look after waiting for them, and finds none when the reading view redraws in between ## Changelog Panning across a large canvas no longer restacks its cards in the other vault, or keeps a conflict copy of the board when two vaults are open at once.
The order log line from NEC-314 carried neither, and a replay's identical
lines 10-70 ms apart could have been one save read in by several paths. The
caller is read from the transaction's origin, so no caller is threaded
through the codec.

Task: NEC-324

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H8jACjv6C3PuXBfr3zHvTd
importData brings a node to the front only while it sits below the one
before it, a group's zIndex is minus its area, and a node's first render
places it only if it is still at -1. Every canvas suite passes on it as it
was.

Task: NEC-324

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H8jACjv6C3PuXBfr3zHvTd
Obsidian loads every card after a canvas's first group at zIndex -1 and
puts each on top as it is first drawn. Panning restacked the board, and the
next edit carried that in as a reorder: 14 of 24 cards' keys for one colour
in a real Obsidian, and a conflict copy nobody's edit caused when two vaults
did it at once. The view's cards are now given the place the view already
shows them in as it binds and after each draw. A card the user brings to the
front still carries, and one the user has just made keeps its place on top.

Task: NEC-324

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H8jACjv6C3PuXBfr3zHvTd
Task: NEC-324

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H8jACjv6C3PuXBfr3zHvTd
Review of NEC-324: settling the whole canvas after a draw could pin a card
the user had just made, which Obsidian saves before drawing, below the
stack; an undo brought deleted cards back unplaced; and settling groups
changed nothing a group's own draw would not. The contract check now first
proves a draw places an unplaced card.

Task: NEC-324

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H8jACjv6C3PuXBfr3zHvTd
Obsidian animates zoomToBbox, so two frames did not draw the card, and the
check could have passed with nothing drawn. It waits on each node's
initialized flag, which its first render sets.

Task: NEC-324

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H8jACjv6C3PuXBfr3zHvTd
Task: NEC-324

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011QWUcTSYZepHx7ojJcipyw
The reading view redrew between the wait that saw both links and a second
call that read them, which found none (FLAKE-21).

Task: NEC-324
Also-fixes: NEC-335

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011QWUcTSYZepHx7ojJcipyw
Task: NEC-324

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011QWUcTSYZepHx7ojJcipyw
Say what NEC-324's caller log and SAFE-A20 cover actually are
All checks were successful
Release note / release-note (pull_request) Successful in 20s
CI / build (pull_request) Successful in 5m38s
CI / e2e (pull_request) Successful in 13m14s
CI / promote (pull_request) Has been skipped
CI / build (push) Successful in 5m39s
CI / e2e (push) Successful in 13m5s
CI / promote (push) Successful in 33s
a45cf93601
Task: NEC-324

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011QWUcTSYZepHx7ojJcipyw
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Nectenda/nectenda!316
No description provided.