Commit Graph
13 Commits
Author SHA1 Message Date
zsviczian 593ad99bab Merge PR #2959 with mount lifecycle fixes and 2.29.0 release note 2026-10-03 13:10:05 +02:00
askalf 921f679f0b keep the mount plan checks runnable against the factory on master
master now builds the factory's Canvas leaf directly and inserts it into the
detached split, instead of calling workspace.createLeafInParent(). The check
script's stand-in WorkspaceSplit gains insertChild, and the fake workspace
drops the createLeafInParent it no longer needs. All 21 mount plan checks and
the call site checks pass on the merged tree.
2026-09-28 19:47:24 +00:00
askalf 0d5a809372 simplify mount check wording 2026-09-25 17:32:29 +00:00
askalf 496d451914 Simplify embeddable mount check wording 2026-09-25 16:55:21 +00:00
askalf f25a7ba08b simplify embeddable mount checks 2026-09-25 16:18:24 +00:00
askalf eb284a1c85 bound the injected poll delay so a wait that never ends fails the block 2026-09-25 05:26:48 +00:00
askalf 6e3c8d7468 fold the factory lifecycle checks into the mount plan script
Events that used to be sequenced with timers now land on a named poll of the
wait, through the injected delay, so each block asserts the poll it ended on
rather than an elapsed time. The one block whose subject is elapsed time, the
slow real factory, still runs against the clock.
2026-09-25 05:23:09 +00:00
askalf f96cbc53ff keep the clock in the two cap blocks whose subject is elapsed time
Counting reads made the cap blocks stop discriminating: the cap is a
wall-clock quantity, so readiness has to land after real elapsed time for
its expiry to be the thing under test. Both are green at base again without
them.
2026-09-22 12:09:04 +00:00
askalf dbc9476202 fold the mount checks into the repository's check-script idiom
The mount-plan checks had grown a case per scenario with narrated assertion
labels, so the three scripts read as a patch history rather than as a
description of the behaviour. Table the cases that share a shape, name each
block for what it pins, and run them through the same per-block runner the
lifecycle checks already use, so an arm that reintroduces one defect reports
every block it breaks instead of stopping at the first.

Sequencing by wall clock goes with it: the hosts now ready, give up or
cancel on a counted read, which is what the poll loop actually observes.
Only the two blocks whose subject is elapsed time still use timers. Drop the
helper JSDoc, the issue numbers the squashed commit will carry anyway, and
the comments arguing the implementation is correct rather than recording the
contract.
2026-09-22 12:05:10 +00:00
askalf a18fd81133 pin the lifecycle wait and the per-dispatch cancellation latch
Seven discriminating checks and three controls for the lifecycle wait and
the superseded-mount latch, plus call-site assertions requiring the
dispatch to consult this invocation's own cancellation flag and the
cleanup to raise it before its early returns.
2026-09-21 01:48:41 +00:00
askalf d38510fad7 wait for the canvas node factory's lifecycle instead of a fixed timeout
A subpath embed fell back to a whole-file workspace leaf whenever the
factory took longer than the two second cap to initialize. Startup can
legitimately outlast it: layout ready polls up to 50 x 50 ms before
initialize() is called, and initialize() then awaits the core canvas
plugin's load, so the cap cannot tell a slow start from one that will
never finish. CanvasNodeFactory now exposes whenInitialized, settled on
every terminal path, and the wait uses it; the cap remains only for a
host that reports no lifecycle.

Cancellation also latches per dispatch, so a mount superseded by a link
change cannot mount over its replacement once the shared refs are
repopulated.
2026-09-21 01:42:31 +00:00
askalf b48112e4ca pin the mount dispatch against a readiness gate and cover zero/nullish waits
The call-site check accepted a dispatch re-gated on
view.canvasNodeFactory.isInitialized(), which skips the wait inside
mountEmbeddableHost and restores the whole-file workspace leaf while both
check scripts stayed green. Require the dispatch to be reached
unconditionally.

Also pin the boundaries the existing rows only reached by argument: a zero
timeout, an undefined subpath, a null extension, a factory that never
appears or is torn down mid-wait, the synchrony of both fast paths, a
teardown landing as the factory readies, and concurrent embeddables.
2026-09-20 13:34:16 +00:00
askalf 9e69f245b5 move the mount-plan check to the repository's script convention
The first version of the regression test used node:test inside src/, which
the repository's own lint rejects there: src/ is runtime code that must work
on mobile and in popout windows, so node built-ins and bare timers are
banned. Follow scripts/check-*.mjs instead - jiti-imported TypeScript with
node:assert, outside the linted source tree - and inject the wait primitive
so the module can still default to Obsidian's sleep global.
2026-09-20 11:30:58 +00:00