Skip to content

fix: resolve overlapping buttons in Signature Message Details sheet#26040

Merged
vinistevam merged 1 commit intomainfrom
vs/replace-copy-btn-expandable
Feb 13, 2026
Merged

fix: resolve overlapping buttons in Signature Message Details sheet#26040
vinistevam merged 1 commit intomainfrom
vs/replace-copy-btn-expandable

Conversation

@vinistevam
Copy link
Copy Markdown
Contributor

@vinistevam vinistevam commented Feb 12, 2026

Description

This PR fixes a UI regression where the "Copy" and "Close" buttons were overlapping in the Message Details bottom sheet of the Signature Request flow. This overlap prevented users from easily dismissing the details view or accessing the copy functionality.

Reason for change:
A recent update to the layout or design system tokens caused the button container to lose its proper spacing/flex configuration, leading to a stack-on-top layout rather than a side-by-side or properly spaced vertical layout.

Improvement/Solution:
Refactored the button container in the Signature Message Details component to use correct flexbox properties.

Applied design system tokens for spacing between the action buttons.

Ensured the container has adequate padding to prevent overlap with the sheet's edge on smaller devices.

Changelog

CHANGELOG entry: Fixed a UI issue where buttons in the signature message details view were overlapping.

Related issues

Fixes: #25783

Manual testing steps

Feature: Signature Message Details Layout

  Scenario: User views signature message details without button overlap
    Given the user is on a Signature Request screen with a long message
    And the "Message details" sheet is expanded

    When the user scrolls to the bottom of the details sheet
    Then the "Copy" and "Close" buttons should be displayed side-by-side
    And the buttons should not overlap or obscure each other
    And both buttons should be independently tappable

Screenshots/Recordings

copy.webm

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Low Risk
UI/layout and test updates only, with a small behavioral change to show a copy button when copyText is passed; minimal risk outside confirmations UI.

Overview
Adds an optional copyText prop to Expandable to render a top-right CopyButton inside the expanded modal content, centralizing copy affordance placement for expandable sections.

Makes CopyButton configurable via new size and iconColor props (with updated snapshot), and updates tests to properly mock async clipboard writes and assert copy-button rendering when copyText is provided. The signature message expanded view drops its bespoke copy-button positioning and delegates copying to Expandable.

Written by Cursor Bugbot for commit a89e636. This will update automatically on new commits. Configure here.

@vinistevam vinistevam requested a review from a team as a code owner February 12, 2026 21:14
@vinistevam vinistevam added the team-confirmations Push issues to confirmations team label Feb 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are focused on UI refinements to the confirmation components, specifically:

  1. CopyButton: Added optional size and iconColor props with default values, changing default size from Sm to Md. This is a minor enhancement for flexibility.

  2. Expandable: Added optional copyText prop that renders a CopyButton in the expanded modal when provided. This centralizes copy functionality.

  3. SignatureMessageSection: Refactored to use the new Expandable copyText prop instead of rendering CopyButton directly. This component is used by:

    • personal-sign/message.tsx (personal_sign messages)
    • typed-sign-v1/message.tsx (EIP-712 V1)
    • typed-sign-v3v4/message.tsx (EIP-712 V3/V4)

All these signature types are covered by SmokeConfirmations tests. The changes are low-risk because:

  • They are UI/styling changes only (repositioning copy button)
  • Existing functionality is preserved (copy to clipboard still works)
  • Optional props have sensible defaults
  • Unit tests are updated and passing

No other tags are needed as the changes don't affect:

  • Transaction sending/gas (only signature message display)
  • Account management
  • Network selection
  • Trading features
  • Other wallet functionality

Performance Test Selection:
These changes are purely UI refinements to confirmation components - repositioning a copy button and adding optional props. There are no changes that would impact rendering performance, data loading, or app responsiveness. The components affected (CopyButton, Expandable, SignatureMessageSection) are small UI elements within the confirmation flow, not performance-critical paths like list rendering, app launch, or data fetching.

View GitHub Actions results

@vinistevam vinistevam changed the title fix: close and copy button on extendable component fix: resolve overlapping buttons in Signature Message Details sheet Feb 12, 2026
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

/>,
);
fireEvent.press(getByText('Open'));
expect(getByTestId('copyButtonTestId')).toBeDefined();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

New test uses weak toBeDefined matcher for element

Low Severity

The newly added test uses toBeDefined() to assert element presence, which is a weak matcher that the unit testing guidelines explicitly prohibit. Since getByTestId already throws if the element isn't found, the toBeDefined() assertion is effectively a no-op that can never fail — it doesn't actually verify the element is rendered on screen. The guidelines specify using toBeOnTheScreen() instead for robust element-presence assertions.

Fix in Cursor Fix in Web

Triggered by project rule: Unit Testing Guidelines

@sonarqubecloud
Copy link
Copy Markdown

@vinistevam vinistevam added this pull request to the merge queue Feb 13, 2026
Merged via the queue into main with commit 76d52ec Feb 13, 2026
115 of 120 checks passed
@vinistevam vinistevam deleted the vs/replace-copy-btn-expandable branch February 13, 2026 15:13
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2026
@metamaskbot metamaskbot added the release-7.67.0 Issue or pull request that will be included in release 7.67.0 label Feb 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.67.0 Issue or pull request that will be included in release 7.67.0 size-S team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Signatures - Message details sheet displays Copy and Close button overlapped, being able to only Copy not Close

3 participants