Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 26, 2025

Summary

This PR implements a star feature for tasks as requested in #6244. Users can now star important tasks to keep them at the top of the list and prevent accidental deletion.

Changes

  • ✨ Added a star button to each task item in the history view
  • 📌 Starred tasks are always sorted to the top of the task list
  • 🛡️ Starred tasks cannot be deleted (shows a warning message instead)
  • 🚫 Batch delete operations automatically exclude starred tasks
  • 🌐 Added localization support for all star-related messages

Implementation Details

  1. Data Model: Added an optional starred field to the HistoryItem type
  2. UI Components: Created a new StarButton component with proper styling and tooltips
  3. State Management: Implemented toggle functionality through the webview message handler
  4. Sorting Logic: Modified the task search hook to always sort starred items to the top
  5. Delete Protection: Updated both single and batch delete dialogs to handle starred tasks

Testing

  • ✅ TypeScript compilation passes
  • ✅ ESLint checks pass
  • ✅ All existing tests continue to pass

Screenshots

The star button appears on hover and shows the current starred state:

  • Empty star icon for unstarred tasks
  • Filled star icon (yellow) for starred tasks

Fixes #6244


Important

Add star feature to tasks, allowing users to prioritize and protect tasks from deletion, with updates to data models, UI components, and state management.

  • Behavior:
    • Added star button to tasks in history view, allowing users to star/unstar tasks.
    • Starred tasks are sorted to the top and cannot be deleted, showing a warning instead.
    • Batch delete operations exclude starred tasks.
  • Data Model:
    • Added starred field to HistoryItem type in history.ts.
  • UI Components:
    • Added StarButton component for toggling star state.
    • Updated BatchDeleteTaskDialog.tsx and DeleteTaskDialog.tsx to handle starred tasks.
    • Modified TaskItemHeader.tsx to include StarButton.
  • State Management:
    • Implemented star toggle functionality in webviewMessageHandler.ts.
    • Updated task sorting logic in useTaskSearch.ts to prioritize starred tasks.
  • Localization:
    • Added star-related messages to history.json.

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

- Add starred field to HistoryItem type
- Add star button UI component to task items
- Implement toggle star functionality
- Sort starred tasks to the top of the list
- Prevent deletion of starred tasks with warning messages
- Add batch delete protection for starred tasks
- Add localization support for star-related messages

Fixes #6244
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 26, 2025 13:35
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Jul 26, 2025
"deleteTaskMessage": "Are you sure you want to delete this task? This action cannot be undone.",
"deleteStarredTask": "Cannot Delete Starred Task",
"deleteStarredTaskMessage": "This task is starred and cannot be deleted. Please unstar it first if you want to delete it.",
"starTask": "Star task",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typographical note: The label "Star task" has inconsistent capitalization compared to similar entries (e.g. "Export Task", "Delete Task"). Consider changing it to "Star Task" for consistency.

Suggested change
"starTask": "Star task",
"starTask": "Star Task",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

"deleteStarredTask": "Cannot Delete Starred Task",
"deleteStarredTaskMessage": "This task is starred and cannot be deleted. Please unstar it first if you want to delete it.",
"starTask": "Star task",
"unstarTask": "Unstar task",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typographical note: The label "Unstar task" has inconsistent capitalization compared to similar entries (e.g. "Export Task", "Delete Task"). Consider changing it to "Unstar Task" for consistency.

Suggested change
"unstarTask": "Unstar task",
"unstarTask": "Unstar Task",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 26, 2025
@daniel-lxs
Copy link
Member

Closing for now as the issue needs approval and proper scoping

1 similar comment
@daniel-lxs
Copy link
Member

Closing for now as the issue needs approval and proper scoping

@daniel-lxs daniel-lxs closed this Jul 29, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 29, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 29, 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:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Give option to star a task to see at top and not to delete accidentally.

4 participants