wire builtin.editor to the active buffer + open files from the tree
test / unit + widget + golden + a11y (push) Failing after 38s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped

EditorController mirrors the daemon's active buffer into the Flutter
UI. Hydrates on mount (editor.active → editor.read), subscribes to
editor.opened / active-changed / edited / saved / closed, and pushes
local edits back via editor.set-content. A one-shot echo-suppression
flag keeps the daemon's authoritative edit echo from clobbering the
caret the user just moved.

Text surface is EditableText directly — no TextField / Material
import, so D-007's "bare WidgetsApp" guardrail carries into the
editor tab. JetBrainsMono via the shared mono-family constants;
cursor + selection colours come from the theme tokens.

File-tree click now calls ipc.request('editor.open', {path}) instead
of the kernel command registry (which wouldn't have reached the
daemon). The opened file becomes active, the editor tab's controller
sees editor.active-changed, and the text content reconciles.

Linux release bundle still builds; 174 app tests + 74 core tests
stay green.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-04-22 10:31:01 +02:00
co-authored by Claude
parent 50d0143afc
commit 681ce3b447
7 changed files with 419 additions and 10 deletions
+18
View File
@@ -18,6 +18,24 @@ heading, and (b) bumping `project.yaml` `version:` in the same commit.
### Added
- `builtin.editor` — Tier-2 editor tab wired up. Contributes a
single `Editor` workspace tab that renders the daemon's active
buffer via a new `EditorController`. Hydrates on mount
(`editor.active` → `editor.read`), subscribes to
`editor.opened | active-changed | edited | saved | closed`, and
propagates user edits back through `editor.set-content`. Small
echo-suppression guard avoids clobbering the caret when the
daemon's authoritative edit echo comes back. Text surface is
Flutter's `EditableText` primitive — no `TextField` / Material —
so the D-007 "no Material root" stance carries into the editor;
JetBrainsMono via the shared `clideMonoFamily` constants, cursor
+ selection colours bind to the theme.
- File-tree click in `builtin.files` now opens the clicked file in
the editor via `ipc.request('editor.open', {path})`. No local
command hop — the dispatch goes straight to the daemon and the
UI reconciles through the `editor.active-changed` event.
- CLI shortcuts per CLAUDE.md's Tier-2 list: `clide open <path>`,
`clide active`, `clide insert <text | ->`, `clide replace-selection
<text | ->`, `clide save`, `clide tail --events [--filter