Skip to content

feat: persistent background task history (Phase 7c)#12354

Closed
roomote-v0[bot] wants to merge 2 commits into
mainfrom
feature/phase-7c-background-task-history
Closed

feat: persistent background task history (Phase 7c)#12354
roomote-v0[bot] wants to merge 2 commits into
mainfrom
feature/phase-7c-background-task-history

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 7c: Persistent Background Task History). Feedback and guidance are welcome.

Changes

Schema

  • Added background: boolean (optional) field to HistoryItem in packages/types/src/history.ts
  • Added interrupted to the status enum (active | completed | delegated | interrupted) across all type definitions
  • Updated CreateTaskOptions, TaskOptions, and TaskMetadataOptions to accept interrupted status

Backend

  • taskMetadata.ts: Added background option, propagated into HistoryItem creation
  • TaskHistoryStore.ts: Added markInterruptedBackgroundTasks() method that runs during initialize() to detect background tasks stuck in active state (e.g., VS Code closed mid-execution) and mark them as interrupted
  • Task.ts: Extended initialStatus type to include interrupted

UI

  • TaskItemFooter.tsx: Added visual indicators for background tasks (Layers icon) and interrupted tasks (AlertTriangle icon with warning color)
  • useTaskSearch.ts: Added showBackgroundTasks filter state (default: show) with filtering logic
  • HistoryView.tsx: Added filter dropdown to toggle background task visibility (All Tasks / Foreground Only)

CLI

  • Updated TaskHistoryItem and HistoryResult types to include interrupted status and background field

i18n

  • Added English translation keys: backgroundTag, interruptedTag, showBackgroundTasks, hideBackgroundTasks, and filter.*

Tests

  • Added 4 tests for TaskItemFooter (background tag, no background tag, interrupted tag, active background tag)
  • Added 2 tests for useTaskSearch (shows background tasks by default, hides when toggled)
  • Added 3 tests for TaskHistoryStore (marks active bg tasks as interrupted, skips completed bg tasks, skips non-bg active tasks)

All 56 new and existing tests pass.

Interactively review PR in Roo Code Cloud

- Add background field to HistoryItem schema
- Add interrupted status for background tasks stopped mid-execution
- Add background option to TaskMetadataOptions
- Detect and mark interrupted background tasks on TaskHistoryStore init
- Add showBackgroundTasks filter to useTaskSearch hook
- Add background task filter toggle to HistoryView UI
- Add background/interrupted visual indicators in TaskItemFooter
- Add i18n translation keys for background task labels
- Add unit tests for all changes
@easonLiangWorldedtech
Copy link
Copy Markdown

@roomote Please fix the translation

@roomote-v0
Copy link
Copy Markdown
Contributor Author

roomote-v0 Bot commented May 12, 2026

Fixaroo Clock   See task

Added missing i18n translations for background task history keys (backgroundTag, interruptedTag, showBackgroundTasks, hideBackgroundTasks, filter.*) to all 17 non-English locale files. All checks passed.

View commit | Revert commit

Add backgroundTag, interruptedTag, showBackgroundTasks, hideBackgroundTasks,
and filter.* keys to all 17 non-English locale files (ca, de, es, fr, hi,
id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW).
@roomote-v0
Copy link
Copy Markdown
Contributor Author

roomote-v0 Bot commented May 12, 2026

Closing in favor of consolidated PR #12356 which merges all Phase 7 work into a single PR as requested.

@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