Skip to content

Conversation

jmalmo
Copy link

@jmalmo jmalmo commented Oct 16, 2025

Related GitHub Issue

Closes: #8366

Description

This feature introduces editable titles for tasks, allowing users to label active work, persist those titles into task history, and search them—while providing a settings toggle and aligning the visual treatment across the UI.

Server ↔️ Webview plumbing

  • Expand HistoryItem with title and update ClineProvider.updateTaskHistory to merge partial updates so existing titles survive incremental syncs; explicitly allow undefined to clear a title.
  • Add a setTaskTitle branch in webviewMessageHandler that normalizes/dedupes task IDs, trims/sanitizes the incoming title, skips no-op updates, persists via updateTaskHistory, and re-syncs the webview state.
  • Thread a persisted taskTitlesEnabled flag through extension messages/state and surface it to the webview context so both chat and history components react to the toggle.

Webview UI

  • Chat header (TaskHeader.tsx): introduce an inline editing experience (VS Code styled input, focus/keyboard handling, hover pencil) gated by the feature flag; when a title exists, display the text with standard weight instead of bolding.
  • History list (TaskItem.tsx): prefer titles when enabled, apply shared truncation/highlight behaviour, and render HTML highlights without the previous font-semibold class so edited titles visually match default entries.
  • History search (useTaskSearch.ts): augment FZF selector to search titles + task prompts, split highlight ranges between title/task, and retain results ordering across sort modes.

Settings & Telemetry

  • Add a “Task titles” checkbox in UISettings that toggles the new flag and emits ui_settings_task_titles_enabled_changed.
  • Ensure initial extension state defaults opt-out and hydrate from cached settings.

Tests & Localization

  • Extend chat header tests to cover editing workflows and disabled states.
  • Update history item and search hooks tests to assert new title/highlight paths and the removal of bold styling.
  • Add localisation strings for add/edit title affordances and the new settings copy.

Test Procedure

  • pnpm vitest webview-ui/src/components/chat/__tests__/TaskHeader.spec.tsx
  • pnpm vitest webview-ui/src/components/history/__tests__/TaskItem.spec.tsx
  • pnpm vitest webview-ui/src/components/history/__tests__/useTaskSearch.spec.tsx
  • (Optional manual) enable “Task titles” in Settings → UI and verify titles can be created/edited in the chat header and task history list without bold styling

Screenshots / Videos

gif roo code

Documentation Updates

  • [ x] No documentation updates are required.
  • Yes, documentation updates are required.

Important

Introduces editable task titles feature with UI support and settings toggle, including backend logic and tests.

  • Behavior:
    • Adds editable task titles feature, controlled by taskTitlesEnabled flag in global-settings.ts and history.ts.
    • Updates ClineProvider to handle task title updates and sync with webview.
    • Adds setTaskTitle and setTaskTitlesEnabled message types in webviewMessageHandler.
  • UI:
    • TaskHeader.tsx: Implements inline editing for task titles with a pencil icon, focus handling, and keyboard shortcuts.
    • TaskItem.tsx: Displays task titles if enabled, with fallback to task text.
    • UISettings.tsx: Adds checkbox to toggle task titles feature.
  • Tests:
    • Extends tests in TaskHeader.spec.tsx, TaskItem.spec.tsx, and useTaskSearch.spec.tsx to cover new title editing and display logic.
  • Localization:
    • Adds strings for task title editing in chat.json and settings.json.

This description was created by Ellipsis for abf7eca. You can customize this summary. It will automatically update as commits are pushed.

@jmalmo jmalmo requested review from cte, jr and mrubens as code owners October 16, 2025 18:49
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Oct 16, 2025
Copy link

roomote bot commented Oct 16, 2025

Review Complete ✅

I've completed a thorough review of this PR. After examining the implementation, tests, and integration points, I found no issues that require changes.

Summary

This PR successfully implements editable task titles with:

  • Proper title preservation logic in updateTaskHistory
  • Feature flag gating throughout the UI
  • Correct search integration with title highlighting
  • Comprehensive test coverage
  • Consistent styling (titles render without bold as requested)
  • Complete localization across all supported languages

The implementation is production-ready and can be merged.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Add editable titles to Roo Code tasks and task history

2 participants