Skip to content

feat(desktop): enhanced message pill instead of action pill#44

Draft
github-actions[bot] wants to merge 13 commits intomainfrom
message-pill
Draft

feat(desktop): enhanced message pill instead of action pill#44
github-actions[bot] wants to merge 13 commits intomainfrom
message-pill

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Summary

Auto-generated PR for branch message-pill

Changes

  • enhanced message pill instead of action pill

This PR was automatically created. Please update the description with relevant details.

@dang-hai dang-hai changed the title enhanced message pill instead of action pill feat(desktop): enhanced message pill instead of action pill Jan 20, 2026
Hai and others added 12 commits January 21, 2026 01:52
- move MessagePill to features/action-pill/ alongside ActionPill
- add MessagePill Zustand store with input, sending state, history
- add MessagePillService for sending messages via codingAgentAPI
- integrate with ActionPill's highlighted agent for targeted messaging
- add MessagePillPresentation component (container/presentation split)
- add visual feedback: target indicator, sending spinner, disabled state
- add 18 unit tests for MessagePill store and selectors
- resolve merge conflicts from origin/main

Co-Authored-By: Claude <noreply@anthropic.com>
…annel

- Add ToolCompletionService to auto-dismiss actions when tools complete
- Listen for tool:complete and tool:error events from both SDK and terminal
- Match events to actions via toolUseId and dismiss with 500ms visual feedback
- Add PostToolUse hook support for terminal-based agents
- Refactor MessagePill to use MessageChannel abstraction
- Add useActiveAgent hook for channel management
- Add dismissingActions state for visual feedback during dismissal

Co-Authored-By: Claude <noreply@anthropic.com>
- Rename activeActionIndex to selectedAgentId for explicit selection semantics
- Selection is now independent of action pill state - any agent can be selected
- Add selectAgent(agentId) and clearSelection() methods to store
- Rename cycleActiveAgent to cycleSelectedAgent
- Rename useActiveAgent hook to useSelectedAgent
- Export useAgentSelection hook for view-aware channel selection
- Add click-to-select on agent nodes via AgentNodePresentation
- Selection persists across expand/collapse cycles
- Canvas highlighting falls back to first action if selected agent has no actions

Co-Authored-By: Claude <noreply@anthropic.com>
Add failing acceptance tests that define the contracts for:
- Orchestrator persistence layer (SQLite)
- OrchestratorService (CLI + MCP)
- OrchestratorPillStore (UI state)

These tests will guide the implementation (TDD red phase).

Co-Authored-By: Claude <noreply@anthropic.com>
Add SQLite tables and methods for orchestrator conversations:
- orchestrator_conversations table with id, created_at, updated_at
- orchestrator_messages table with tool_calls JSON storage
- Foreign key cascade for clean deletion
- All 12 persistence tests now pass

Co-Authored-By: Claude <noreply@anthropic.com>
Add OrchestratorService that:
- Spawns Claude CLI with stream-json output
- Executes MCP tools via ICanvasStateProvider
- Handles streaming response chunks
- Persists conversations to database
- All 15 service tests now pass

Co-Authored-By: Claude <noreply@anthropic.com>
Add Zustand store for orchestrator chat UI:
- State: conversationId, messages, inputValue, streaming, health
- Actions: initialize, sendMessage, setInputValue, reset
- Selectors: selectCanSend, selectHasInput, selectCliAvailable
- All 16 store tests now pass (total: 236 tests passing)

Co-Authored-By: Claude <noreply@anthropic.com>
Phase 3: Wire up IPC between renderer and main process:
- Add orchestratorAPI to preload.ts with streaming support
- Create ipc.ts with handler registration for all orchestrator channels
- Create IPCCanvasStateProvider for main->renderer canvas queries
- Add useCanvasStateRequestHandler hook for renderer-side handling
- Initialize OrchestratorService in main.ts

All 236 tests passing.

Co-Authored-By: Claude <noreply@anthropic.com>
Integrate useCanvasStateRequestHandler hook in Canvas.tsx to enable
orchestrator MCP tools to query and manipulate canvas state:
- Add addAgentForOrchestrator callback that creates agents via
  canvasNodeService with git info lookup
- Add deleteAgentForOrchestrator callback that finds and removes
  agent nodes by agentId
- Register handlers with useCanvasStateRequestHandler hook

This completes the IPC bridge allowing the orchestrator to:
- List all agents on the canvas
- Create new agent nodes programmatically
- Delete agent nodes by ID

Co-Authored-By: Claude <noreply@anthropic.com>
Update MessagePill to use orchestratorPillStore instead of the old
messagePillStore. Messages are now sent to Claude CLI via the
orchestrator API instead of targeting specific agent nodes.

Data flow:
  MessagePill → orchestratorAPI → OrchestratorService → Claude CLI
  → MCP tools → IPCCanvasStateProvider → Canvas actions

Co-Authored-By: Claude <noreply@anthropic.com>
Add canvas/get_agent_session MCP tool that allows the orchestrator to
fetch detailed session data (recent messages) for a specific agent.

Changes:
- Add AgentSessionData and AgentSessionMessage interfaces
- Extend AgentSummary with summary, initialPrompt, sessionId, agentType
- Add getAgentSession to ICanvasStateProvider interface
- Implement in IPCCanvasStateProvider
- Add handler in preload.ts and useCanvasStateRequestHandler
- Implement session fetching in Canvas.tsx via codingAgentAPI

This enables answering questions like "what is each agent doing?" by:
1. First listing agents with canvas/list_agents (includes summaries)
2. Then fetching detailed session for specific agents as needed

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants