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
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:
@@ -197,11 +197,14 @@ class _FileRow extends StatelessWidget {
|
||||
|
||||
void _openFile(BuildContext context, String path) {
|
||||
final kernel = ClideKernel.of(context);
|
||||
// editor.open is a Tier-2 command; the registry's contract takes
|
||||
// a positional argv, so pass the path as argv[0]. Response is
|
||||
// ignored — until the editor extension registers the handler,
|
||||
// execute() returns a not-found error.
|
||||
unawaited(kernel.commands.execute('editor.open', args: [path]));
|
||||
// editor.open is a daemon-side IPC handler (lib/src/daemon/
|
||||
// editor_commands.dart), not a kernel command. Fire the request
|
||||
// and let the editor extension's controller pick up the
|
||||
// editor.active-changed / editor.opened event — no need to await
|
||||
// or handle the response here.
|
||||
unawaited(
|
||||
kernel.ipc.request('editor.open', args: {'path': path}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user