- Banner inside the editor pane for a dirty tab whose file changed
(Reload (discard mine) / Keep mine / Compare) or was deleted (Keep as
unsaved / Close); state in stores/diskConflicts.ts, the old notice is gone.
- Save and save all ask Overwrite / Cancel when the engine refuses with
disk_changed.
- Diff tabs against the disk text (file.readDisk) and a Local History
entry (history.read); "Revert to This" in the caption.
- Show Local History dialog (history.show: tree context menu, palette,
File menu) with Show Diff and an undoable Revert to This.
- History failures warn once until a snapshot works again.
- Docs: docs/local-history.md, G2 in gaps.md, ui-parity, architecture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Pure tab model (components/editor/tabs/model.ts) with Vitest coverage.
- Editor store keeps one buffer sync per buffer and a group layout; a buffer
in both groups shares text and undo. Bulk closes ask once with a list.
- Tab context menu, tabs.* UI commands (COMMAND_IDS) in a Window menu group,
no default shortcuts; Show Local History appears once history.show exists.
- Single click in the tree, Find and Go-to opens preview tabs.
- Layout stored through layout.set and restored on project open.
- Public API for other areas: tabOfPath, tabOf, reloadBuffer, openFile.
- Docs: ui-parity, gaps (G2), architecture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Daniel chose IBM Plex Mono from Amy's comparison of four free fonts. It
ships from @fontsource (Latin and Latin Extended, 400/700 with italics)
and leads font-mono for the editor and the terminal; the UI keeps the
system font. OFL-1.1 is allowed for this one package only
(PACKAGE_EXCEPTIONS in xtask/src/licences.rs, comment in deny.toml).
NOTICE, ASSETS.md and docs/themes.md updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plum Night, River, Paper and Reed (designed by Amy, approved by Daniel)
join the brand pair. theme.list/current/select/import, a picker with
live preview (view.selectTheme) and "Import Theme…" (view.importTheme);
imported themes are validated and stored in <data_dir>/themes. Editor
font family and line height settings apply live. Docs: docs/themes.md.
Gate: fmt, clippy and the rest pass up to cargo test, where only the
unrelated lutra-terminal PTY test a_full_buffer_stops_the_shell timed
out under load; to be re-run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- crates/vcs chunk.rs: chunks of a file (buffer text vs index, HEAD vs
index), a minimal patch applied with git apply --cached, revert as a
byte edit; token refusal when buffer, index or HEAD changed; CRLF
(autocrlf and stored), no final newline, BOM, staged renames, first
commit; binary and untracked refused. Real-git tests + property test.
- engine: git.chunks, git.stageChunk, git.unstageChunk, git.revertChunk
(revert edits the buffer under the lock, undoable in the editor);
cmd::start_then; git.lineChanges shares the vcs line diff.
- UI: chunk popup on a gutter marker click (Stage / Unstage / Revert /
Previous / Next), hollow staged markers, vcs.showChunk, diff viewer
hint, "partly staged" badge in the Changes window.
- Docs: G8 row, Git parity row evidence, ui-parity, architecture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
git.ignore appends one anchored, escaped literal pattern per path to the
work tree root's .gitignore, skipping patterns already there. The Changes
window gets a row context menu (right click, Shift+F10, context-menu key)
with Open and Add to .gitignore.
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>
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>
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>
- 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>
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>
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>
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>
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>
- 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>
- 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>
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>
One popup with Files / Classes / Symbols tabs (Tab switches), opened by
goto.fileOpen (Mod+P), goto.classOpen (Mod+Alt+C) and goto.symbolOpen
(Mod+T), each with an optional {query} for agents. Live debounced query
against goto.* with stale answers dropped, matched characters marked,
directory / namespace / container column, library rows labelled, an
indexing hint with progress and a re-query on indexReady. Enter or a
click opens through editor.reveal; Escape closes. An exclusive modal and
a launcher: any other command closes it.
goto.file items now carry `library` (PM decision). indexProgress and
indexReady join the ipc event union. Notes in plan/phpstorm/08-goto.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Engine: every open PHP buffer keeps a tree-sitter tree, reparsed
incrementally on a worker thread off the engine lock (200 ms debounce,
edit batches recorded by buffer.edit, full parse when the chain breaks).
syntax.outline {id} returns {items, truncated, version}; outlineChanged
{id} at most every 200 ms per buffer. Replaced trees and outlines are
freed on the worker.
UI: left stripe with Project | Structure in MainLayout, the Structure
tool window (WAI-ARIA tree, Lucide kind icons, signatures, jumps via
editor.reveal), view.toggleStructure on Mod+2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Bottom panel under editor and project tree (resizable, collapsible,
closable) for Find and later tool windows.
- Find store: search.find with options and include/exclude globs, results
streamed and sorted by file, events held until the searchId answer, a
new search cancels the running one, refused queries shown in place.
- Find tool window: toggles, counts, cancel, truncated hint, highlighted
previews, keyboard navigation, Enter or click runs editor.reveal.
- UI command find.open (Mod+Alt+F) with prefill from the selection or the
word at the cursor; find.open {query} from agents searches at once.
- 26 Vitest tests; progress docs and architecture updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Modal rule (ui/src/commands/modals.ts): palette, settings dialog and the
close question are exclusive; opening one closes the other. Running any
command but palette.open (keyboard, palette, uiCommand) closes the
palette. The restore dialog is queued: hidden while another modal is
open, back with its list intact afterwards.
- recovery.restore / recovery.discard emit recoveryResolved {paths}; the
restore dialog drops the settled paths and closes when none are left.
Rust was needed: discard gave the UI no signal, and a restored entry
stays in the journal as the buffer's own entry.
- Dimmed restored text (C2 screenshot 09) was the dialog overlay, not an
editor style; no editor change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
settings.open (Mod+,) opens a dialog built from settings.list: sections,
controls by type (select, number with min/max, switch), catalog labels
and descriptions, search over label, description, key and section, Reset
to default, inline errors, live updates on settingsChanged. The theme
picker switches at once; editor.fontSize drives --lt-font-size-editor
through a token override that survives theme switches. Focus trap,
Escape closes. Finishes M1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Engine: ui.registerCommands (validated, replaces the previous set),
UI commands in listCommands with ui: true and labelKey, running one
through the engine emits uiCommand {id, params}.
- Frontend: ui/src/commands/ (keymap by key code, fuzzy ranking, Pinia
commands store with handlers, recents and error toasts), the command
palette (Mod+Shift+P), UI commands palette.open, settings.open (Mod+,,
disabled until M1.9b) and view.toggleProjectTree (Mod+1). The editor's
shortcuts.ts moved into the global keymap.
- Tests: engine and control-channel tests for registration and
uiCommand, Vitest for keymap, ranking, store, palette and App wiring.
- Docs: architecture, ui-parity, target-app-parity, gaps, roadmap,
ROADMAP, README.
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>
- The parent directory of every open buffer is pinned in the project
watcher (workspace::sync_buffer_dirs after every command): it counts
against the cap but is never evicted while a buffer in it is open, so
reloads and fileChangedOnDisk arrive for never-expanded folders.
- file.open on an already-open buffer emits the new bufferFocused {id};
the editor activates that tab and it outranks pending adoptions.
- The project tree shows a "Listing truncated" note row
(project.tree.truncated) after a partly listed directory.
- Tests: engine (pinning, eviction, focus), control channel
(bufferFocused), Vitest (tab switch, race, truncated row).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dirty buffers are written atomically to <data_dir>/recovery/<project-id>/
about 1 s after the last edit (at most 2 s while typing), from pump_vfs,
never per keystroke. Entries are removed on save, close (also force),
forced project close/open and recovery.discard. project.open emits
recoveryAvailable; recovery.list/restore/discard; restored buffers are
dirty and keep line ending and BOM. Corrupt entries are moved aside and
reported as warning notifications.
UI: restore dialog in ui/src/components/recovery (Restore all, Restore
selected, Discard, time, changed-on-disk hint), catalog keys and runtime
allow-list. Tests: crash/restore with CRLF + BOM, corrupt entries, removal
paths, property test of random edits, headless control-channel test,
Vitest for the dialog. Docs: architecture, parity, gaps, ROADMAP.
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>
- Editor area with tab bar, CodeMirror 6 view, close question and notices
(ui/src/components/editor/, ui/src/stores/editor.ts), mounted in App.vue;
the project tree opens files through the editor store.
- BufferSync: local edits to buffer.edit against the confirmed version,
one call in flight, resync on stale_version or newer bufferChanged with
rebase of unsent changes; EngineText maps CodeMirror positions to engine
UTF-16 offsets for CRLF text.
- Save, save all and close from engine default shortcuts via listCommands.
- Dirty marker, Save / Don't Save / Cancel, non-blocking notice when a
dirty file changes or disappears on disk.
- Vitest: keystroke bursts with stale versions and remote edits (LF and
CRLF), mapping, store and component tests against a fake engine.
- Progress docs: Editor core 8% (est.), depth ~1.4%, G2, ui-parity tabs,
M1 row, architecture, README status.
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>
Left Project tool window (hide/show stripe, pointer and keyboard resize),
editor area placeholder and status bar. Project tree with lazy
project.children listings, WAI-ARIA keyboard navigation, Lucide icons,
dimmed ignored/excluded entries and refresh on TreeChanged. Empty state
runs project.openDialog. Pinia store fed only by engine events and
command results; events come through a local onEngineEvent adapter until
the desktop bridge (M1.4) lands. Lucide via @lucide/vue (the renamed
lucide-vue-next, ISC).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>