P1f: self-contained Tauri host; complete P1
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ cd app
|
||||
|
||||
`cargo check --manifest-path app/src-tauri/Cargo.toml` and the release build pass. The native window loads the embedded surface, opens the wire (`wire open`, `engine live`), and renders the descent and the engine panel. The screenshot is `preview-tauri.png` at the repository root.
|
||||
|
||||
The engine is still the separate daemon: the Tauri shell is a viewer in P0/P1a. Embedding the engine in the Tauri backend is the next step after the session/persistence slice. The earlier `dbus-1`/`webkit2gtk`/`gtk` failure is historical; those packages are now present.
|
||||
In P1f the Tauri app was given its own host: the engine, session, project store and wire run inside `zhila-app`, so the native window is self-contained. The standalone daemon remains the browser-development path. The earlier `dbus-1`/`webkit2gtk`/`gtk` failure is historical; those packages are now present.
|
||||
|
||||
## P0 exit criteria
|
||||
|
||||
|
||||
+32
@@ -200,3 +200,35 @@ The snapshot carries the cores' cuts, not the audio; the audio is still content-
|
||||
- Imports are not undoable; the history is snapshots, not the complete journal.
|
||||
- The cap is 64 edits; older history is dropped.
|
||||
- Corrupt history JSON is ignored with a warning and an empty stack.
|
||||
|
||||
---
|
||||
|
||||
# P1f · the host inside Tauri
|
||||
|
||||
The native window is now self-contained.
|
||||
|
||||
## Shape
|
||||
|
||||
- `crates/zhila-daemon` became a library (`zhila_daemon::run(HostConfig)`) plus the thin daemon binary. `HostConfig` is port, token, no_audio and project.
|
||||
- `app/src-tauri` depends on the daemon library. On start it spawns one thread with a current-thread Tokio runtime and calls `run`; the Tauri window runs on the main thread. The engine, session, SQLite store, assets and WebSocket server live in the app process.
|
||||
- The embedded Svelte surface talks to `ws://127.0.0.1:4317` exactly as the browser does; the token is `dev`, the project is the default one.
|
||||
- The standalone daemon still exists for browser-first development; the two cannot share port 4317.
|
||||
|
||||
## Verification
|
||||
|
||||
- `cd app && ./node_modules/.bin/tauri build --no-bundle` builds `zhila-app` with the host; the release build passes.
|
||||
- The standalone daemon was stopped; `ss -ltnp` shows `zhila-app` owning `127.0.0.1:4317`.
|
||||
- The app log shows `project loaded ... descent-04`, the audio device, and `wire opened ... client=zhila-ui`; the window shows `engine live`, the project name, the 2 cores and the pattern.
|
||||
- Screenshot: `preview-p1-tauri-host.png`.
|
||||
- Final P1 checks: `./scripts/check.sh`, `node scripts/persistence-smoke.mjs` (manual cut + undo + redo across a daemon restart), the browser smokes.
|
||||
|
||||
## Limits
|
||||
|
||||
- The app uses the development token and the default project; no first-run project picker.
|
||||
- The app and the browser daemon contend for 4317.
|
||||
- WebKitGTK microphone permission for recording is not verified on this machine.
|
||||
- Installers (deb/AppImage) are still not built; the binary is the deliverable.
|
||||
|
||||
## P1 acceptance
|
||||
|
||||
The "first playing loop" is reachable end-to-end: import or record → sixteen faces, cut and trimmed by hand → assign to a vein → pattern plays → save/load, undo/redo across restarts → the same material and history in the self-contained native app.
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
# ZHILA — план проекта
|
||||
|
||||
Черновик v1.1 · 1 ноября 2026
|
||||
Статус: **P0, P1a, P1b, P1c, P1d и P1e выполнены** (см. `P0.md`, `P1.md`). Демо `reference/demo/` — референс, не кодовая база.
|
||||
Статус: **P1 полностью выполнен** (P0, P1a–P1f; см. `P0.md`, `P1.md`). Демо `reference/demo/` — референс, не кодовая база. Следующая фаза — аранжировка, рендер и агент.
|
||||
|
||||
**Зафиксировано 1 ноября:** descent — основной вид; камень = паттерн; климат — на жилу (концепт погоды остаётся); платформа v1 — Linux; UI — Svelte 5. Журнал — §9.
|
||||
|
||||
|
||||
@@ -164,3 +164,7 @@ The project is loaded by the daemon from its `--project` folder and saved after
|
||||
## P1e addition
|
||||
|
||||
No new wire messages. The daemon now persists the session's bounded `history` and `redo` stacks in the project and restores them on load; `State.can_undo`/`can_redo` therefore describe the restored stacks after a restart. The stacks are server-side JSON snapshots of bpm, gains, pattern and core face boundaries.
|
||||
|
||||
## P1f note
|
||||
|
||||
The Tauri app starts the same host in-process, so the wire contract is unchanged. The embedded surface connects to `ws://127.0.0.1:4317` with the same hello, token and origin rules; the daemon remains the browser-development host.
|
||||
|
||||
Reference in New Issue
Block a user