fix(agent-host): restore agent-dashboard event bridge — chats responsive again#137
Open
ParkerM2 wants to merge 7 commits into
Open
fix(agent-host): restore agent-dashboard event bridge — chats responsive again#137ParkerM2 wants to merge 7 commits into
ParkerM2 wants to merge 7 commits into
Conversation
…RD_EVENTS contracts; drop dead router emits
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ch renderer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tes cache Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…idge Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AgentManagerServicemoved into the utility process, itsrouter.emit(...)calls landed on a no-op shim. Nothing in main re-emitted the host'sAgentManagerEvents onto the renderer-facingAGENT_DASHBOARD_EVENTS.*IPC channels thatuseAgentDashboardEvents/useAgentStream/useSessionThinkingsubscribe to.emitEvent.datapayloads with the IPC contracts, add a newwireAgentDashboardBridgeforwarder inservice-registry, drop the renderer's optimistic user-message write so the host echo is the single source of truth (no duplicate bubbles).Changes
src/main/services/agent-manager/agent-manager-service.ts— reshapeemitEventpayloads forsession.ended,status.changed,stream.event; delete deadrouter.emit(...)calls; drop unusedrouterdep andIpcRouter/AGENT_DASHBOARD_EVENTSimports.src/main/agent-host/index.ts— deletecreateRouterShim, pass{}tocreateAgentManagerService.src/main/agent-host/agent-dashboard-bridge.ts(new) — pureforwardAgentManagerEventmapping +wireAgentDashboardBridgefactory. Hoists therouter.emitbind once outside the event callback.tests/unit/main/agent-host/agent-dashboard-bridge.test.ts(new) — 7 Vitest cases covering all 5 mapped event types + unknown-type ignore + factory subscribe/forward/unsub.src/main/bootstrap/service-registry.ts— wire the bridge betweencreateProjectServiceandcreateCommandBus, before any otheragentHostClient.onEventsubscriber.src/renderer/features/workspace/api/useWorkspace.ts— drop optimisticonMutate/onErrorblocks fromuseWorkspaceSend.src/main/features/agent-dashboard/agent-dashboard-handlers.ts— refresh stale file-header comment to point at the new bridge.Implementation plan:
docs/superpowers/plans/2026-05-14-agent-host-event-bridge.mdDeferred follow-ups (not in this PR)
agentHostClient.sendMessageis fire-and-forget and always returnstrue— failures (no process, dead stdin) silently swallowed.WorkspaceSession.statusis set to'live'immediately after spawn and never tracks host-side process death.src/main/bus/session-manager.ts:71(data?.statusonstatus.changedpayload) — now permanently dead since the payload shape never hadstatus.Test plan
npx tsc --noEmit— cleannpx vitest run tests/unit/main/agent-host/— 7/7 passnpx eslinton all touched files — cleannpm run dev— ADC-Dev boots cleanly, noagent-dashboard.*errors🤖 Generated with Claude Code