Commit Graph
14 Commits
Author SHA1 Message Date
Gregory Schier 0a7a9f7a2b Run the desktop's model layer in the browser
The browser host now stores data through yaak-models compiled to wasm — the
same queries, migrations, cascade rules, duplicate naming and first-run
bootstrap the desktop and CLI use — instead of a TypeScript port of them.

- crates/yaak-web: the wasm crate. boot() registers an IndexedDB-backed VFS
  and calls init_standalone; rpc(cmd, payload, label) answers the models_*
  commands via ClientDb and returns the model_writes it caused; blob get/put
  through blob_manager. Built like yaak-templates (pkg/ committed); the
  build script keeps pkg/ and says so when no wasm-capable clang is present,
  so a desktop bootstrap never depends on one.
- models_ops moves from crates/yaak into yaak-models so the wasm crate can
  use it without the send engine.
- The database lives in a SharedWorker (packages/platform/src/web/worker.ts):
  one process holds the data and pushes writes to every tab, as on the
  desktop. Where SharedWorker is missing or its script cannot be fetched, a
  dedicated worker guarded by a Web Lock takes over and a second tab is told
  so. The worker imports the wasm lazily so a tab's connect is answered
  instantly; the tab reconnects if it isn't.
- packages/platform/src/web loses models.ts, schema.ts, db.ts and the
  BroadcastChannel; commands.ts forwards model commands to the worker and
  keeps the fixed answers and refusals.

Verified in Chrome, dev and production builds: bootstrap, CRUD across every
model type, serde defaults, engine-format ids, Rust copy naming, folder
cascade with per-descendant events, single-event workspace delete, reload
persistence, two tabs coherent, Send declined with a toast, 8/8 reloads
rendering in ~100 ms.
2026-08-15 15:48:49 -07:00
Gregory SchierandClaude Opus 4.6 b4a1c418bb Run oxfmt across repo, add format script and docs
Add .oxfmtignore to skip generated bindings and wasm-pack output.
Add npm format script, update DEVELOPMENT.md for Vite+ toolchain,
and format all non-generated files with oxfmt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 10:15:49 -07:00
Gregory Schier ec3e2e16a9 Switch to BiomeJS (#306) 2025-11-23 08:38:13 -08:00
goldlinker 8164a61376 chore: make some documents clearer (#276) 2025-11-10 17:25:54 -08:00
Gregory Schier 648a1ac53c Update DEVELOPMENT.md 2025-06-08 22:49:43 -07:00
Gregory Schier 9d9e83d59f Remove sqlx for migrations (#224) 2025-06-03 14:42:32 -07:00
Gregory Schier 101efdd512 Merge plugins repo into mono 2025-05-29 08:02:24 -07:00
Gregory Schier cb773babe1 Nested template functions (#186) 2025-03-18 12:49:19 -07:00
Gregory Schier 917adcfb2e Better plugin development experience (#118) 2024-09-29 10:41:07 -07:00
Gregory Schier 08531fa1ff Update development doc 2024-09-27 05:45:48 -07:00
662bc41cb3 Improve dev docs (#117)
Co-authored-by: i-usebruno <anon.repressed498@passinbox.com>
Co-authored-by: Gregory Schier <gschier1990@gmail.com>
2024-09-27 05:34:15 -07:00
Gregory Schier 921f1de62a Bootstrap command 2024-09-22 22:17:45 -07:00
Gregory Schier 085580b94a Add migration steps to DEVELOPMENT.md 2024-09-19 14:20:57 -07:00
Samuel Marks 75552cbb7d Upgrade dependencies (#74) 2024-09-15 10:33:50 -07:00