Skip to content

feat: Phase 6b/6c - Tab/Panel Switching & Real-time Progress Streaming for Background Tasks#12346

Closed
roomote-v0[bot] wants to merge 6 commits into
mainfrom
feature/phase-6b-tab-panel-switching
Closed

feat: Phase 6b/6c - Tab/Panel Switching & Real-time Progress Streaming for Background Tasks#12346
roomote-v0[bot] wants to merge 6 commits into
mainfrom
feature/phase-6b-tab-panel-switching

Conversation

@roomote-v0
Copy link
Copy Markdown
Contributor

@roomote-v0 roomote-v0 Bot commented May 12, 2026

This PR attempts to address Issue #12330 (Phase 6b: Tab/Panel Switching). Feedback and guidance are welcome.

Summary

Implements Phase 6b of the parallel agent execution enhancement, building on top of Phase 6a (conversation replay). This adds a dedicated BackgroundTaskView as a full tab in the webview, with navigation between a task list and the replay view.

What's included

New components:

  • BackgroundTaskView -- Full-tab container managing navigation between sub-views (list and replay)
  • BackgroundTasksList -- Displays subtasks from task history with status badges (Running/Completed/Delegated), mode labels, timestamps, and cost info

Tab infrastructure:

  • New bgTask tab type in App.tsx with routing
  • backgroundTasksButtonClicked command registered in package.json (sidebar overflow menu + editor title menu)
  • Command handler in registerCommands.ts that sends action to webview
  • Type updates in @roo-code/types for the new action and tab values

Navigation flow:

  1. User clicks "Background Tasks" in the sidebar/editor overflow menu
  2. App switches to tab === "bgTask" showing BackgroundTaskView
  3. BackgroundTaskView starts on BackgroundTasksList (task list with status indicators)
  4. Clicking a task navigates to BackgroundTaskReplayView (from Phase 6a)
  5. "Back" button returns to the task list; "Back to chat" returns to the foreground task

Key design decisions:

  • Foreground task state is preserved (ChatView remains mounted with isHidden)
  • Background tasks are filtered from taskHistory by parentTaskId presence
  • Current foreground task is excluded from the background tasks list
  • Ready for Phase 6c (BackgroundTaskLiveView) -- sub-view routing is extensible

Tests

30 tests across 5 test files (all passing):

  • BackgroundTasksList.spec.tsx (8 tests) -- empty state, filtering, click handling, status badges, truncation
  • BackgroundTaskView.spec.tsx (5 tests) -- list/replay navigation, header visibility, close behavior
  • App.spec.tsx (2 new tests) -- bgTask tab switching and return to chat
  • Existing Phase 6a tests remain green (7 replay + 3 backend = 10 tests)

What's deferred to Phase 6c+

  • Real-time progress streaming (BackgroundTaskLiveView)
  • Active task badge/count on the tab icon
  • Write-capable background tasks + file locking (Phase 7)
  • Persistent background task history (Phase 7)

Interactively review PR in Roo Code Cloud

roomote added 5 commits May 12, 2026 12:43
Addresses Issue #12330 Phase 6 planning discussion. Covers:
- Conversation replay (6a)
- Tab/panel switching (6b)
- Real-time progress streaming (6c)

Includes feasibility analysis, priority recommendations, and
detailed design with message types, component structure, and
testing strategy.
- Add requestBackgroundTaskMessages/backgroundTaskMessages message types
- Add extension handler to load task messages from disk via readTaskMessages
- Create BackgroundTaskReplayView component (read-only ChatRow wrapper)
- Wire up bgTaskReplay tab in App.tsx with switchTab support
- Add extension handler tests (3 tests)
- Add component tests (7 tests)
Add a dedicated BackgroundTaskView as a full tab in the webview, with a
new tab bar icon entry point. Users can navigate between BackgroundTasksList
(showing all subtasks with status badges, mode, and timestamps) and
BackgroundTaskReplayView (from Phase 6a) without disrupting the foreground
task state.

Changes:
- Add backgroundTasksButtonClicked command type and registration
- Add BackgroundTaskView container component with list/replay sub-views
- Add BackgroundTasksList component showing subtasks from task history
- Add bgTask tab type to App.tsx routing
- Register command in package.json with sidebar and editor menu entries
- 30 tests across 5 test files (all passing)

Issue #12330 Phase 6b
@easonLiangWorldedtech
Copy link
Copy Markdown

@roomote-v0[bot]

Thanks for opening PR #12346 for Phase 6b.

From the description, it looks like it follows the confirmed design (full BackgroundTaskView tab, navigation via overflow menu, BackgroundTasksList filtered by parentTaskId, preserving foreground state, and reusing the replay view from 6a).

Next step proposal:

Please proceed with Phase 6c: Real-time Progress Streaming next, following the minimal viable scope we confirmed earlier (tool name + status only, last-N rolling window, 500ms throttle, only for the currently viewed background task).

You can open a new PR for 6c when ready. After 6c is done, we can mark 6a and 6b as ready for review together.

Let me know if you see any blockers or need to adjust the scope of 6c before starting.

@roomote-v0
Copy link
Copy Markdown
Contributor Author

roomote-v0 Bot commented May 12, 2026

Fixaroo Clock   See task

Implemented Phase 6c: Real-time Progress Streaming for background tasks. All local checks (lint, type-check, 43 tests) passed.

View commit | Revert commit

…tasks

Add BackgroundTaskLiveView component with compact tool-name + status display,
backgroundTaskProgress message type, emitBackgroundProgress in Task.ts with
500ms throttle and last-20 rolling window, scoped to currently viewed task only.

Changes:
- Add BackgroundTaskUpdate interface and backgroundTaskProgress message type
- Add subscribeToBackgroundTask/unsubscribeFromBackgroundTask webview messages
- Add viewedBackgroundTaskId tracking to ClineProvider
- Add emitBackgroundProgress method to Task.ts with 500ms throttle, 5-per-batch cap
- Hook progress emission into presentAssistantMessage.ts (tool start, complete, error)
- Create BackgroundTaskLiveView webview component with rolling update window
- Update BackgroundTaskView to route active tasks to live view, completed to replay
- 10 new tests across 3 test files (all passing)

Issue #12330 Phase 6c
@easonLiangWorldedtech
Copy link
Copy Markdown

@roomote please update the pr title, 6b and 6c is in same pr.

@roomote-v0
Copy link
Copy Markdown
Contributor Author

roomote-v0 Bot commented May 12, 2026

Fixaroo Clock   See task

Updated PR title to feat: Phase 6b/6c - Tab/Panel Switching & Real-time Progress Streaming for Background Tasks to reflect that both Phase 6b and 6c are included in this PR.

@roomote-v0 roomote-v0 Bot changed the title feat: Phase 6b - Tab/Panel Switching for Background Tasks feat: Phase 6b/6c - Tab/Panel Switching & Real-time Progress Streaming for Background Tasks May 12, 2026
@roomote-v0
Copy link
Copy Markdown
Contributor Author

roomote-v0 Bot commented May 12, 2026

Closing as part of PR restructuring per issue #12330. This work will be combined into the new Remaining Phases (4+5+6) PR with proper stacked branching.

@roomote-v0 roomote-v0 Bot closed this May 12, 2026
@github-project-automation github-project-automation Bot moved this from New to Done in Roo Code Roadmap May 12, 2026
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