Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 23, 2025

  • Add Redux action to reset merge state to initial state
  • Store initial state snapshot when data is loaded
  • Add helper function to detect if state has changed from initial
  • Add "Revert set" button after "Defer" button in SaveDeferButtons component
  • Disable "Revert set" button when no changes have been made
  • Add confirmation dialog for revert action
  • Add localization strings for button and dialog to en translation file
  • Add tests for the new functionality
  • Verify the implementation works correctly
  • Address all review feedback
  • Merge latest master branch

Latest Changes:

✅ Merged latest changes from master branch
✅ Resolved auto-merge conflict in MergeDupsReducer.test.ts
✅ All tests still passing after merge

Summary

All review feedback has been fully addressed and the branch is now up-to-date with master. The implementation:

  • Resets only tree and audio.moves (the actual merge set state)
  • Uses initialTree as a JSON string for efficient storage
  • Button props are properly alphabetized with variant="contained"
  • Tests use standard mockDispatch pattern for checking dispatched actions
  • All 53 tests passing
  • Linter passes with no warnings
  • Build succeeds
  • Up-to-date with master branch
Original prompt

This section details on the original issue you should resolve

<issue_title>[MergeDups] Add "reset"/"start over" button</issue_title>
<issue_description>There's no undo button within the merge tool (too complex to track easily), so if the users (e.g.) deletes a sense then changes their mind, they have to either defer or exit the tool. Some sort of "reset" or "start over" button could be handy.

  • Add a "Revert set" button right after the "Defer" button
  • Disable the button when the current merge set's state has no changes from its initial state
  • Clicking the button pops up a confirmation dialog
  • Confirming resets the state for that merge set
  • Add all strings to the en localization file</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #3872


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


This change is Reviewable

Copilot AI changed the title [WIP] Add reset button to merge tool for user convenience [MergeDups] Add "Revert set" button to discard changes and reset to initial state Oct 23, 2025
Copilot AI requested a review from imnasnainaec October 23, 2025 19:08
Copilot finished work on behalf of imnasnainaec October 23, 2025 19:08
@imnasnainaec

This comment was marked as resolved.

Copilot AI requested a review from imnasnainaec October 23, 2025 19:40
Copilot finished work on behalf of imnasnainaec October 23, 2025 19:40
@imnasnainaec

This comment was marked as resolved.

Copilot AI requested a review from imnasnainaec October 27, 2025 13:32
Copilot finished work on behalf of imnasnainaec October 27, 2025 13:32
Copilot finished work on behalf of imnasnainaec October 27, 2025 13:34
imnasnainaec

This comment was marked as resolved.

Copilot AI requested a review from imnasnainaec October 27, 2025 14:19
Copilot finished work on behalf of imnasnainaec October 27, 2025 14:19
imnasnainaec

This comment was marked as resolved.

Copilot finished work on behalf of imnasnainaec October 27, 2025 20:09
@imnasnainaec

This comment was marked as resolved.

Copy link
Contributor Author

Copilot AI commented Oct 27, 2025

@copilot Merge in master

Merged master branch successfully. All 53 tests still passing, linter passes, and build succeeds.

Copilot finished work on behalf of imnasnainaec October 27, 2025 20:55
@imnasnainaec
Copy link
Collaborator

Disabled revert button (no active merge changes)
Screenshot 2025-10-31 160659

Enabled revert button (merge changes in progress)
Screenshot 2025-10-31 160721

Revert button tooltip
Screenshot 2025-10-31 160750

Revert cancel/confirm dialog
Screenshot 2025-10-31 160907

Copy link
Collaborator

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

@imnasnainaec reviewed 2 of 8 files at r2, 1 of 4 files at r4, 1 of 3 files at r5, 1 of 2 files at r9, 1 of 1 files at r10, 2 of 2 files at r11, 1 of 1 files at r12, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @copilot)

@imnasnainaec imnasnainaec marked this pull request as ready for review October 31, 2025 20:39
Copilot finished work on behalf of imnasnainaec October 31, 2025 20:41
Copilot AI requested a review from imnasnainaec October 31, 2025 20:41
Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

:lgtm:

@jasonleenaylor reviewed 2 of 8 files at r2, 1 of 4 files at r4, 1 of 3 files at r5, 1 of 2 files at r9, 1 of 1 files at r10, 2 of 2 files at r11, 1 of 1 files at r12, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @copilot)

@imnasnainaec imnasnainaec enabled auto-merge (squash) November 3, 2025 19:45
@imnasnainaec imnasnainaec merged commit 7727335 into master Nov 3, 2025
18 of 19 checks passed
@imnasnainaec imnasnainaec deleted the copilot/add-reset-button-to-merge-tool branch November 3, 2025 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MergeDups] Add "reset"/"start over" button

3 participants