The pane-local PostsPaneView .task(id: home) unmounted with the Posts
pane, leaving watchedHome stale after a Settings Home repoint while the
Archive pane and every root sheet (import / new project / convert) kept
writing through it. The bind now rides the WorkspaceView root task:
first frame + every repoint, whichever pane is showing. Comments and
the Museion/AGENTS.md bullet name the one writer honestly.
Follow-up to #179 (5bf0955) from the PR #185 finish-audit; PR #185
closed as superseded — two complete implementations of the same ticket,
main's stack carries six commits on top. Suite 681/681, lint parity.
2.4 KiB
PostsModel bind rides the WorkspaceView root task — #179 follow-up
Date: 2026-11-10 Type: follow-up fix Reference: #179 (landed as
5bf0955); supersedes/closes PR #185
Goal
The #179 finish-audit (run on PR #185) found one real bug that also lived in main's landed implementation: the model bind rode PostsPaneView.task(id: home), which unmounts with the Posts pane — after a Settings Home repoint, the Archive pane and every root sheet (import / new project / convert) kept writing through the stale watchedHome until Posts remounted. Port that single fix to main's performWrite rail.
Context — the duplicate implementation
PR #185 (fix/postsmodel-write-rail, opened 04:14) and main's 5bf0955 (08:45) turned out to be two complete, independent #179 implementations (three named railWrite entries + boundHome vs single performWrite seam + watchedHome). 5bf0955 closed the issue and carries six stacked commits (#180–#184). A merge attempt auto-resolved every Swift file — a semantic collision git cannot see — so per owner decision PR #185 is closed as superseded and the audit findings that still apply to main were ported here instead.
What Was Done
- Bind hoisted —
PostsPaneView's pane-local.task(id: home)removed;WorkspaceViewgains the root.task(id: gate.museionHome) { gate.posts.bind(home: gate.museionHome) }: first frame + every repoint, whichever pane is showing. Stacks cleanly with the rail's existing mid-pass repoint refusal (that guards the pass advance's minutes-long turn; this closes the global window). - Comments corrected —
watchedHome's doc,bind's doc, and theMuseion/AGENTS.mdPostsModel bullet no longer claim "construction + the Settings repoint" as two writers; they name the one root task.
Not ported (already resolved differently on main): dead home: sheet params (5bf0955 cut them), failure observability (main's five pins + sheet-AND-strip createProject routing cover it).
Verification
- Full unit suite on this branch:
test-without-building -only-testing:MuseionTests→ executed 681 / passed 681 / failed 0 / skipped 0. - swiftformat 0 dirty on the touched files; swiftlint 279 violations / 60 serious in 141 files — identical to main's pre-change baseline.
- Unpinned delta: the hoist is view wiring (no render harness for WorkspaceView) — verified by build + suite; the bind seam itself is model-level and pinned by the nil-Home refusal pin.