Skip to content

FlowChat Interaction Improvements & Subagent Timeout Control#529

Merged
limityan merged 4 commits intoGCWing:mainfrom
limityan:yanzhn/fix
Apr 25, 2026
Merged

FlowChat Interaction Improvements & Subagent Timeout Control#529
limityan merged 4 commits intoGCWing:mainfrom
limityan:yanzhn/fix

Conversation

@limityan
Copy link
Copy Markdown
Collaborator

FlowChat Interaction Improvements & Subagent Timeout Control

FlowChat UI enhancements, dynamic subagent timeout controls, and concurrent task status sync fix.

Changes

feat(flow-chat): clickable turn header + sticky task indicator

  • Clickable FlowChatHeader center area to jump to current turn top
  • StickyTaskIndicator component + useVisibleTaskInfo hook for viewport-aware task navigation
  • Minor style fixes (cursor: pointer, git-branch descender padding)

feat: subagent live elapsed time with adjustable timeout

  • useLiveElapsedTime / useSubagentTimeoutControl hooks for real-time timeout tracking and control
  • ToolTimeoutIndicator component with [∞] toggle and extend popover
  • set_subagent_timeout Tauri command + coordinator SubagentTimeoutHandle for dynamic deadline adjustment
  • Integrated into TaskToolDisplay, TerminalToolCard, and TaskDetailPanel

feat(flow-chat): increase expanded preview max height

  • Split preview max-height into streaming (88px) and expanded variants:
    • FileOperation: 330px expanded for diff reading
    • Terminal: 286px expanded for output reading
  • Uses max-height so shorter content shrinks naturally
  • Removed obsolete DEEP_REVIEW_USAGE_GUIDE.md and PHASE2_DYNAMIC_CONCURRENCY_PLAN.md

fix(web-ui): sync TodoWrite card status with DialogTurn.todos

  • Fixed stale status when expanding older TodoWrite cards during concurrent task execution
  • Added useDialogTurnTodos hook subscribing to merged todo state from FlowChatManager
  • Passed turnId through component tree (FlowToolCard, ModelRoundItem, ExploreGroupRenderer)

Impact

  • src/web-ui/src/flow_chat/ — UI components, hooks, tool cards
  • src/apps/desktop/src/api/ — Tauri commands
  • src/crates/core/src/agentic/coordination/ — Timeout control logic

Verification

  • pnpm run lint:web && pnpm run type-check:web && pnpm --dir src/web-ui run test:run
  • cargo check --workspace && cargo test --workspace

…current tasks

When multiple tasks execute concurrently, each TodoWrite tool call
produces an independent snapshot in toolResult.result.todos. The
TodoWriteDisplay component previously only read from this snapshot,
so expanding an older card showed stale status while newer tasks
were still running.

Fix by subscribing TodoWriteDisplay to DialogTurn.todos via a new
useDialogTurnTodos hook. This data source is maintained by
FlowChatManager.handleTodoWriteResult and always reflects the latest
merged todo state across all concurrent TodoWrite calls.

Changes:
- Add useDialogTurnTodos hook (shallow-diff subscription to store)
- Add turnId to ToolCardProps and FlowToolCard
- Update TodoWriteDisplay to prefer turnTodos over toolResult snapshot
- Pass turnId through ModelRoundItem and ExploreGroupRenderer

Generated with BitFun

Co-Authored-By: BitFun
…ion and terminal tool cards

Split single preview max-height constants into streaming vs expanded variants:

FileOperationToolCard:
- FILE_OPERATION_STREAMING_MAX_HEIGHT (88px) for compact streaming preview
- FILE_OPERATION_DIFF_MAX_HEIGHT (330px) for comfortable diff reading when manually expanded after completion

TerminalToolCard:
- TERMINAL_OUTPUT_STREAMING_MAX_HEIGHT (88px) for compact live output during execution
- TERMINAL_OUTPUT_EXPANDED_MAX_HEIGHT (286px) for comfortable output reading when manually expanded after completion/cancellation

Both use max-height (not fixed height) so content shorter than the limit shrinks naturally without blank space.
- Add useLiveElapsedTime hook for real-time elapsed/remaining tracking
- Add useSubagentTimeoutControl hook for disable/restore/extend logic
- Add ToolTimeoutIndicator shared component with [∞] toggle and extend popover
- Integrate into TaskToolDisplay (with controls) and TerminalToolCard (display only)
- Integrate into TaskDetailPanel
- Add set_subagent_timeout Tauri command with dynamic deadline via watch channel
- Add SubagentTimeoutHandle/SubagentTimeoutAction in coordinator for runtime timeout adjustment
- Add i18n keys for timeout tooltips and restore option

Generated with BitFun

Co-Authored-By: BitFun
- FlowChatHeader center message area is now clickable to jump to current turn top

- Add StickyTaskIndicator component showing nearest Task above viewport

- Add useVisibleTaskInfo hook to detect visible Task via scroll + DOM

- Add data-tool-name attribute to tool items for DOM querying

- Fix FlowChatHeader __git-branch padding cutting descenders (y/g/p)

- Add cursor: pointer to clickable areas

- Add i18n keys for new UI elements

Generated with BitFun

Co-Authored-By: BitFun
@limityan limityan merged commit 1c98cd3 into GCWing:main Apr 25, 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