Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 19, 2026

Related GitHub Issue

Depends on: #8689 (should be merged after #8689)

Description

This PR extracts the setTaskTitle message handler logic from webviewMessageHandler.ts into a dedicated module (taskTitleHandler.ts), improving code organization and maintainability.

Changes:

  • Created src/core/webview/taskTitleHandler.ts with the extracted handler logic
  • Updated webviewMessageHandler.ts to use the extracted handler
  • Removed unused HistoryItem import from webviewMessageHandler.ts
  • Added a helper normalizeTitle() function for cleaner title normalization

Benefits:

  • Reduces the size of the already large webviewMessageHandler.ts file
  • Follows the existing pattern of other handlers (e.g., checkpointRestoreHandler.ts, diagnosticsHandler.ts)
  • Makes the task title logic independently testable
  • Improves code discoverability

Test Procedure

  • TypeScript compilation passes
  • Linting passes
  • All existing tests pass (no behavioral changes)

Documentation Updates

  • No documentation updates are required.

View task on Roo Code Cloud


Important

Refactor setTaskTitle handler into a separate module and introduce editable task titles feature across UI components and settings.

  • Refactor:
    • Extract setTaskTitle handler from webviewMessageHandler.ts to taskTitleHandler.ts.
    • Introduce normalizeTitle() function in taskTitleHandler.ts for title sanitization and normalization.
  • UI Changes:
    • Add editable task titles feature in TaskHeader.tsx and TaskItem.tsx.
    • Update UISettings.tsx to include a toggle for enabling task titles.
  • Settings and State:
    • Add taskTitlesEnabled to global settings schema in global-settings.ts.
    • Update ExtensionState in vscode-extension-host.ts to include taskTitlesEnabled.
  • Tests:
    • Add tests for task title editing in TaskHeader.spec.tsx and TaskItem.spec.tsx.
  • Misc:
    • Remove unused HistoryItem import from webviewMessageHandler.ts.

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

@roomote
Copy link
Contributor Author

roomote bot commented Jan 19, 2026

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found. This is a clean refactoring that extracts the setTaskTitle handler logic into a dedicated module (taskTitleHandler.ts), following existing patterns in the codebase. The new handler adds improved title sanitization (control character removal, whitespace normalization) and the UI changes are purely styling improvements.

Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@daniel-lxs daniel-lxs marked this pull request as ready for review January 19, 2026 15:00
@daniel-lxs daniel-lxs requested review from cte, jr and mrubens as code owners January 19, 2026 15:00
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jan 19, 2026
@roomote
Copy link
Contributor Author

roomote bot commented Jan 19, 2026

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found. This is a clean refactoring that extracts the setTaskTitle handler logic into a dedicated module, following existing patterns in the codebase.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@roomote roomote bot force-pushed the feature/extract-task-title-handler branch from 170975d to 7d234d2 Compare January 19, 2026 15:04
@roomote roomote bot force-pushed the feature/extract-task-title-handler branch from 7d234d2 to 1440281 Compare January 19, 2026 15:10
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

4 participants