Skip to content

Treat HistoryView item clicks as (de)select in selection mode#3068

Merged
mrubens merged 2 commits intomainfrom
jr/history-selection-mode-clicks
Apr 30, 2025
Merged

Treat HistoryView item clicks as (de)select in selection mode#3068
mrubens merged 2 commits intomainfrom
jr/history-selection-mode-clicks

Conversation

@jr
Copy link
Copy Markdown
Collaborator

@jr jr commented Apr 30, 2025

Context

Address #2457 by changing click task container click action in selection mode to select/unselect rather than going to the task.

Screenshots

before

history-click-before.mov

after

history-click-after.mov

How to Test

  • Go to chat history view
  • Click Selection Mode button
  • Click anywhere on a task
  • Verify that it only selects the task

Important

In HistoryView, task item clicks in selection mode now toggle selection instead of opening the task, with updated tests and localization.

  • Behavior:
    • In HistoryView.tsx, clicking a task item in selection mode now toggles selection instead of opening the task.
    • Adds data-testid to the selection mode toggle button for testing.
  • Tests:
    • Adds test handles selection mode clicks in HistoryView.test.tsx to verify task selection toggling.
  • Localization:
    • Updates deselectAll and selectAll text in history.json to lowercase.

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

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 30, 2025

⚠️ No Changeset found

Latest commit: 0c21c40

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. Enhancement New feature or request labels Apr 30, 2025
// Go to selection mode
fireEvent.click(screen.getByTestId("toggle-selection-mode-button"))

const taskContainer = screen.getByTestId("task-item-1")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's an inconsistency with the test ID naming: in most tests, the task item is referenced with virtuoso-item-1, but in the handles selection mode clicks test, it uses task-item-1. Please verify and update the test ID for consistency.

Suggested change
const taskContainer = screen.getByTestId("task-item-1")
const taskContainer = screen.getByTestId("virtuoso-item-1")

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

virtuoso-item- is actually added in a mock, and doesn't have a click handler. I could change this to scope everything by virtuoso-item-1 and then click something within it, but I'm not sure that would have added much.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 30, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Apr 30, 2025
@mrubens mrubens merged commit b51abf7 into main Apr 30, 2025
13 checks passed
@mrubens mrubens deleted the jr/history-selection-mode-clicks branch April 30, 2025 17:53
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Apr 30, 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 lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants