The brand boards, and only the brand boards - #14
Merged
Conversation
The picker offered the fourteen RoleModel boards followed by eighteen stock gradients. This is a branded build, and a picker where an off-brand background is one click away is one where a video eventually ships with one. Removing the files was not the whole job. The list was never a directory listing: `WALLPAPER_COUNT = 18` and a naming convention synthesised the stock paths, which is why the RoleModel set never appeared in the picker however many times the branding was redone. So the count and the synthesis go, and `WALLPAPER_PATHS` is the brand set — which `projectPersistence` already keys its canonical set off, so that is also what decides which wallpapers a saved project may name. Two bugs surfaced on the way, both of which the removal turns from latent into live. **The legacy path rewriter could not see the brand boards at all.** It matched `wallpaper\d+\.jpg` and nothing else, so a packaged project whose wallpaper was one of ours came back as an unrewritten `file://` URL pointing at the machine it was saved on. That was already wrong; with the brand set now the only set, it was every packaged project. The tail allows one directory segment, still `.jpg`, so it cannot walk anywhere. **A bundled path that is no longer bundled now falls back.** Only `file://` URLs were checked against the canonical set, so an already-relative `/wallpapers/…` passed through whatever it named — harmless while the bundled set only grew, and not harmless now: every project that used a stock gradient names a file that is not there. Passing it through puts a broken image behind somebody's recording instead of a board. Scoped to `/wallpapers/`, so a data: URI or a user's own `file://` path is still left exactly as it is. Existing projects that named a stock gradient open on `DEFAULT_WALLPAPER`, which is index 0, which is now a brand board. That is the intended migration and the only visible effect. **986 tests pass** across 64 files. The four that asserted the stock run is canonical were pointed at brand boards — they were always testing path rewriting, not which wallpapers exist — and one was added for the fallback. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The picker offered the fourteen RoleModel boards followed by eighteen stock
gradients. This is a branded build, and a picker where an off-brand background is
one click away is one where a video eventually ships with one.
Removing the files was not the whole job. The list was never a directory listing:
WALLPAPER_COUNT = 18and a naming convention synthesised the stock paths, whichis why the RoleModel set never appeared in the picker however many times the
branding was redone. So the count and the synthesis go, and
WALLPAPER_PATHSisthe brand set — which
projectPersistencealready keys its canonical set off, sothat is also what decides which wallpapers a saved project may name.
Two bugs the removal turns from latent into live
The legacy path rewriter could not see the brand boards at all. It matched
wallpaper\d+\.jpgand nothing else, so a packaged project whose wallpaper wasone of ours came back as an unrewritten
file://URL pointing at the machine itwas saved on. That was already wrong; with the brand set now the only set, it was
every packaged project. The tail allows one directory segment, still
.jpg, so itcannot walk anywhere.
A bundled path that is no longer bundled now falls back. Only
file://URLswere checked against the canonical set, so an already-relative
/wallpapers/…passed through whatever it named — harmless while the bundled set only grew, and
not harmless now: every project that used a stock gradient names a file that is
not there. Passing it through puts a broken image behind somebody's recording
instead of a board. Scoped to
/wallpapers/, so a data: URI or a user's ownfile://path is still left exactly as it is.Migration
Existing projects that named a stock gradient open on
DEFAULT_WALLPAPER, whichis index 0, which is now a brand board. That is the intended migration and the
only visible effect.
Verification
986 tests pass across 64 files. The four that asserted the stock run is
canonical were pointed at brand boards — they were always testing path rewriting,
not which wallpapers exist — and one was added for the fallback.