Lutra/crates
danny dd98636de4 M1.4: desktop bridge: engine events to the window, folder picker, live project tree
The desktop host publishes every engine event, from commands and from a
pump thread that calls Engine::pump_vfs every 100 ms, to control channel
subscribers and to the window as the Tauri event engine://event, in engine
order. ui/src/ipc.ts gets a typed onEngineEvent; its first subscription
calls engine_ready, and the host replays the current project and buffers,
so a project opened from the command line (lutra-desktop --control PORT
PATH) reaches the UI. project.openDialog returns Effect::PickFolder; the
host shows the native folder picker (tauri-plugin-dialog, licence checked)
and opens the choice, one picker at a time, cancel is not an error.
Capabilities shrink to event listen/unlisten.

Contract fix: the M1.5 project UI assumed shapes the engine does not use.
engineEvents.ts now translates engine events ({kind: projectOpened, ...})
and project.children results ({dir, entries, truncated}) into the UI types,
keeping role and truncated; the store maps listings through
toTreeEntries() and the project tests use the real engine shapes.

Verified in the running app on Windows 11: tree of a project given on the
command line, expanding src, a file created on disk appearing live, the
folder picker opening one dialog and opening the chosen folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 06:41:49 +02:00
..
control M1.3: engine workspace, file and buffer commands, event stream 2026-10-14 20:24:44 +02:00
engine M1.4: desktop bridge: engine events to the window, folder picker, live project tree 2026-10-15 06:41:49 +02:00
index M0.1: Cargo workspace with layered crates 2026-10-13 20:24:06 +02:00
lsp M0.1: Cargo workspace with layered crates 2026-10-13 20:24:06 +02:00
mcp M0.1: Cargo workspace with layered crates 2026-10-13 20:24:06 +02:00
search M0.1: Cargo workspace with layered crates 2026-10-13 20:24:06 +02:00
syntax M0.1: Cargo workspace with layered crates 2026-10-13 20:24:06 +02:00
terminal M0.1: Cargo workspace with layered crates 2026-10-13 20:24:06 +02:00
testkit M1.3: engine workspace, file and buffer commands, event stream 2026-10-14 20:24:44 +02:00
text M1.1: text buffer with UTF-16 positions, edit batches and line endings 2026-10-14 19:20:18 +02:00
vfs M1.2: native file watching via notify 2026-10-14 19:43:15 +02:00