Skip to content

feat(agentic,web-ui): user steering with pending queue and agent runtime refactor#610

Merged
bobleer merged 1 commit intoGCWing:mainfrom
bobleer:feat/user-steering-pending-queue-agent-runtime-refactor
May 8, 2026
Merged

feat(agentic,web-ui): user steering with pending queue and agent runtime refactor#610
bobleer merged 1 commit intoGCWing:mainfrom
bobleer:feat/user-steering-pending-queue-agent-runtime-refactor

Conversation

@bobleer
Copy link
Copy Markdown
Collaborator

@bobleer bobleer commented May 8, 2026

Summary

  • Mid-turn user steering: Users can now send messages to the agent while it is still processing. A PendingQueuePanel above the chat input shows queued messages; each card supports inline edit, immediate "send now" injection, and delete. The backend coordinator/scheduler handles steering injection without aborting the active round.
  • Agent runtime cleanup: Removed the orphan ModelRound struct and model_round.rs module (lifecycle was already fully tracked by the execution engine). Simplified DialogTurn — only TurnStats and the new_turn_id helper remain; the on-disk session shape is unchanged.
  • Frontend additions: UserSteeringBubble renders steering messages as normal user bubbles inside the active model round; modelRoundItemGrouping groups flow items by model round for efficient virtualised rendering; PendingQueueModule manages client-side queue state.
  • AI adapter hardening: Anthropic stream handler and tool-call accumulator improvements.
  • Other: MCP reconnect / interaction fixes, snapshot dedup/reference-safety, theme colour tweaks, i18n updates (pending-queue and steering keys; remove stale error keys), remove deprecated SessionConfig option.

Changed files (129 total)

Area Highlights
src/crates/core/src/agentic/ execution engine, coordinator, scheduler, dialog_turn, tools, session, persistence
src/crates/ai-adapters/ Anthropic stream, tool-call accumulator
src/crates/core/src/service/ MCP server, snapshot, project context, search, workspace
src/apps/desktop/src/api/ agentic, btw, commands, config, search, snapshot, tool, workspace APIs
src/web-ui/src/flow_chat/ PendingQueuePanel, UserSteeringBubble, modelRoundItemGrouping, PendingQueueModule, FlowChatManager, store
src/web-ui/src/infrastructure/ AgentAPI, SessionConfig, themes
src/web-ui/src/locales/ en-US, zh-CN, zh-TW — flow-chat, errors, session-config

Test plan

  • Run pnpm run lint:web && pnpm run type-check:web && pnpm --dir src/web-ui run test:run
  • Run cargo check --workspace && cargo test --workspace
  • Manually test: queue a message while agent is running, verify it appears in PendingQueuePanel, edit / delete / send-now all work
  • Verify steering bubble appears in the correct model round in the chat view
  • Verify existing agent sessions load and run without regression

…ime refactor

Backend changes:
- Remove orphan ModelRound struct and model_round.rs module; the actual
  round lifecycle is fully tracked through execution engine state
- Simplify DialogTurn / DialogTurnState — only TurnStats and new_turn_id
  helper survive; on-disk shape lives in SessionState as before
- Refactor execution engine, round_executor, and stream_processor to align
  with the simplified runtime model
- Add user-steering support in coordinator and scheduler: mid-turn messages
  from the user can be injected without aborting the current round
- Improve agentic tool pipeline (pipeline/tool_pipeline.rs, types.rs),
  deep-review policy, and review specialist agents
- Anthropic stream handler and tool-call accumulator hardening
- MCP server manager reconnect and interaction improvements
- Snapshot service dedup / reference-safety fixes
- Various service cleanups: session manager, persistence, side_question,
  project context, search, workspace

Frontend changes:
- Add PendingQueuePanel: shows queued user messages above the chat input;
  supports inline edit, "send now" mid-turn steering, and delete
- Add UserSteeringBubble: renders a user-steering flow item as a normal
  user bubble inside the active model round
- Add PendingQueueModule: manages per-session pending message queue state
- Add modelRoundItemGrouping: groups consecutive flow items by model round
  for virtualised rendering
- Update FlowChatManager, EventHandlerModule, TextChunkModule, and
  MessageModule to handle steering events and pending queue lifecycle
- Update modernFlowChatStore and FlowChatContext for new item types
- Update AgentAPI with steering / queue endpoints
- Update flow-chat types with FlowUserSteeringItem
- Update AgentCompanionDesktopPet click-through and pixel-pet UI
- Update ChatInput / ChatInputPixelPet for queue-aware send behaviour
- Theme minor colour fixes across all presets
- i18n: add pending-queue and steering keys for en-US, zh-CN, zh-TW;
  remove stale error keys
- Remove deprecated SessionConfig option and related locale keys
@bobleer bobleer merged commit 63a7d54 into GCWing:main May 8, 2026
4 checks passed
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.

1 participant