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>
71 lines
7.1 KiB
Markdown
71 lines
7.1 KiB
Markdown
# Target-app parity
|
||
|
||
> **Status:** M1 in progress (text buffer, VFS, engine workspace, project tree in the app), no PHP feature ships · **Last updated:** 2026-10-15 · **Target:** PhpStorm 2026.x
|
||
|
||
## How this is measured
|
||
|
||
Each feature area gets a weight (how much a typical PHP developer uses it) and a score (how much of the documented behaviour Lutra has, judged by behaviour, not by menu items). The headline depth is the weighted sum. Every score is marked measured or estimated and must point to evidence (tests, commands, screenshots of Lutra). Behaviour references come from public PhpStorm documentation only, noted with URLs in `plan/phpstorm/`.
|
||
|
||
Hours are the estimated agent wall-clock hours for one agent to reach behaviour parity in the area, from zero. They are first estimates made at the end of M0 and are recalibrated after each milestone from merged-commit timestamps.
|
||
|
||
## Feature areas
|
||
|
||
| Area | Weight | Score | Missing | Hours (one agent) | Evidence |
|
||
|---|---:|---:|---|---:|---|
|
||
| Editor core | 12 | 0% | everything user-visible: no editor in the UI yet; engine buffers, file commands and events exist | ~120 (est.) | `crates/text`: rope buffer, positions, edits (M1.1, unit tests + proptests). M1.3: engine buffers with versions and dirty state, `file.open`, `buffer.get`, `buffer.edit` (UTF-16 change sets, `stale_version`), `file.save`, `file.saveAll`, `buffer.close` with unsaved-changes guard, line ending and BOM kept on save, clean buffers reload on external change; 14 integration tests on temp dirs (`crates/engine/tests/workspace.rs`) |
|
||
| Project view, VFS | 6 | 8% (est.) | views list (project / scopes), toolbar (Select Opened File, Expand/Collapse All), sort and display options, show/hide excluded, distinct icons for library and excluded folders, file colours, speed search, preview, file operations, showing truncated listings | ~37 (est.) | `lutra-vfs` (M1.2): lazy sorted listing, ignore rules (.gitignore, .ignore, info/exclude, global excludes, Lutra defaults), native file watching via `notify` with a polling fallback, capped UTF-8 reads, atomic writes; 34 tests on temp dirs, watcher tests run on both backends (`crates/vfs/tests`). M1.5: project tree UI (lazy listing, keyboard navigation, dimmed ignored entries, event refresh) in `ui/src/components/project/`, Vitest against a mocked engine. M1.3: `project.open`, `project.close`, `project.children` (watches listed directories, capped at 256 native / 32 polling, least recently listed dropped), `treeChanged` events from disk, `events.subscribe` on the control channel with a TCP test (`crates/control/tests/events.rs`). M1.4: the tree runs against the engine in the app: folder picker (`project.openDialog`) and `lutra-desktop --control PORT PATH` open a project, the tree lists it lazily with ignored (`var/` from `.gitignore`) and excluded (`node_modules`) entries dimmed, a file created on disk appears in an expanded folder within ~100 ms; verified with `ui.screenshot` on Windows 11 and Vitest (`ui/tests/project/`, `ui/tests/ipcEvents.test.ts`). Graded against `plan/phpstorm/02-project-view.md`: tool window, folder-first tree, dimmed ignored/excluded, keyboard navigation and live refresh exist; most toolbar, view and display options do not |
|
||
| Navigation | 10 | 0% | everything | ~120 (est.) | — |
|
||
| Search and replace | 6 | 0% | everything | ~80 (est.) | — |
|
||
| Code completion | 10 | 0% | everything | ~250 (est.) | — |
|
||
| Inspections and quick-fixes | 8 | 0% | everything | ~300 (est.) | — |
|
||
| Refactoring | 7 | 0% | everything | ~250 (est.) | — |
|
||
| Code style and formatting | 4 | 0% | everything | ~120 (est.) | — |
|
||
| Git | 8 | 0% | everything | ~150 (est.) | — |
|
||
| Terminal | 3 | 0% | everything | ~30 (est.) | — |
|
||
| Run configurations | 2 | 0% | everything | ~50 (est.) | — |
|
||
| Debugger | 5 | 0% | everything | ~120 (est.) | — |
|
||
| Testing | 4 | 0% | everything | ~80 (est.) | — |
|
||
| Composer and interpreters | 2 | 0% | everything | ~50 (est.) | — |
|
||
| Frameworks | 5 | 0% | everything | ~300 (est.) | — |
|
||
| Database tools | 3 | 0% | everything | ~250 (est.) | — |
|
||
| HTTP client | 1 | 0% | everything | ~60 (est.) | — |
|
||
| Web languages | 2 | 0% | everything | ~200 (est.) | — |
|
||
| Docker and remote | 1 | 0% | everything | ~120 (est.) | — |
|
||
| Settings, keymaps, themes | 1 | 0% | settings UI, keymaps, theme switching (theme tokens exist in `lutra_engine::theme`) | ~60 (est.) | — |
|
||
| Plug-ins | 0.5 | 0% | everything | ~120 (est.) | — |
|
||
| AI features | 0.5 | 0% | everything | ~60 (est.) | — |
|
||
|
||
Sum: about 2,930 h. Adding UI fidelity (~150 h), localization (~40 h), performance (~100 h) and stability hardening (~100 h) gives the ROADMAP's ~3,300 h to full parity. The range is wide (2,000–5,000 h): completion, inspections, refactoring and frameworks depend on an own type-inference engine whose size is hard to judge before M6.
|
||
|
||
Weights were reviewed at the end of M0 and kept: nothing built so far gives a reason to change them.
|
||
|
||
## What ships (M0, 2026-10-14)
|
||
|
||
No PHP feature. The foundation, verified on Windows 11:
|
||
|
||
- `cargo xtask ci` passes all 13 steps (fmt, clippy with no-panic lints, tests, lints self-test, layers, assets, clean-room, cargo-deny licences, pnpm install, ESLint, vue-tsc, Vitest, frontend licences).
|
||
- Commands `app.about` and `app.quit` with unit tests; a panicking command is caught by the guard (`crates/engine/src/engine.rs` tests).
|
||
- Control channel: `app.ping`, `engine.execute`, `engine.listCommands`, `ui.screenshot`, with proptests and a TCP integration test (`crates/control`), and checked against the running app.
|
||
- The desktop window opens themed from Rust tokens and shows the product name and version that the frontend gets from `app.about` over IPC.
|
||
|
||
## What ships (M1, in progress)
|
||
|
||
The project tree is the first user-visible feature (Project view 8%, estimated); every other score stays 0%.
|
||
|
||
- M1.1 text buffer (`crates/text`): `Buffer` on a `ropey` rope with byte, char, UTF-16 and line counts; byte offset to line and column in UTF-16 code units or chars and back, all fallible (out of range, inside a character, inside a CRLF, inside a surrogate pair); atomic `Edit` batches in LSP `TextEdit[]` semantics that reject reversed, out-of-range and overlapping ranges; `
|
||
` / `
|
||
` / `
|
||
` detection with a keep-the-file's-ending save policy. 23 unit tests and 6 proptests (round-trips on emoji, ZWJ sequences, CJK and combining marks; random edit batches checked against a `String` model, never panicking).
|
||
|
||
## Revision history
|
||
|
||
| Date | Change | Summary |
|
||
|---|---|---|
|
||
| 2026-10-15 | minor | Project view 0% → 8% (estimated): tree runs against the engine in the app (M1.4) |
|
||
| 2026-10-14 | minor | Project view evidence: project tree UI (M1.5), score unchanged |
|
||
| 2026-10-14 | minor | M1.3 engine workspace evidence (Editor core, Project view; scores unchanged) |
|
||
| 2026-10-14 | minor | M1.1 text buffer evidence (Editor core, score unchanged) |
|
||
| 2026-10-14 | minor | Project view evidence: native file watching (M1.2b), score unchanged |
|
||
| 2026-10-14 | minor | Project view evidence: `lutra-vfs` (M1.2), score unchanged |
|
||
| 2026-10-14 | minor | Hours per area, weights reviewed, M0 evidence |
|
||
| 2026-10-13 | major | Baseline |
|