Commit graph

120 commits

Author SHA1 Message Date
danny
149a6c7049 M4.5: branch status-bar item and branches popup
The status bar shows the current branch (short hash when detached). Its
popup lists local, then remote branches with a filter and New branch;
checkout runs flushDirty first and toasts git's refusal. Commands
vcs.branches, vcs.newBranch and vcs.checkout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:56:24 +01:00
danny
b3642e53ea PM: merge M4.3 diff viewer
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:45:34 +01:00
danny
8360ffc2e2 M4.3: side-by-side diff viewer with next/previous change
vcs.showDiff {path?, staged?} (Mod+Alt+Shift+D) opens a "Diff: <name>"
tab in the editor area: @codemirror/merge (MIT, loaded lazily, 27 kB /
9.7 kB gzip), with the index (or HEAD for the staged view) read-only on
the left, line breaks normalised to LF, and the working copy on the right,
editable through its normal engine buffer. vcs.nextChange (Alt+Shift+])
and vcs.previousChange (Alt+Shift+[) move between chunks. Binary, too
large, failed and deleted files show a notice. Entry points: the Changes
window, a new project tree context menu (Open, Show Diff; right click or
Shift+F10) and the palette/menu. Colours come from the --lt-vcs-* tokens.
21 Vitest tests; parity docs updated (Git 6% -> 8%, est.).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:44:56 +01:00
danny
468b9928a7 PM: merge M4.4 git gutter markers and status colours
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Depth headline inputs updated for H3 (Inspections 5%) and H4 (Settings 8%):
570/101, still ~5.6%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:23:07 +01:00
danny
ac007a7d59 PM: merge H3 Phpactor UX: fast indexing tick, progress, messages, php -l
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 17:45:59 +01:00
danny
fc8ae6c2e3 M4.4: Git gutter change markers and status colours in tree and tabs
- git.lineChanges {id} -> {ranges: [{kind, startLine, endLine}], version}:
  the buffer against its index blob, line diff with similar (Myers +
  Replace, no Compact) off the lock, CRLF-safe; index texts cached per
  path and dropped on gitChanged (State::emit -> git_lines::observe)
- editor gutter markers for added, modified and deleted lines, queried
  150 ms after edits, on show and on gitChanged, mapped through edits
- vcsStatus store (git.status on projectOpened and gitChanged, no
  polling) colouring file names in the project tree and editor tabs with
  the --lt-vcs-* tokens; contrast also checked on the active tab
- tests: unit and property tests, real-repo engine tests, Vitest
- docs: architecture, parity, gaps, roadmap, ui-parity, ROADMAP

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 17:40:30 +01:00
danny
e128400246 H3: Phpactor UX: fast tick while indexing, progress, messages, php -l
- Session tick: 1 ms while Phpactor reports work-done progress and in a
  session's first 120 s, otherwise 25 ms as before. Fast intervals use
  thread::sleep, because recv_timeout wakes at most ~64/s on Windows.
  First useful completion on 2,000 classes: 71.6 s -> 20.7-26.9 s.
- $/progress -> lspProgress {active, title?, message?, percentage?},
  progress in lsp.status, a status-bar item (LspProgressItem).
- window/showMessage -> notification.lsp.message (repeats within 30 s and
  the known Windows lint-provider complaint only logged); showMessage,
  logMessage and stderr in a 1,000-line log, new command lsp.log.
- Lutra's own php -l on Windows (lsp/php_lint.rs): on open and save, one
  worker thread, lutra_proc::spawn, stdin, 10 s timeout, output caps;
  merged into diagnosticsChanged with source "php -l".
- editor.completion.delayMs stays 0 (measured: 100 ms only delays the
  list; Phpactor marks every list incomplete).
- Fake server: scripted notifications after initialized.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 17:36:10 +01:00
danny
56dadc91dc PM: merge M4.2 Changes tool window and commit
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 17:36:05 +01:00
danny
eb7e6376b7 M4.2: Lutra-own shortcuts for the Changes window
vcs.commit moves from Mod+K (the public default keymap's Commit) to
Mod+Alt+Shift+M, and vcs.openChanges from Mod+Alt+G (CodeMirror's go to
line in basicSetup, which the global listener would swallow) to
Mod+Alt+Shift+G. Both were checked against the public Windows and macOS
default keymap pages, Lutra's registered shortcuts and CodeMirror's keys.
Tests and docs follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 17:35:39 +01:00
danny
f67f6b9f7c M4.2: Changes tool window with staging and commit
A Changes tab in the bottom panel (ui/src/components/vcs/changes/): the
project's changed files from git.status in Staged, Changes and Untracked
groups, re-read on start, project open, gitChanged and vcs.refresh
(serialised). A checkbox per file and per group stages or unstages through
git.stage / git.unstage (a staged rename passes both paths); Space stages,
Enter or a double-click runs vcs.showDiff when provided, else opens the
file. A message box with Amend and Commit (also Mod+Enter) runs flushDirty()
first, cancels when a save fails, then git.commit and toasts the short hash.
All git calls go through runWaiting.

UI commands vcs.openChanges (Mod+Alt+G), vcs.commit (Mod+K, focuses the
message box) and vcs.refresh in a new Git menu group; gitChanged added to
EngineEventPayload. 19 Vitest tests; palette, menu and catalog tests follow
the new commands. Docs: architecture, gaps G8, Git parity row 4% (est.),
ui/tooling checklists, roadmap M4 row, ROADMAP depth ~5.4% and log, README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 17:17:39 +01:00
danny
8701f50d37 PM: merge M4.1 git backend via the installed git CLI
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 16:58:25 +01:00
danny
13e7b0aa12 M4.1: Git backend through the installed git
New crate lutra-vcs (L3): a safe git runner (argument arrays, no prompts,
GIT_OPTIONAL_LOCKS=0 for reads, timeouts 30 s / 120 s for hooks, output
caps, one spawn function for H1's kill-on-close helper), porcelain v2 / -z
parsers (property-tested), Repo operations (status, stage, unstage before
the first commit, commit and amend, show at HEAD/index, branches, checkout
with remote tracking, branch creation checked by check-ref-format) and a
.git poll (RepoWatch).

Engine: git.status, git.stage, git.unstage, git.commit, git.show,
git.branches, git.checkout, git.createBranch on pending outcomes, off the
engine lock; gitChanged after changes and debounced 300 ms on .git or
project changes; setting git.executable (section Git).

Tests against real temp repositories, engine tests through run_waiting,
docs (architecture, gaps G8, Git parity row, roadmap M4 row).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 16:52:29 +01:00
danny
cd8c34b094 PM: merge H5 banner-aligned themes, diagnostic and VCS tokens
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 13:59:09 +01:00
danny
9801a346b6 H5: banner-aligned themes, diagnostic and VCS tokens
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>
2026-10-25 13:58:38 +01:00
danny
e73bdbbbbc PM: merge H2 flaky-test cleanup
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 13:45:55 +01:00
danny
9407d5d6c2 H2: warm up first editor and modals outside the test budget
The first CodeMirror view and the first render of the editor area,
the palette and the settings dialog in a jsdom worker cost 0.3-0.6 s
once. The first test of EditorArea, language and modals paid it inside
its own 5 s budget and timed out under load. A beforeAll warm-up now
pays it once; no timeout changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 13:30:57 +01:00
danny
e969f6497c PM: merge H4 string and path settings controls, live assist settings
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 13:20:26 +01:00
danny
197d5b7d27 H4: string and path settings controls, live completion and tooltip settings
- 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>
2026-10-25 13:10:39 +01:00
danny
f6ea0b708c PM: merge H6 isolated data directory for dev and live-check instances
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 13:04:34 +01:00
danny
ba70b0f43a H6: isolated data directory for dev and live-check instances
`--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>
2026-10-25 13:03:37 +01:00
danny
b0f8550aeb PM: merge H1 child processes die with Lutra
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 13:00:56 +01:00
danny
90d03284f2 H1: child processes die with Lutra (crates/proc)
New layer-0 crate lutra-proc: spawn(Command) puts the child into a
kill-on-close group. Windows: one job object per child with
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE (windows-sys), nested jobs work.
Unix: a new process group plus a /bin/sh watchdog that kills the group
when Lutra's pipe closes (drop, kill, quit or SIGKILL of Lutra).
Child::kill and Drop take the whole group.

Phpactor (supervision spawn) and the php -v probe in lutra-lsp start
through it. Tests kill a parent hard and check that its child is gone
(with and without the parent in a group), plus kill and drop of a tree.
Docs: architecture "Child processes", G6 note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 12:59:57 +01:00
danny
e5891ddeb4 PM: C4 review, M3 done and MVP feature-complete
Some checks failed
ci / ci (macos-15) (push) Has been cancelled
ci / ci (ubuntu-24.04) (push) Has been cancelled
ci / ci (windows-2025) (push) Has been cancelled
Breadth recounted against the feature map (32/155), M3 measured at
~14 h of agent time (factor 0.17), full-parity hours re-scaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:54:43 +02:00
danny
7420d5bdae PM: merge M3.5 go to definition, find references and rename
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:51:00 +02:00
danny
578160a2ba M3.5: go to definition, find references and rename through Phpactor
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>
2026-10-22 18:50:15 +02:00
danny
b3fd7c6478 PM: merge M3.4 completion, hover and signature help
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:38:47 +02:00
danny
a212a44490 M3.4: completion, hover and signature help from Phpactor
Engine (crates/engine/src/cmd/lsp_assist.rs), on M3.5's pending outcomes:
- lsp.completion {id, position, triggerCharacter?}: items with label,
  kind, detail, Markdown documentation, insertText, textEdit,
  additionalTextEdits, sortText; sorted, capped at 500 (cut lists are
  incomplete), snippets turned into plain text.
- lsp.hover {id, position}: Markdown contents and range.
- lsp.signatureHelp {id, position}: signatures with UTF-16 parameter spans.
- The request is queued after every didChange; the answer is converted
  in the reply callback, off the engine lock. Positions are checked
  against the buffer. Server strings and lists are capped.
- lutra-lsp-fake answers completion and signature help.

Editor (ui/src/components/editor/assist/):
- Completion source with Lutra's triggers (identifiers, $, ->, ?->, ::,
  namespace \; not in strings or comments unless asked), the server's
  ranking as boost, text edits and imports applied in UTF-16 (CRLF too),
  Lucide kind icons.
- Hover documentation (350 ms) and editor.quickDocumentation (Mod+I).
- Signature help on ( and , following the cursor; editor.parameterInfo.
- editor.complete.
- Lutra's own Markdown renderer without HTML (XSS-tested), tokens only.
- Requests wait for the buffer sync to be idle and use runWaiting.
- New dependency @codemirror/autocomplete (MIT, already transitive).

Tests: 6 engine tests against the fake server, 9 unit tests, an ignored
real-Phpactor latency test, 29 Vitest tests; palette and menu tests list
the new UI commands.

Measured with the real Phpactor (Windows 11, debug build, 25 ms tick):
- Completion 61-109 ms while typing (median 76 ms; ~107 ms in the app).
- Hover and signature help ~16 ms median.
- A useful list 2.3 s after opening a file in a 20-class project, ~65 s
  for 2,000 classes (indexing).
- Phpactor 56-71 MB working set, ~6% of one core while typing.

Live-checked in the app on port 7934. Docs: Code completion 0% -> 5%
(est.), feature depth ~4.1% -> ~4.6%, breadth 26/155, architecture, G6,
ui-parity, language-parity, roadmap, README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:38:07 +02:00
danny
12d21d96f4 PM: merge M3.5 step 1 pending outcomes
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 06:36:48 +02:00
danny
20d1d28c32 M3.5: pending outcomes for commands that wait for the language server
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>
2026-10-22 06:36:20 +02:00
danny
a674040797 PM: merge M3.3 LSP wiring and diagnostics
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 19:00:55 +02:00
danny
13c76d3046 M3.3: engine wiring for Phpactor and diagnostics
- One Phpactor per open project on its own session thread, started when
  the toolchain is ready; ordered document sync from buffer.edit and the
  pump; lspStatus, diagnosticsChanged, diagnostics.list, lsp.status,
  lsp.restart; app.quit stops the server synchronously.
- Phpactor 2026.06.25.0 on Windows: keep-alive $/lutra/tick (its event
  loop only runs on stdin input), in-process diagnostics and a polling
  watcher through initializationOptions (amphp subprocesses fail), 500 ms
  shutdown timeout.
- Editor lint extension (underlines, gutter dots, hover; tokens only) and
  a Problems tab in the bottom panel; problems.open Mod+Alt+P.
- Tests: engine tests against the fake server (incl. sync proptest), an
  ignored real-Phpactor test, a TCP test, Vitest for lint and Problems.
- Docs: architecture, gaps G6, parity (Inspections 4% est.), ui-parity,
  roadmap, ROADMAP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 18:58:32 +02:00
danny
65c6966588 PM: merge M3.6 integrated terminal
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 21:17:40 +02:00
danny
a8daf269fb M3.6: integrated terminal with PTY sessions and xterm.js sub-tabs
- crates/terminal: portable-pty sessions (ConPTY on Windows) with reader,
  writer and waiter threads, UTF-8 chunking, a 1 MiB output buffer with
  backpressure, a non-blocking input queue, resize, kill and exit codes;
  default shell pwsh -> powershell -> cmd on Windows, $SHELL or /bin/sh.
- Engine: terminal.create/input/resize/close, terminalOutput (capped per
  terminal and per pump, round-robin) and terminalExited through the pump;
  terminals close with the project and on app.quit.
- UI: Terminal tab in the bottom panel (tabs next to Find), xterm.js with
  the fit addon, sub-tabs, copy/paste, a focus rule that leaves plain Ctrl
  keys to the shell, terminal.open (Mod+Shift+T), --lt-terminal-* ANSI
  tokens in both themes (text colours AA) and a 4.5:1 minimum contrast.
- Tests: real-shell crate tests (UTF-8, backpressure), engine and TCP
  control tests, Vitest with a mocked xterm; live check on port 7936;
  docs and parity rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 21:10:37 +02:00
danny
5fa7f0c8b3 PM: merge M3.10 autosave and flushDirty
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 21:08:45 +02:00
danny
e1dc24dc25 M3.10: autosave and flushDirty
Autosave saves dirty buffers when the window loses focus (DOM blur and
visibilitychange), when the active tab changes and after
editor.autosave.idleSeconds (default 15) without an edit; three settings,
all on by default. flushDirty() in ui/src/stores/autosave.ts is the one
save-all-dirty-and-wait entry point for later deployment, run and
terminal features: it waits for pending buffer sync, then runs
file.saveAll {skipConflicts: true}; one toast per failed file.

Engine: file.saveAll takes skipConflicts and returns skipped; Buffers
tracks buffers in conflict with their file and the hash of the last
read/written content, so our own save reported late is not a conflict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 21:01:12 +02:00
danny
228669036c PM: merge M3.7 robust CLI test deadlines
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:57:42 +02:00
danny
e1638af88a M3.7: robust CLI test deadlines
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>
2026-10-20 20:57:16 +02:00
danny
04a546bf00 PM: merge M3.8 MCP server
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:53:02 +02:00
danny
0e56c22b66 M3.8: MCP server lutra mcp
- 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>
2026-10-20 20:43:12 +02:00
danny
51eba0b3cb PM: merge M3.2 deterministic supervision tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:27:01 +02:00
danny
d4e1ba0981 PM: merge M3.9 hamburger app menu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/architecture.md
#	docs/gaps.md
2026-10-19 18:26:05 +02:00
danny
6a844489e8 M3.2: deterministic supervision tests
The give-up test raced its queued request's 5 s timeout against five
restarts under load. Test options now use request and initialize
timeouts far beyond any restart sequence and the 60 s event wait, the
queued request gets an explicit long timeout, the crash test waits for
the reopened text instead of assuming no live change slips in before the
restart, and the echo callback and shutdown bounds get margin.
Five runs in a row with 16 busy loops in parallel: all green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:23:56 +02:00
danny
27ad30369c M3.9: hamburger app menu
A slim header bar in MainLayout with a menu button (Lucide menu) whose
dropdown lists every command with a menuPath, grouped File, Edit, View,
Go, Help, with shortcuts and dimmed disabled entries. Keyboard: arrows,
Home/End, Enter/Space, Escape/Tab, type-ahead. menu.open (Alt+M) opens
it, also over uiCommand. It is an exclusive modal and a launcher under
the one-modal rule. Menu paths for the user-facing engine and UI
commands (buffer.close as File/Close Tab). Catalog strings, Vitest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:23:13 +02:00
danny
9dc718205c PM: merge M3.1 PHP detection and Phpactor download
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 17:55:03 +02:00
danny
50f36cce8b M3.1: PHP detection and pinned Phpactor download
- 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>
2026-10-18 11:30:57 +02:00
danny
78709dd76b PM: merge M3.2 LSP client core
Some checks failed
ci / ci (macos-15) (push) Has been cancelled
ci / ci (ubuntu-24.04) (push) Has been cancelled
ci / ci (windows-2025) (push) Has been cancelled
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/architecture.md
#	docs/gaps.md
2026-10-18 11:25:24 +02:00
danny
81831c90e0 M3.2: LSP client core (framing, supervision, requests, document sync)
crates/lsp is now a library: Content-Length JSON-RPC framing over stdio
(32 MiB cap, malformed frames dropped and reported, fuzzed), Server::spawn
with initialize/initialized (utf-16, incremental sync, completion, hover,
signatureHelp, definition, references, rename, publishDiagnostics),
typed requests with timeouts and $/cancelRequest, answers to server
requests (configuration nulls, MethodNotFound), events on a bounded
channel, supervision with backoff restarts that reopen documents and
give up after 5 crashes in 2 min, shutdown/exit, and incremental
document sync from lutra_text edits. Tested against a scripted fake
server binary; docs: architecture, G6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 00:57:10 +02:00
danny
1a1eedd21e PM: feature breadth inventory and milestones M7-M9
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 00:56:29 +02:00
danny
caba1a8497 PM: merge M3.7 lutra CLI and single instance
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 00:23:45 +02:00
danny
9b278099cf M3.7: lutra CLI and single instance
- 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>
2026-10-18 00:23:09 +02:00