Commit graph

7 commits

Author SHA1 Message Date
danny
b11c688c71 PM: merge M1.2 vfs with notify watching
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	Cargo.toml
#	docs/gaps.md
#	docs/target-app-parity.md
2026-10-14 20:03:25 +02:00
danny
3f190a635e M1.2: native file watching via notify
- notify 8.2.0 (CC0-1.0) behind the existing Watcher API, allowed by a
  crate-scoped [[licenses.exceptions]] entry in deny.toml (owner
  decision 2026-10-14, noted in AGENTS.md and NOTICE).
- Native notifications only mark directories dirty; after 100 ms of
  quiet (at most 10 intervals) dirty dirs are rescanned and diffed, so
  events, debouncing and rename pairing match the polling backend.
- Polling stays as fallback when the native watcher cannot start, and
  per directory when a native watch is refused. Lost events or watcher
  errors trigger a full rescan; root loss is checked on every tick.
- Additive API: WatchOptions::backend (Auto, Polling) and
  Watcher::is_native.
- Watch tests run on both backends (34 vfs tests on Windows).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:43:15 +02:00
danny
5d49b57b9c M1.2: vfs with ignore rules, polling watcher and safe file IO
- Project::open canonicalises the root (no \?\ prefix on Windows where
  safe); typed errors for missing and non-directory paths.
- Lazy children(dir): dirs first, case-insensitive; kind, ignored flag
  and role (vendor/ library, node_modules/ excluded, .git hidden).
- Ignore rules via the ignore crate: .gitignore, .ignore,
  .git/info/exclude, global git excludes, with git precedence.
- Watcher: std-only polling (100 ms, watched dirs only) with
  create/modify/remove/rename events and a Failed event on root loss.
  notify is CC0-1.0 and fails cargo deny; owner decision pending.
- read_text with a 32 MiB cap, UTF-8 + BOM, typed InvalidUtf8 and
  UnsupportedEncoding; write_atomic via temp file + rename, keeping
  permissions and refusing read-only files.
- 28 tests on temp dirs (30 on Unix: permission and symlink write tests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:24:02 +02:00
danny
5dac918b14 M1.1: text buffer with UTF-16 positions, edit batches and line endings
lutra-text gets Buffer on a ropey rope: byte/char/UTF-16/line counts,
byte offset <-> (line, column) in UTF-16 code units or chars, absolute
UTF-16 offsets, atomic Edit batches in LSP TextEdit[] semantics, and
\n / \r\n / \r detection with a keep-the-file's-ending save policy.
All conversions return TextError instead of panicking.

ropey 1.6.1 (MIT) without unicode_lines, so only the LSP/CodeMirror
line breaks split lines. proptest moves into workspace deps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:20:18 +02:00
danny
a3f83102f1 M0.7: control channel over JSON lines
lutra_control::start binds 127.0.0.1:PORT and serves app.ping,
engine.execute, engine.listCommands and ui.screenshot through the Backend
trait the host implements. Lines are capped at 16 MiB, every input gets a
well-formed response with a stable error code, and backend panics become
internal errors. Proptests cover arbitrary lines; a TCP integration test
uses the new testkit EngineBackend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 06:47:30 +02:00
danny
b382f9fae7 M0.6: command registry, guard, theme tokens, app.about and app.quit
Command trait with static spec, enabled check and run; Registry rejects
duplicate ids; Engine::execute runs every command inside the guard, which
turns panics into EngineError::Internal and keeps the engine usable.
Effects (Quit) are applied by the host. Theme tokens for Lutra Dark and
Lutra Light render as --lt-* CSS variables and a webview init script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 06:40:15 +02:00
danny
b10a2a72f9 M0.1: Cargo workspace with layered crates
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>
2026-10-13 20:24:06 +02:00