feat(canvas): default the spatialCanvas flag on - #934
Merged
Conversation
M7 PR B: the default-on flip. Canvas has been opt-in behind FEATURES_SETTINGS_DEFAULTS.spatialCanvas: false since M0; the M7 rollout gates are merged (split-view note lock, canvas_created/canvas_opened telemetry, X-Memry-Sync-Types negotiation, canvas user guide), so new installs now get the Canvases sidebar section and a Settings > Features toggle that already reads On. Backward compatible by construction: readGroupSettings merges the stored blob over the defaults, so an install that persisted spatialCanvas: false keeps it off. Rollback is the one-line default plus the two test expectations.
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
The CANVASES section was unreachable in these two suites while the flag defaulted off, so their window.api fakes never needed the canvas event APIs. With the flag on, SidebarCanvasList mounts and subscribes, and the bare fakes throw 'window.api.onCanvasCreated is not a function'. Preload does expose all three (preload/generated-rpc.ts:39-41), so this is a test-fake gap, not a runtime one. Mocked the same way as the tag and bookmark lists — a heavy child with its own sibling coverage in sidebar-canvas-list.test.ts.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Flipping the default alone does not reach every install. writeGroupSettings persists the whole 'features' group, so a user who toggled any other feature also wrote spatialCanvas: false to disk without ever deciding about canvas — and the stored value wins over the default. Those installs would silently miss the surface this release announces. promoteSpatialCanvas runs once per vault at open, rewriting only that collateral false. It is not a re-enable loop: the marker key is written on the first run whatever the outcome, so an opt-out made after the promotion survives every later open. Fresh vaults, blobs without the key, and corrupt blobs are all left alone — they already read as on through the defaults merge. Lives in its own module so settings/features.ts stays read-only by design, and so the whole pass is one file to delete once the flip is well past.
h4yfans
marked this pull request as ready for review
August 3, 2026 17:00
h4yfans
added a commit
that referenced
this pull request
Aug 5, 2026
The spec asserted the sidebar section was absent "flag off (default)", but #934 defaulted spatialCanvas ON and made it a real FEATURE_KEYS toggle, so the section was there and the assertion could never hold. Turn the flag off explicitly before asserting the gate — the same shape the sibling test already uses — and raise the timeout for the extra reload.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
FEATURES_SETTINGS_DEFAULTS.spatialCanvastotrue, so a fresh install gets the Canvases sidebar section and a Settings → Features → Canvas toggle that already reads On.promoteSpatialCanvas, a one-time per-vault pass at vault open that clears a collateralspatialCanvas: falseleft by pre-M7 writes.SidebarCanvasList, which mounts for the first time under the on-by-default flag.Why
M7 PR B — the default-on flip, per
docs/superpowers/specs/2026-07-22-spatial-canvas-m7-rollout-design.md§7. Its prerequisites are onmain: the split-view note lock,canvas_created/canvas_openedtelemetry,X-Memry-Sync-Typesnegotiation, and the canvas user guide.The default alone does not reach every install.
writeGroupSettingspersists the wholefeaturesgroup, so a user who toggled any other feature also wrotespatialCanvas: falseto disk without ever deciding about canvas, and the stored value wins over the default. §8 of the design reads that as a deliberate opt-out; the mechanism cannot tell it apart from "turned Journal off once". The promotion pass rewrites only that case, marks the vault, and never runs again — so an opt-out made after this release survives.Rollback: the one-line default plus its two test expectations; the promotion module and its
vault/index.tscall are one file and one line to delete.