From 9c201c60a727106f1e3bf8c2af5f86aa7427098f Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Mon, 7 Sep 2026 19:16:08 +0900 Subject: feat(workspaces): sync the home tile layout per device orientation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Win8-Start home grid's arrangement now syncs from the backend's home-tile-layout plugin: ONE shared document per device orientation (wide = landscape/desktop, tall = portrait/mobile) — every landscape device renders the same layout, every portrait device the same other one. localStorage persistence is retired (no migration — devices start from the shared document; the first arrangement creates it). - adapter/tile-layout-http.ts: the injected HTTP edge (GET/PUT/DELETE /home/tile-layout/:mode), the features/layout adapter's pattern - tile-layout-store: server-backed, keyed by geometry mode — boot + orientation-change probes (stale in-flight responses never land), locally-applied edits + debounced full-document PUT with rollback to the last server document, WS push filtered to the active orientation, quiet ephemeral degrade when the backend is unreachable (no error UI), sync gated while a probe is in flight - WorkspacesHome locks the store's orientation to the resolved grid geometry (the landscape/portrait split IS the device-type split) - app store: the tile store lives beside the layout store; the WS dispatch feeds 'tile-layout' broadcasts into it; 'tiles' prop from App.svelte (the page entry owns the httpBase) - ws adapter: the 'tile-layout' server message (parse guard) + socket handler; wire conformance case --- src/core/wire/conformance.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core') diff --git a/src/core/wire/conformance.ts b/src/core/wire/conformance.ts index 99afc6d..b358641 100644 --- a/src/core/wire/conformance.ts +++ b/src/core/wire/conformance.ts @@ -95,6 +95,8 @@ export function assertWsServerMessageExhaustive(msg: WsServerMessage): string { return "extensions-changed"; case "layout": return "layout"; + case "tile-layout": + return "tile-layout"; default: return msg satisfies never; } -- cgit v1.2.3