register live GUI panes into clide pane list (T-219)

Per D-6 parity / D-83, make the kernel tabs the user sees (Claude,
Files, Editor, viewers) visible to the CLI. The PTY-backed PaneRegistry
can't model widget panes, so rather than mirror state (and risk drift),
pane.list snapshots the kernel PanelRegistry + LayoutArrangement at
request time via an injected view-pane source.

New Flutter-free ViewPane value type + snapshotViewPanes kernel bridge;
the daemonClientFactory now passes the PanelRegistry through so the
dispatcher can read it. pane.list merges PTY panes (source absent) with
UI tabs (source: ui, with slot/title/active/visible).

Acceptance (GUI-open: pane list enumerates live panes) needs a running
app to confirm end-to-end; unit-tested at the snapshot + dispatch level.

Closes T-219 (under T-218 / T-208 'Give Claude hands').

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-03 12:49:57 +02:00
co-authored by Claude Opus 4.8
parent 4508be76ac
commit be06b94754
15 changed files with 264 additions and 15 deletions
+48
View File
@@ -0,0 +1,48 @@
/// A non-PTY pane the user sees in the GUI — a kernel tab (Claude, Files,
/// Editor, a viewer) surfaced so `pane list` reflects the live workspace,
/// not only PTY-spawned panes (T-219, D-6 parity / D-83).
///
/// The PTY-backed [Pane] can't represent these: a tab has no child process.
/// Rather than mirror state into [PaneRegistry] (and risk it drifting from
/// the live UI), the kernel snapshots its `PanelRegistry` into these value
/// objects at request time — `pane.list` reads them through an injected
/// source. Pure data, Flutter-free, so it serialises on the IPC wire and
/// stays usable from `dart test`.
library;
class ViewPane {
const ViewPane({
required this.id,
required this.slot,
required this.title,
required this.active,
required this.visible,
});
/// Stable contribution id (e.g. `claude`, `files`, `editor`) — the same id
/// `pane.focus` would target.
final String id;
/// The slot the tab lives in (`sidebar` / `workspace` / `context`).
final String slot;
/// Display title the user sees on the tab.
final String title;
/// Whether this is the active (front) tab in its slot — the focus state
/// the acceptance asks for.
final bool active;
/// Whether the tab's slot is currently visible (not collapsed/hidden).
final bool visible;
Map<String, Object?> toJson() => {
'id': id,
'kind': 'view',
'slot': slot,
'title': title,
'active': active,
'visible': visible,
'source': 'ui',
};
}