Skip to content

refactor(web): keep copy id events on the button - #40247

Draft
lyzno1 wants to merge 1 commit into
mainfrom
codex/refactor-copy-id-event-boundary
Draft

refactor(web): keep copy id events on the button#40247
lyzno1 wants to merge 1 commit into
mainfrom
codex/refactor-copy-id-event-boundary

Conversation

@lyzno1

@lyzno1 lyzno1 commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Move click propagation ownership from the non-interactive layout wrapper to the existing, named copy button.
  • Exercise the public button role and accessible name in the propagation test instead of querying a CSS wrapper.
  • Prune the four exact jsx-a11y suppressions that are no longer needed across production code and its test.

Behavior contract

  • Activating the copy button still copies the tool ID and updates the existing copied feedback.
  • A copy-button activation does not trigger an ancestor click action.
  • The outer wrapper owns layout and mouse-leave feedback only.
  • The wrapper's 2 px bottom padding is no longer treated as an interaction surface.

Visual regression review

No element tag, class, style, node order, text, or icon changed. This PR only moves an event handler and updates its test, so default, hover, and copied-state geometry remain unchanged.

Validation

  • Red: the focused accessibility lint reported click-events-have-key-events and no-static-element-interactions on the wrapper before the refactor.
  • pnpm exec vp check app/components/workflow/nodes/tool/components/copy-id.tsx app/components/workflow/nodes/tool/components/__tests__/copy-id.spec.tsx
  • node scripts/lint-a11y.mjs app/components/workflow/nodes/tool/components/copy-id.tsx
  • pnpm exec vp test run app/components/workflow/nodes/tool/components/__tests__/copy-id.spec.tsx (2/2)
  • pnpm check (0 errors; 2059 existing warnings)

From Codex

@github-actions github-actions Bot added the web This relates to changes on the web. label Aug 9, 2026
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.41%. Comparing base (e036075) to head (6a0aa04).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #40247      +/-   ##
==========================================
- Coverage   86.41%   86.41%   -0.01%     
==========================================
  Files        5107     5107              
  Lines      290731   290730       -1     
  Branches    57917    57917              
==========================================
- Hits       251245   251244       -1     
  Misses      34545    34545              
  Partials     4941     4941              
Flag Coverage Δ
dify-ui 93.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant