Fix 404 from wallpaper Sort By when a synthetic tile is on the desktop - #370
Merged
AllTerrainDeveloper merged 1 commit intoJul 18, 2026
Merged
Conversation
relayoutRoot() PATCHed every root placement's new position to the files REST API, including synthetic tiles (dock-item promotions, Spatial-layout core icons) that only live in the JS store and carry a deterministic negative id. PATCHing a negative id doesn't match the REST route's \d+ pattern and 404s. Reuse the isSyntheticPlacement() guard already used by the drag path in desktop-files/layer.ts to skip the REST call for those tiles.
AllTerrainDeveloper
enabled auto-merge (squash)
July 18, 2026 22:42
AllTerrainDeveloper
deleted the
fix/wallpaper-sort-by-synthetic-placement-404
branch
July 18, 2026 22:44
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.
Summary
relayoutRoot()insrc/desktop.tsre-tiles every placement in the root folder and PATCHes each one's new position via the files REST API. Synthetic tiles only live in the JS store (settings/desktop-shortcuts-sync.ts) and are minted with a deterministic negative id, which doesn't match the REST route's\d+id pattern — confirmed via the access log:PATCH /wp-json/desktop-mode/v1/files/placements/-1690305366 → 404.isSyntheticPlacement()guard insrc/desktop-files/layer.ts. Exported that helper and reused it to gate the same REST call inrelayoutRoot, which also covers Clean Up and the auto-arrange resize path since they share the function.Test plan
npm run buildnpm run lintnpm run typechecknpm run test:js(2051 tests passing)🤖 Generated with Claude Code