Skip to content

Render snapshot bootstrap progress - #2871

Open
findolor wants to merge 1 commit into
codex/web-snapshot-bootstrapfrom
codex/raindex-snapshot-poc
Open

findolor wants to merge 1 commit into
codex/web-snapshot-bootstrapfrom
codex/raindex-snapshot-poc

Conversation

@findolor

@findolor findolor commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Renders snapshot bootstrap progress immediately and connects the validated snapshot runtime to the existing Raindex providers.

This is PR 3 of 3. Generic preinstalled-database support is in #2872; the application-specific bootstrap service is in #2873.

User experience

  • Renders the normal shell during cold bootstrap instead of a blank page.
  • Shows the existing local-database status UI with the active phase and elapsed duration.
  • Exposes orders/vaults as soon as the installed snapshot validates while live RPC catch-up continues.
  • Reports installed/reused duration and actual database size.
  • Surfaces failures through the existing error page.
  • Keeps the root document fixed while the main content region scrolls.
  • Announces meaningful phase/completion/failure changes without announcing every timer tick.

Lifecycle and navigation

  • The explicit loading override is provider-free and cannot dereference a client before providers exist.
  • Provider subtrees remount when the authoritative runtime changes, so Svelte contexts cannot retain an old database/client.
  • Client-side entry into snapshot mode starts bootstrap correctly.
  • Snapshot failures remain authoritative across navigation and never mount null providers.
  • Client initialization is generation- and identity-guarded; a replaced client's delayed sync snapshot cannot overwrite the new runtime's stores.
  • Owned and late-resolving runtimes are freed exactly once. Teardown starts asynchronous runtime disposal without creating unhandled rejections; Add opt-in web snapshot bootstrap #2873 retains the Web Lock until SQLite shutdown completes.
  • Unknown rejection values produce useful stable messages.

Review-loop fixes

Codex review fixed the real-provider cold-start crash, stale Svelte contexts, client-navigation opt-in gap, failure-state loss, structured-error formatting, teardown gaps, stale async client-state race, and async SQLite close integration.

Verification

  • focused layout suite: 20/20 passed
  • full webapp suite: 274 passed, 9 skipped; only the pre-existing external registry HTTP integration failed
  • webapp ESLint passed
  • Svelte check passed with 0 errors/warnings
  • production webapp build passed
  • git diff --check passed
  • final independent Codex re-review was clean

Stack

  1. Support preinstalled local database snapshots #2872 — generic preinstalled local-database support
  2. Add opt-in web snapshot bootstrap #2873 — application-specific snapshot bootstrap service
  3. This PR: rendering and provider wiring

SQLite transport dependency: rainlanguage/sqlite-web#32 (stacked on #33 and #34).

Remote publisher follow-up

The current remote flow does not publish the single browser-ready SQLite artifact used by this POC. Moving beyond the POC requires building/checkpointing the combined database, uploading an immutable compressed object, then publishing an application manifest last with digest, exact uncompressed size, schema version, generation time, and per-target watermarks.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: c6db2ccc-ac8d-4a97-98d1-0249eb8dc781

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

findolor commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label Raindex-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@findolor
findolor changed the base branch from main to graphite-base/2871 September 13, 2026 15:37
@findolor
findolor force-pushed the codex/raindex-snapshot-poc branch from f0bd3f3 to fe27ae4 Compare September 13, 2026 15:37
@findolor
findolor changed the base branch from graphite-base/2871 to codex/web-snapshot-bootstrap September 13, 2026 15:37
@findolor
findolor marked this pull request as ready for review September 13, 2026 15:37
@findolor findolor changed the title Bootstrap web LocalDB from SQLite snapshots Render snapshot bootstrap progress Sep 13, 2026
@findolor
findolor force-pushed the codex/raindex-snapshot-poc branch from fe27ae4 to 1420ca6 Compare September 13, 2026 15:41
@findolor

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@findolor
findolor force-pushed the codex/raindex-snapshot-poc branch from 1420ca6 to bc4f384 Compare September 13, 2026 15:53
@findolor
findolor force-pushed the codex/web-snapshot-bootstrap branch 2 times, most recently from 049bcf3 to 02d1d41 Compare September 13, 2026 16:06
@findolor
findolor force-pushed the codex/raindex-snapshot-poc branch from bc4f384 to 28ce3b0 Compare September 13, 2026 16:06
@findolor
findolor force-pushed the codex/web-snapshot-bootstrap branch from 02d1d41 to 8b939e8 Compare September 13, 2026 16:14
@findolor
findolor force-pushed the codex/raindex-snapshot-poc branch from 28ce3b0 to 1b47254 Compare September 13, 2026 16:14
@findolor findolor self-assigned this Sep 14, 2026
Comment thread packages/webapp/src/routes/+layout.svelte
Comment thread packages/webapp/src/routes/+layout.svelte Outdated
@findolor
findolor force-pushed the codex/web-snapshot-bootstrap branch from 8b939e8 to 8c8554f Compare September 16, 2026 11:12
@findolor
findolor force-pushed the codex/raindex-snapshot-poc branch from 1b47254 to 8a18c79 Compare September 16, 2026 11:12
@findolor
findolor force-pushed the codex/raindex-snapshot-poc branch from 8a18c79 to e8aa7d9 Compare September 16, 2026 11:31
@findolor
findolor force-pushed the codex/web-snapshot-bootstrap branch from 8c8554f to bbf5d59 Compare September 16, 2026 11:31

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants