Regression (from #148, commit 1fa320a)
Auto-ingest and startup status updates stopped working immediately at plugin init. Two root causes:
1. status.ts write() drops all unscoped publishes
The if (!sid) return; guard introduced in #148 silently drops all status updates before a session exists. The TUI home view subscribes to the unscoped brain service channel, so it receives nothing until a session is created. Pre-#148, write() fell through to sid ? scoped.forSession(sid) : scoped.
2. Auto-ingest deferred to session.created
Previously auto-ingest was immediate fire-and-forget at plugin init. #148 moved it to the session.created event handler, delaying ingest until a session opens.
Fix
status.ts: Remove if (!sid) return; guard, restore unscoped fallback const target = sid ? scoped.forSession(sid) : scoped;
four-opencode-brain.ts: Move auto-ingest back to immediate fire-and-forget at plugin init (keep session.created handler for session ID capture only)
Regression (from #148, commit 1fa320a)
Auto-ingest and startup status updates stopped working immediately at plugin init. Two root causes:
1.
status.ts write()drops all unscoped publishesThe
if (!sid) return;guard introduced in #148 silently drops all status updates before a session exists. The TUI home view subscribes to the unscopedbrainservice channel, so it receives nothing until a session is created. Pre-#148,write()fell through tosid ? scoped.forSession(sid) : scoped.2. Auto-ingest deferred to
session.createdPreviously auto-ingest was immediate fire-and-forget at plugin init. #148 moved it to the
session.createdevent handler, delaying ingest until a session opens.Fix
status.ts: Removeif (!sid) return;guard, restore unscoped fallbackconst target = sid ? scoped.forSession(sid) : scoped;four-opencode-brain.ts: Move auto-ingest back to immediate fire-and-forget at plugin init (keep session.created handler for session ID capture only)