Commit graph

5 commits

Author SHA1 Message Date
danny
e228d11ef9 C1: alpha dry run fixes (Ctrl+C in terminal, ignored colour, find singular)
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
- Terminal: undo an inherited "ignore Ctrl+C" flag before starting a
  ConPTY shell (lutra_proc::enable_ctrl_c). Lutra started by the lutra
  CLI (CREATE_NEW_PROCESS_GROUP) passed it to every shell, so Ctrl+C
  stopped nothing. Test reruns itself with that flag.
- Engine: an edited .gitignore/.ignore reports TreeChanged for its
  folder, so the tree greys newly ignored files (Add to .gitignore).
- Find: "1 match", "1 file" instead of "1 files".
- docs/alpha-checklist.md: steps corrected after the Windows dry run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 18:01:09 +01: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
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
8a71f7bd08 M1.13: watch open buffers' folders, bufferFocused, truncated tree row
- 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>
2026-10-16 16:20:11 +02:00
danny
f1976c7d67 M1.3: engine workspace, file and buffer commands, event stream
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>
2026-10-14 20:24:44 +02:00