summaryrefslogtreecommitdiffhomepage
path: root/src/features/workspaces/index.ts
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-09-07 19:16:08 +0900
committerAdam Malczewski <[email protected]>2026-09-07 19:16:08 +0900
commit9c201c60a727106f1e3bf8c2af5f86aa7427098f (patch)
tree37c0fa07913154386785126bd75093866f05c975 /src/features/workspaces/index.ts
parent61733924352285df6c44f66edf69ea6f738fae3e (diff)
downloaddispatch-web-9c201c60a727106f1e3bf8c2af5f86aa7427098f.tar.gz
dispatch-web-9c201c60a727106f1e3bf8c2af5f86aa7427098f.zip
feat(workspaces): sync the home tile layout per device orientation
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
Diffstat (limited to 'src/features/workspaces/index.ts')
-rw-r--r--src/features/workspaces/index.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/features/workspaces/index.ts b/src/features/workspaces/index.ts
index a921617..1a60bb7 100644
--- a/src/features/workspaces/index.ts
+++ b/src/features/workspaces/index.ts
@@ -1,5 +1,6 @@
export type { WorkspaceHttp, WorkspaceResult } from "./adapter/http";
export { createWorkspaceHttp } from "./adapter/http";
+export { createTileLayoutHttp, type TileLayoutHttp } from "./adapter/tile-layout-http";
export type {
DragEmit,
DragEvent as DragControllerEvent,
@@ -42,8 +43,8 @@ export {
export { applyStarred, pageTitle, relativeTime, sortWorkspaces } from "./logic/view-model";
export type { WorkspaceStore } from "./store.svelte";
export { createWorkspaceStore } from "./store.svelte";
-export type { TileLayoutStore } from "./tile-layout-store.svelte";
-export { createTileLayoutStore, TILE_LAYOUT_STORAGE_KEY } from "./tile-layout-store.svelte";
+export type { TileLayoutProviderState, TileLayoutStore } from "./tile-layout-store.svelte";
+export { createTileLayoutStore } from "./tile-layout-store.svelte";
export { default as WorkspacesHome } from "./ui/WorkspacesHome.svelte";
/** Public module manifest — aggregated by the shell's "Loaded Modules" view. */