Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Implement PR2 from
openspec/changes/localfirst-infra-v1/tasks.md: de-risk Web Worker bundling + SQLite OPFS worker bootstrap, validate migration loading approach, and close the effect-qb + migration DX decisions.What’s in this PR
Web spikes
/spike-localfirst—apps/web/src/routes/spike-localfirst.tsxStart worker+Ping)Start sqlite worker+SELECT 1)import.meta.globraw SQL)apps/web/src/spikes/localfirst/worker.tsapps/web/src/spikes/localfirst/sqlite-opfs-worker.tsapps/web/src/spikes/localfirst/migrations/loader.spike.tsapps/web/src/spikes/localfirst/migrations/sql/0001_spike.sqlDev header support
apps/web/vite.config.ts(needed for SharedArrayBuffer/OPFS perf).Decisions recorded
openspec/changes/localfirst-infra-v1/decision-effect-qb.mdopenspec/changes/localfirst-infra-v1/decision-migration-dx.mdTooling note
lint-stagedto run Ultracite only on JS/TS/CSS/SCSS to avoid failing commits that touch only md/json.Key outcomes
import.meta.glob(..., { as: "raw", eager: true })works in this Vite/TanStack Start setup.tools/spikes/effect-qb-sqlite.mjs).tsgodue to library-internal typecheck errors → rejected for V1 runtime.Verification
pnpm nx typecheck webpnpm nx test webReview path
apps/web/src/routes/spike-localfirst.tsxapps/web/src/spikes/localfirst/sqlite-opfs-worker.tsapps/web/src/spikes/localfirst/migrations/loader.spike.tsopenspec/changes/localfirst-infra-v1/Follow-ups (next PRs)
localfirst-dbcore contract + in-memory adapter + migration runner tests.