replay-latest ValueStream for session state streams (T-386, T-274)

Broadcast streams drop the current value for late subscribers — the
shape behind T-274: the init event fires while spawn() is still
awaiting the transcript-tail read, before the pane subscribes, so the
status bar stayed blank. New pure-Dart ValueStream<T> (no rxdart —
prefer-zero-deps) replays the latest value to each new subscriber;
statusStream, busyStream, and pendingPromptStream in the claude
builtin now use it. busyStream subscribers see the current state
first (seeded false), which the busy test now asserts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 01:05:08 +02:00
co-authored by Claude Fable 5
parent 0e7353bf9c
commit 5f9c054420
8 changed files with 244 additions and 4 deletions
+1
View File
@@ -26,6 +26,7 @@ export 'src/ipc/paths.dart';
export 'src/ipc/schema_v1.dart';
export 'src/panes/event_sink.dart';
export 'src/panes/pane.dart' show Pane, PaneKind;
export 'src/util/value_stream.dart' show ValueStream;
// clideName, clideTagline, clideVersion, clideRepository, clideCommit,
// clideDate live in lib/src/build_info.g.dart, regenerated by every