219 files, 2.0 MB, untracked in souveraine/docs and existing nowhere else. The volume is at 100% with no snapshots.
5.1 KiB
Subconscious Streaming/Fading Line Render
Status: 🔴 Open Priority: High Phase: Implementation
Problem
The subconscious streaming/fading line is not rendering in the TUI. Casey sees the final surfacing outputs in the chat field, but not the temporary streaming tokens as the subconscious reasoning occurs during the N+1 pass.
Desired Behavior
During the subconscious N+1 pass, a live streaming/fading line should appear in the TUI showing the subconscious's actual thinking/reasoning/tool calls in real-time:
⟡ subconscious: reviewing conversation for anomalies...
⟡ subconscious: consulting memory ledger for user energy levels...
⟡ subconscious: tool — read memory/ledger/energy-balance.md
This is transient — it flows while the pass runs and is not persisted in the chat field. Each line fades or scrolls as the next appears.
Implementation
1. Add missing field to ChatState
In src/ui/chat/mod.rs, add the missing field:
pub subconscious_stream: Vec<String>,
2. Wire the event handler
In src/ui/chat/events.rs, the BackendEvent::SubconsciousToken, SubconsciousToolCall, and SubconsciousToolResult handlers already exist (lines 328, 333, 336, 346), but they push to self.subconscious_stream which doesn't exist yet. Wire these handlers to actually append to the new field.
3. Add render path
In src/ui/chat/render.rs, add a render path for the ephemeral subconscious stream. Options:
- Option A: Render as a fading overlay in the main chat area (below the phase bar, above the input)
- Option B: Render as a live-updating region in the phase bar (next to "Subconscious" status)
- Option C: Render as a dedicated streaming section in the cockpit panel (already shows final inner voice, but not live tokens)
The render should:
- Show each new token/tool call/result as it arrives
- Fade older tokens out (e.g., after 3-5 seconds)
- Scroll if the stream exceeds the available space
- Only appear during
TurnPhase::Subconscious
4. Clean up on pass completion
When the subconscious pass completes (BackendEvent::Done or BackendEvent::PrimaryComplete), clear the subconscious_stream so it doesn't persist into the next turn.
Dependencies
src/server/consciousness_engine.rs— emitsSubconsciousToken,SubconsciousToolCall,SubconsciousToolResulteventssrc/ui/chat/events.rs— event handler that referencesself.subconscious_streamsrc/ui/chat/mod.rs— needs the missing fieldsrc/ui/chat/render.rs— needs the render path
Related
docs/tasks/subconscious-live-reasoning-stream.md— broader design for live reasoning ticker and cockpit event logdocs/tasks/subconscious-surfacing-threshold.md— surfacing events into chat field (different concern)
Session Findings (2026-05-22)
Confirmed Pipeline Structure
The subconscious streaming/fading line pipeline exists in three stages:
-
Consciousness Engine (
src/server/consciousness_engine.rs) — During the N+1 pass, it emitsBackendEvent::SubconsciousToken(content),SubconsciousToolCall { name, arguments }, andSubconsciousToolResult { name, output, is_error }events via the stream channel. -
Events Handler (
src/ui/chat/events.rs) — These events are received and pushed toself.subconscious_stream— but the field doesn't exist yet. The code referencesself.subconscious_stream(lines 328, 333, 336, 346) butChatStateinmod.rshas nosubconscious_stream: Vec<String>field. The project doesn't compile because of this. -
Render (
src/ui/chat/render.rs) — The subconscious stream events are not rendered anywhere in the main chat view. TheSubconsciousPassphase is shown as a spinner in the phase bar (TurnPhase::Subconscious), and the final surfacing outputs render asChatMessage::Surfacingbubbles. But the live streaming/fading line of subconscious reasoning as it happens — the ephemeral text you described — doesn't have a render path yet.
The cockpit panel (cockpit_panel.rs) shows the final inner voice and promoted events, but not the live streaming tokens during the pass.
Gap Summary
- Missing field:
subconscious_stream: Vec<String>needs to be added toChatState - Missing render path: The streaming subconscious tokens need to be rendered somewhere — either as a fading overlay in the main chat area, or as a live-updating region in the phase bar, or as a dedicated streaming section
- Event emission exists: The Consciousness Engine already emits the streaming events correctly — no changes needed there
Next Steps
- Add the missing field to
ChatState - Wire the event handlers to actually append to the field
- Add a render path in
render.rsfor the ephemeral stream - Clear the stream on pass completion (in
drain_eventsorDone/PrimaryCompletehandlers)
Confirmed: Compilation Failure
The project does not compile in its current state. The event handlers in events.rs reference self.subconscious_stream (lines 328, 333, 336, 346), but ChatState in mod.rs has no such field. Any attempt to build will fail at these lines. This is the first thing to fix before any render work.