Skip to content

DX/UX: waitForReady vs first sync — helpers for UI gating #20

Description

@darekaze

Problem

waitForReady() only means local SQLite is open. It does not wait for connect() or the first checkpoint/download. Apps that enable the main UI after waitForReady() can show empty or misleading state before sync has applied anything.

README Sync caveat: Local UI ready ≠ sync ready.

Proposed direction

  • Add a small DX helper (or documented recipe) e.g. wait until connected + first useful download/apply (or timeout with explicit error), distinct from waitForReady().
  • Showcase: gate "ready for interaction" on the stronger condition where appropriate, while still allowing offline-first local edits if that is intentional.

Acceptance

  • Public helper or clear documented pattern.
  • Showcase uses it (or documents why it intentionally does not).
  • README Sync caveats updated.

Refs: README Sync caveats; PowerSync waitForReady / connect semantics.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions