share DaemonBus between backend and kernel, fix terminal spawn timing
test / unit + widget + golden + a11y (push) Failing after 28s
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

The IsolateClient and KernelServices now share the same DaemonBus.
Previously, backend events (pane.output, git.changed) went to a
separate bus that widgets couldn't see.

ClaudePane._spawnWhenReady waits for ProjectOpened before sending
pane.spawn, preventing "No project active" errors.

Recents loaded before runApp so the welcome screen shows them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jeroen Schweitzer
2026-04-26 17:17:17 +02:00
co-authored by Claude Opus 4.6
parent 243a92798c
commit baf90270d1
4 changed files with 131 additions and 103 deletions
+9 -1
View File
@@ -57,11 +57,12 @@ Future<void> main() async {
// Phase 1: resolve toolchain (binary availability only, no workspace).
// Phase 2: openProject() initializes services when a project opens.
const workspace = String.fromEnvironment('CLIDE_WORKSPACE');
final sharedBus = DaemonBus();
final backend = kIsWeb ? null : await Backend.spawn(
hintRoot: workspace.isNotEmpty ? workspace : null,
clientFactory: (backendPort) => IsolateClient(
log: Logger(),
events: DaemonBus(),
events: sharedBus,
backendPort: backendPort,
),
);
@@ -82,6 +83,7 @@ Future<void> main() async {
onValidateProject: backend != null
? (path) => backend.validateProject(path)
: null,
sharedBus: backend != null ? sharedBus : null,
);
// Register every built-in. Tier 0 activates only the four that do
@@ -120,6 +122,12 @@ Future<void> main() async {
await services.extensions.activateAll();
// Load recents before runApp so the welcome screen shows them.
// project.open triggers backend.openProject which initializes services.
if (!kIsWeb) {
await services.project.loadRecents();
}
runApp(ClideApp(services: services));
}