- xtask bundle builds lutra-cli and adds it as a Tauri external binary
through a --config override (lutra.exe next to the app on Windows,
Lutra.app/Contents/MacOS/lutra on macOS); prints path, version, size.
- NSIS: "Add lutra to PATH" page, unticked by default, /ADDTOPATH for
silent installs. Changes HKCU\Environment Path only, keeps its type,
broadcasts WM_SETTINGCHANGE, records the entry; the uninstaller removes
exactly that entry. A PATH too long for NSIS strings is left alone.
- lutra CLI resolves a symlinked executable before looking for the app.
- localStorage: the UI never used webview storage, so there is nothing to
migrate; docs corrected, ESLint now bans localStorage, sessionStorage
and indexedDB, with tests.
- docs/install.md: CLI, PATH, macOS link step, webview folder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Finish page starts Lutra through Explorer (Exec, returns at once)
instead of RunAsUser/ShellExecute on the setup's UI thread. The 0.0.0
setup hung there while the new, unsigned exe was checked (Norton 360
active); Windows ended it and left lutra-desktop.exe suspended.
The NSIS template is an adapted copy of tauri-bundler 2.10.2's.
- installer/hooks.nsh registers Lutra only under OpenWithProgids and
Applications\lutra-desktop.exe for .php/.phtml/.phpt/.inc; the
default app stays. The uninstaller removes exactly those entries.
macOS gets an Alternate-rank CFBundleDocumentTypes entry and handles
RunEvent::Opened.
- A file path argument opens the file inside its Git/Composer root (or
folder); a running instance takes it over, switching projects only
when the file lies outside (never over unsaved changes).
- Version 0.1.0-alpha in the workspace, tauri.conf.json and ui; a test
keeps tauri.conf.json in step with the crate version.
- xtask bundle passes CARGO_TARGET_DIR to the Tauri CLI as an absolute
path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- App identifier com.tyrveil.lutra (D26) in tauri.conf.json and
rendezvous::APP_IDENTIFIER; a test keeps them equal.
- First normal start copies settings.json, recovery/ and tools/ once from
the dev.lutra.desktop directories (staging dir + rename, logged, info
notification); old directories stay untouched.
- Bundling on: per-user NSIS setup (English, German, Start menu, optional
desktop shortcut, uninstaller) and DMG; `cargo xtask bundle` builds the
platform's installer, joining the DMG backgrounds into a HiDPI TIFF on
macOS. build.rs also writes icons/512x512.png for the .icns.
- Installer images from the banner, designed by Amy, generated by
`cargo xtask installer-images` (assets/installer/, ASSETS.md rows);
approved by Daniel.
- docs/install.md (SmartScreen, Gatekeeper, uninstall, data locations),
README install section, architecture, development and macOS notes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A relative path is resolved against the app's working directory before
the capture, and the answer names that absolute path, so a file written
elsewhere than expected is visible. After writing, the file is read back
and a missing or short file is an error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- docs/macos.md: step-by-step setup for a fresh Apple Silicon Mac (Xcode
CLT, Homebrew, git, PHP, Composer, Node 22, pnpm, rustup, clone from
Forgejo), the machine report, Gatekeeper notes, macOS differences and
what Windows cannot check.
- cargo xtask mac-report: versions, the gate steps, the bundled-UI desktop
build and a self-check over the control channel (project, file,
Phpactor, hover, git.status, terminal, screenshot, quit); every step
times out and runs in a lutra_proc group; one report.md to send back.
- Fixes: macOS native menu (system menus only; Cmd+W stays buffer.close,
Cmd+Q runs app.quit), xcap screenshot region in points on macOS
(Retina), login shell (-l, /bin/zsh fallback) and LANG for the
terminal on macOS, PHP lookup in Homebrew/MacPorts dirs for Finder
starts, case-insensitive LSP path mapping on macOS, rendezvous file
mode re-set to 0600, CLI-started desktop in its own process group.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A WebView2 capture that does not arrive within 10 s now says whether the
main thread never ran the request or WebView2 accepted it without drawing
a frame; in the latter case the page's document.visibilityState is read
and a hidden page is reported with its likely causes (locked session,
display asleep, minimised, other virtual desktop). Docs record that a
--control instance started from the foreground app's process tree can
still take the foreground at start (open, F2c).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner decision D23: Lutra runs fetch, pull (merge or rebase per the new
git.pull.mode setting), push (upstream set on the first push) and clone
through the user's git. Any HTTPS or SSH server works; sign-in stays with
git's credential helper (its own window is allowed for network calls only)
and the ssh agent. Terminal prompts stay off, ext:: is refused, and URL
userinfo is redacted in every message, progress line and remote listing.
- vcs: Call::network with a 30 min timeout, a stderr progress sink and a
Cancel flag that kills git's process group; remote.rs with clone_repo,
fetch, pull, push (--porcelain rejections), remotes and add/set-url/
remove; explained refusals (rejected push, sign-in, host key, not found,
unreachable, no upstream, local changes, conflicts).
- engine: git.fetch/pull/push/clone/cancel/remotes/remoteAdd/remoteSetUrl/
remoteRemove, one network call at a time, gitProgress events,
gitChanged after changes.
- ui: status-bar progress with Cancel and ahead/behind, vcs.fetch/pull/
push/clone/manageRemotes (Git menu, no default shortcuts), Clone
Repository and Manage Remotes dialogs; desktop pick_dir IPC.
- Tests against local bare repositories only (vcs 8, engine 3, Vitest 11)
plus unit and property tests; docs updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Windows the webview renders itself into a PNG through WebView2
CapturePreview (scheduled on the main thread via with_webview, 10 s
timeout, PNG signature and 64 MiB cap checked). macOS and Linux keep the
xcap screen-region capture as a documented fallback, now without focusing.
app.focus is the only control method that changes focus. A --control
instance opens its window without taking the foreground. An ignored live
test samples the foreground window while the app starts and takes five
screenshots and fails if Lutra ever owns it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both themes follow the README banner without taking it over: calm,
near-neutral surfaces (cream-tinted light, faintly plum-tinted dark),
the raspberry only as the accent, retuned syntax colours and the
terminal on the editor surface. Approved by the owner from before/after
screenshots.
New tokens `--lt-diag-error|warning|info|hint` (lint underlines, gutter,
tooltips, Problems icons) and `--lt-vcs-added|modified|deleted|untracked|
ignored|conflicted` (for M4.4), listed in `theme::DIAGNOSTIC_TOKENS` and
`theme::VCS_TOKENS`. Completion kind icons take the syntax colour of
their kind. The contrast test checks every new colour (4.5:1 text,
3:1 icons) in both themes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Settings dialog: every string setting gets a text field with in-place
hints (quotes or spaces around a path, control characters, length);
keys ending in path/executable also get "Browse…" through the dialog
plugin's native picker (new desktop IPC pick_file). git.executable
from M4.1 gets the control without UI changes.
- settings.open {section?, query?} for agents and live checks.
- New keys editor.completion.autoPopup, editor.completion.delayMs and
editor.hover.delayMs; the assist module reads them live through
CodeMirror compartments.
- Tests: engine settings test, control/engine key lists, Vitest for the
controls and the live wiring. Docs: architecture, ui-parity, parity
Settings row, gaps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`--data-dir DIR` / `LUTRA_DATA_DIR` move settings, the recovery journal,
the rendezvous file and the WebView2 user data folder into one directory.
`--control PORT` without either uses `<temp>/lutra-control/<port>/`. The
SHA-256-checked Phpactor cache stays shared from the user's data dir
(`Engine::share_tools_from`). An isolated instance never forwards to or
registers as the user's main instance; `rendezvous::dir()` honours
`LUTRA_DATA_DIR` after `LUTRA_RENDEZVOUS_DIR`, so the CLI finds it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Engine (`cmd/lsp_nav.rs`, on the pending outcomes of 20d1d28):
- `lsp.definition` (F12) and `lsp.references` (Shift+F12, sorted, with
line previews) return project-relative locations; locations outside
the project, such as PHAR stubs and symlink escapes, are dropped.
- `lsp.prepareRename` uses the word at the cursor when the server has
no prepareProvider.
- `lsp.rename` (F2) applies the workspace edit (`lsp_nav/edit.rs`):
1. Check everything first: inside the project, ranges fit (UTF-16,
CRLF), open buffers unchanged since the request, no file
operations, no incomplete edit.
2. Write closed files atomically through the VFS, restoring earlier
writes when a later one fails.
3. Change open buffers through `buffer.edit` (dirty, undoable).
4. Send each written file to Phpactor as didOpen/didSave/didClose
plus didChangeWatchedFiles; without this its index kept the old
names. Then the summary notification `notification.lsp.renamed`.
UI (`components/editor/nav/`):
- Mod+click goes to the definition, with a pointer cursor while Mod is
held.
- A location picker for several definitions (exclusive modal).
- A References tab in the bottom panel, grouped by file.
- An inline rename field with a use/file count (exclusive modal).
- `BufferSync.beginUndoableRemote` puts the engine's rename edit into
the editor history as one undo step per buffer.
- Catalog strings and tokens only.
Fake LSP server: `--script FILE` with scripted capabilities and
answers (additive next to M3.4's arms).
Tests:
- `crates/engine/tests/lsp_nav.rs` (fake): definition; bad positions;
references; prepareRename; a multi-file rename incl. a closed CRLF
file; refusals for outside the project, a bad range, a stale buffer,
bad names and no server.
- The ignored real-Phpactor test covers definition, references and a
rename and back across 3 files.
- Vitest `ui/tests/nav/`.
Live (Phpactor 2026.06.25.0, Windows, port 7935, tick on):
- definition 93 ms cold / 7-18 ms warm
- references ~140 ms
- prepareRename ~11 ms
- rename 28-59 ms
- index follows written files in 140 ms
- Phpactor 57 MB working set, ~1.6% of a core while ticking idle
Gate: 13 steps, 197 s, Vitest 484 + 1 skipped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Step 1 of M3.5: the shared mechanism. M3.4 and M3.5 build on it.
- Engine: `Outcome.pending: Option<Pending>`. `Pending::new(rx, timeout,
finish)`; `Pending::wait()` is called without the engine lock and
returns at the answer, a dropped sender or the deadline (timeout + 1 s).
`Engine::resolve(answered)` then runs `finish(state, reply)` inside the
guard, under the lock. `run_waiting(lock, cmd, params, publish)` does
all three steps for hosts.
- Hosts: `Host::run`, `testkit::EngineBackend` and the control test
backend use `run_waiting`.
- New IPC `engine_execute_waiting` (`#[tauri::command(async)]`, off the
main thread) with `runWaiting()` in `ui/src/ipc.ts`. Only `lsp.*`
requests use it.
Ordering guarantee:
- `engine_execute` stays synchronous on the main thread, so ordinary
commands (`buffer.edit`) still run in call order.
- The order towards the server is fixed under the engine lock:
`buffer.edit` queues its didChange on the session's FIFO queue before
it returns, and `lsp::submit` queues the request on the same queue.
A request therefore sees every edit whose `buffer.edit` returned
first, and the UI awaits the sync's `idle()` before sending one.
Failures:
- A stall is caught by the request timeout, with the deadline as
backstop.
- On restart, close, quit or crash the request is dropped or resolved
as stopped, so the waiter gets an error, never a hang.
Tests: `crates/engine/tests/pending.rs` (answer, lock free while
waiting, dropped sender, deadline, resolve, lsp.restart while a
request is pending) and Vitest for `runWaiting`. Gate: 13 steps,
321 s, Vitest 443 + 1 skipped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The --wait end-to-end test hit its 20 s wall-clock deadline under
parallel-build load. It now waits on the backend's bufferOpened event
and on the process exit through channels, with a generous 120 s limit
that a passing run never approaches. The single-instance control tests
use a 60 s timeout instead of 10 s. The other CLI tests already wait on
the process without a deadline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- crates/mcp (L5): JSON-RPC 2.0 over stdio, dual era: MCP 2026-07-28
(per-request _meta, server/discover, -32022) and legacy initialize
(2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05). Tools list_commands,
execute_command (app.quit only with confirm: true), screenshot (image
content), read_buffer, get_events (ring of 1000 events via
events.subscribe); resources lutra://buffer/<path> for open buffers.
Engine errors become tool errors with the engine code. Lines capped at
16 MiB, guard around every request, parser and tool args fuzzed.
- lutra mcp [--port PORT] [--no-start] in apps/lutra-cli: connects through
the rendezvous file and token, or starts Lutra.
- Engine: read-only buffer.list command.
- Tests: protocol units + proptest fuzz, integration over the token
listener, stdio end to end. Docs: architecture (MCP), G7, ROADMAP.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- crates/lsp toolchain: PHP from php.executable or PATH, `php -v` with a
5 s timeout and capped output, version parsing (proptest), PHP >= 8.2.
- Pinned Phpactor 2026.06.25.0 (SHA-256 832510fe...59e9); newer releases
need ext-posix and do not start on Windows.
- Download with ureq + rustls (ring, OS roots via rustls-native-certs):
HTTPS only, 32 MiB cap, SHA-256 verified before an atomic write, retry
with backoff. Tests use a local HTTP server only.
- Engine: settings php.executable, phpactor.path, phpactor.autoDownload
(bool and string setting kinds), toolchain.status,
toolchain.downloadPhpactor, toolchainChanged, notifications; worker
thread off the engine lock, results via the pump. Downloads only after
the host calls Engine::allow_downloads (the desktop does).
- Docs: architecture Toolchain section (network access, D15), G6.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- crates/control: rendezvous file (<data_dir>/instance.json, port + random
token, atomic write, 0600 on Unix, stale detection), token-protected
listener (start_with_token, app.auth first, constant-time compare,
10 s auth timeout), app.focus, and a blocking client (connect_live,
request/execute/subscribe/next_event, open_folder/open_file/reveal)
- lutra-desktop: a normal start forwards its path to a running instance
and exits, otherwise claims the rendezvous; --control instances skip it
unless LUTRA_RENDEZVOUS_DIR is set; non-Unicode args are usage errors
- lutra-cli (binary lutra, now L6): path[:line[:column]] targets, folder ->
project.open, file -> file.open (parent opened without a project, outside
the project refused), editor.reveal, starts the desktop if needed,
--wait until bufferClosed, --version/--help, exit codes 0/1/2
- tests: proptest target parsing, rendezvous read/write/stale, token check
over TCP, forwarding against a test backend, --wait end to end
- docs: architecture, G7, ROADMAP (agent automation 18% est.), roadmap,
README
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- assets/app-icon/icon.png (720 px master) and docs/images/banner.png from
Daniel's finals; README shows the banner at the top, badges kept.
- build.rs downscales the master (area-averaging box filter, premultiplied
alpha) to icons/icon.png (256 px) and a multi-size icon.ico (16, 32, 48,
64, 128, 256); a missing or unreadable master prints a cargo warning and
falls back to the generated placeholder. No new dependency (png already a
build dependency).
- ASSETS.md rows for both files; architecture App icon row updated.
- .gitignore: /docs/psd/ and /docs/pngs/ so the local sources stay out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The host publishes picker, command-line and pump errors as notification
events (Engine::notify, same id sequence) instead of stderr, keeps
notifications and watchFailed published before engine_ready and replays
them after the state replay, so startup warnings (corrupt settings,
journal entries) reach the UI. ipc.ts announces engine_ready once all
subscriptions started together are registered.
Frontend: notifications store and NotificationStack (bottom right, info
auto-dismissed after 5 s, warnings/errors stay, close button and Escape,
at most 5 visible with "+n more", role status/alert); watchFailed maps to
a warning toast; failed commands without their own UI raise an error
toast. Catalog keys notification.settings.*, project.*, vfs.*, watch.*,
command.* plus the runtime allow-list. Docs updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- theme::LIGHT next to DARK with the 10 new tokens (editor selection,
active line, cursor, gutter, match, font size, tab active/modified,
notice); light fg-muted, accent and error darkened for WCAG AA
- theme.list, theme.systemPreference, themeChanged event when the
resolved theme changes (settings.set/reset appearance.theme, or the
OS preference in system mode)
- desktop init script and window background from the stored setting;
system mode uses a prefers-color-scheme media query for the first frame
- ui/src/theme.ts applies tokens to :root and color-scheme live; editor,
tabs and notice drop their var() fallbacks
- Vitest WCAG AA contrast check against a Rust-maintained snapshot,
DOM tests, headless control-channel test
- docs: architecture Themes, parity rows, ui-parity, gaps, roadmaps
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EngineConfig and Engine::with_config; the desktop resolves Tauri's app
config and data dirs. Settings model (appearance.theme, editor.fontSize,
ui.language) with typed validation, persistence in settings.json via
write_atomic (1 MiB cap, unknown keys kept, corrupt file backed up with a
warning notification), settings.list/get/set/reset, settingsChanged and
notification events. Property test over random settings.json content,
control-channel test for persistence and corrupt-file recovery.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
State holds the open project (VFS project, watcher, watched directories)
and versioned buffers. New commands: project.open/close/children,
file.open/save/saveAll, buffer.get/edit/close. buffer.edit takes UTF-16
change sets based on a version and fails with the new stale_version code;
closing dirty buffers or projects without force fails with
unsaved_changes. Commands queue events (projectOpened, treeChanged,
bufferChanged, dirtyChanged, fileChangedOnDisk, ...) that the engine
returns in Outcome.events; Engine::pump_vfs maps changes on disk to
events and reloads clean buffers. project.children watches listed
directories, capped at 256 native / 32 polling, least recently listed
dropped first.
Control channel: events.subscribe streams {"event": ...} lines, with
bounded per-subscriber queues (lutra_control::Subscribers) and method docs
in methods.rs. testkit's EngineBackend and the desktop Host implement the
new Backend::subscribe. Verified with 14 engine integration tests, a TCP
events test and the running app over the control channel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The window is built in setup with the theme tokens injected by an
initialization script and the background colour taken from the theme, so
the first frame is already themed. Frontend IPC (engine_execute,
engine_list_commands) and the control channel both run commands through
the Host, which applies effects such as Quit. ui.screenshot captures the
window's client area from the screen because xcap skips windows of its own
process. build.rs generates the placeholder icon into the gitignored
icons/ directory. Verified on Windows: window opens, ping, listCommands,
screenshot, app.quit, and exit status 1 when the control port is taken.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Edition 2024 workspace with the crates from docs/architecture.md, each
declaring its layer in package.metadata.lutra. Records the M0 architecture
decisions (highlighting, Git library, terminal, text buffer).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>