make sidebar filter boxes CLI-addressable via the MessageBus (T-270)

The sidebar/dock filter fields (the shared ClideFilterBox) had no CLI
peer — a one-way, UI-only affordance that broke D-6 parity. Add the
drive+observe verb `clide ui filter <address> [<text>]`, routed entirely
through the kernel MessageBus pub/sub so a box reacts to a published
message identically whether the trigger was a UI keystroke or the CLI —
keeping extensions first-class (no dispatcher→widget wiring).

- ClideFilterBox gains an `address`; when set it listens on `filter.set`
  for its address and republishes its value on `filter.state`. Null
  address keeps the box a kernel-free UI widget.
- FilterStateCache (new kernel service) caches the latest `filter.state`
  per address — the bus has no retention, so this backs the observe-half.
- ui.filter: with text → publishes `filter.set` (drive); without →
  reads the cache (observe). Honest toolError when there is no live UI.
- Address every box: decisions/tickets/files/git/output/problems panes,
  the four search boxes, and the pql search/query/markdown inputs.

Addresses are the ids from `clide pane list` (e.g. decisions.panel).
settings.json: allow the `clide` CLI + relevant skills.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-07 12:44:40 +02:00
co-authored by Claude Opus 4.8
parent f813fd4d5a
commit 826395481c
22 changed files with 511 additions and 20 deletions
+9 -1
View File
@@ -98,6 +98,9 @@ Future<void> main() async {
// The kernel MessageBus, captured post-boot so `ui.open` can drive the GUI
// readers (publish a 'selection') from the CLI — the drive-half of D-6 (T-231).
MessageBus? kernelMessages;
// The filter-state cache, captured post-boot so `ui.filter` can read a
// box's current value back — the observe-half of D-6 (T-270).
FilterStateCache? kernelFilterStates;
// IPC socket server (T-99 / T-124, per D-70/71/72). One server per
// workspace; restarted when the active project switches because the
// socket path is workspace-derived. The local DaemonClient connects
@@ -216,7 +219,11 @@ Future<void> main() async {
// `clide ui open <reader> <id|path>` — drive the GUI readers from the CLI
// (T-231, drive-half of D-6). Publishes a 'selection' to the kernel
// MessageBus, captured post-boot; null in headless contexts.
registerUiCommands(dispatcher, () => kernelMessages?.publish);
registerUiCommands(
dispatcher,
() => kernelMessages?.publish,
filterValue: (address) => kernelFilterStates?.get(address),
);
// `clide image show <path>` — drive an image card into the Claude
// conversation log (T-249, drive-half of D-6). Resolves the path
// (workspace-relative → absolute, must exist) here where workRoot is in
@@ -340,6 +347,7 @@ Future<void> main() async {
// only reads it at request time (post-boot), so capturing it here is safe.
kernelReaderNav = services.readerNav;
kernelMessages = services.messages;
kernelFilterStates = services.filterStates;
// Tee the IPC/MCP logger into the shared ring so the output dock (T-54)
// shows socket-side logs alongside kernel/extension ones.
ipcLog.addSink(services.logRing.add);