Skip to content

Conversation

@im47cn
Copy link
Contributor

@im47cn im47cn commented Mar 15, 2025

Context

The HistoryView component now handles copied content with HTML code correctly.
The CopyButton component now extracts the plain text from HTML content before copying.
The test coverage for the HistoryView component has been improved.

Implementation

Modified the CopyButton component to handle HTML content by extracting the plain text.

Added a new test file for HistoryView component.
Added a data-testid attribute to the task content element.
Mocked dependencies and window.vscode for testing.

Screenshots

| before | after |
| copy <span class="history-item-highlight">me</span>! | copy me! |
| | |

How to Test

Added a new test file for HistoryView component.

Get in Touch

dreambt@discord


Important

Fixes HTML content copying issue in CopyButton by extracting plain text, with tests added for HistoryView.

  • Behavior:
    • CopyButton in CopyButton.tsx now extracts plain text from HTML content before copying.
    • HistoryView in HistoryView.tsx updated to include data-testid attributes for testing.
  • Testing:
    • New test file HistoryView.test.tsx added to test plain text copying functionality.
    • Mocks useTaskSearch and useClipboard hooks, and window.vscode for testing.
  • Misc:
    • Adds data-testid to task-content and copy-button in HistoryView.tsx.

This description was created by Ellipsis for 2a986212cc10f077d3e46297b4d7457d647daa17. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Mar 15, 2025

⚠️ No Changeset found

Latest commit: aa1024d

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 the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 15, 2025
@dosubot dosubot bot added the bug Something isn't working label Mar 15, 2025
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Mar 15, 2025
@im47cn im47cn force-pushed the main branch 2 times, most recently from 20c682b to 6ad9891 Compare March 15, 2025 05:36
@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 Mar 15, 2025
@im47cn im47cn force-pushed the main branch 4 times, most recently from f51c8ae to feaf792 Compare March 15, 2025 06:26
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Mar 15, 2025
@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap Mar 15, 2025
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Mar 16, 2025
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Mar 16, 2025
Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

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

Thanks!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 17, 2025
@mrubens mrubens merged commit a17be07 into RooCodeInc:main Mar 17, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from PR [Pre Approval Review] to Done in Roo Code Roadmap Mar 17, 2025
@im47cn im47cn deleted the fix_history_view branch March 18, 2025 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants