Skip to content

Client Sync & Steps Islands

The UI is Astro pages hydrating React islands (src/islands). Islands read/write through the offline layer (Dexie cache + outbox) rather than calling the API directly, so the same optimistic, offline-first path backs every interaction.

  • WorkspaceContext.tsx provides shared client state (current selection/scope, cached data) to islands.
  • Islands mutate via the offline mutation API (src/lib/offline/sync.ts) and observe reconciled data from the Dexie cache; the live/poll transports refresh that cache (see LiveConnection WS Client, Poll Controller, Sync-Core Reconcilers). SyncStatus.tsx surfaces transport state.
  • StepsRegion.tsx renders a Task’s Steps as a flat checklist (within TaskDetailPanel.tsx): add at bottom, toggle done, rename, reorder by drag (fractional rank, per-Task scope). It reflects the Step domain rules — no nesting, title + done only (Product Brief §5.2; see Steps in a Task).
  • Step edits are optimistic and queued like any other mutation; reconciliation uses reconcileSteps/reconcileAllSteps.

Related: Steps in a Task (server side), Offline Outbox & Optimistic Writes, Sync-Core Reconcilers.