Skip to content

fix(ui): disable accept/reject buttons in DiffEditor#1103

Open
gcko wants to merge 2 commits intomainfrom
feature/drc-2683-urgent-code-view-offers-acceptreject-buttons
Open

fix(ui): disable accept/reject buttons in DiffEditor#1103
gcko wants to merge 2 commits intomainfrom
feature/drc-2683-urgent-code-view-offers-acceptreject-buttons

Conversation

@gcko
Copy link
Contributor

@gcko gcko commented Feb 5, 2026

PR checklist

  • Ensure you have added or ran the appropriate tests for your PR.
  • DCO signed

What type of PR is this?

Bug fix

What this PR does / why we need it:

Disables the confusing "Accept" and "Reject" buttons that were appearing in the Code diff view. These buttons are a default CodeMirror merge view behavior but are inappropriate for our read-only diff viewer since users cannot actually accept or reject changes.

Which issue(s) this PR fixes:

Fixes DRC-2683

Special notes for your reviewer:

  • The mergeControls: false option was added to the unifiedMergeView configuration
  • For the side-by-side MergeView, revert controls are not shown by default (only when explicitly enabled via revertControls)
  • Added Storybook stories for the DiffEditor component

Does this PR introduce a user-facing change?:

Yes - removes the confusing Accept/Reject buttons from the code diff view.

CodeMirror merge view shows accept/reject buttons by default in the
unified diff mode. These buttons are confusing since users cannot
actually accept or reject changes in this read-only diff view.

- Add mergeControls: false to unifiedMergeView configuration
- Add Storybook stories for DiffEditor component

Fixes: DRC-2683

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Jared Scott <jared.scott@datarecce.io>
@gcko gcko self-assigned this Feb 5, 2026
@gcko gcko requested a review from danyelf February 5, 2026 01:36
@kiloconnect
Copy link

kiloconnect bot commented Feb 5, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • js/packages/storybook/stories/editor/DiffEditor.stories.tsx - Added story file for DiffEditor
  • js/packages/ui/src/components/editor/DiffEditor.tsx - Modified to disable accept/reject buttons in unified view

PR Analysis

This PR fixes the issue where confusing "Accept" and "Reject" buttons were appearing in the Code diff view. These buttons are a default CodeMirror merge view behavior but are inappropriate for our read-only diff viewer since users cannot actually accept or reject changes.

Key Changes:

  1. Added mergeControls: false to the unifiedMergeView configuration to disable accept/reject buttons in the unified (inline) diff view
  2. Added Storybook stories for the DiffEditor component to document its functionality
  3. For the side-by-side MergeView, revert controls are not shown by default (only when explicitly enabled via revertControls)

The changes are minimal and focused on addressing the issue. The DiffEditor component remains read-only and the buttons are no longer visible, providing a cleaner user experience.

Improve comment to explain why revertControls is omitted for side-by-side
view while mergeControls must be explicitly set to false for unified view.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Jared Scott <jared.scott@datarecce.io>
Copy link
Contributor

@danyelf danyelf left a comment

Choose a reason for hiding this comment

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

Looks good; see one very minor comment. Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants