Skip to content

fix: isolate node selector keyboard events#37998

Merged
lyzno1 merged 1 commit into
mainfrom
codex/workflow-contextmenu-node-selector-keyboard
Jun 26, 2026
Merged

fix: isolate node selector keyboard events#37998
lyzno1 merged 1 commit into
mainfrom
codex/workflow-contextmenu-node-selector-keyboard

Conversation

@lyzno1

@lyzno1 lyzno1 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Add an opt-in keyboard event isolation mode to the workflow node selector popover.
  • Enable it only for the Add Nodes entry opened from the workflow panel context menu.
  • Cover the isolated keyboard path and AddBlock prop forwarding with focused tests.

Root Cause

When Add Nodes is opened from the workflow panel context menu, the Base UI context menu remains open behind the node selector. Its menu keyboard text navigation can consume printable English key events before the selector search can use them. The normal AddBlock entry is unaffected because there is no parent keyboard-managed menu overlay.

Validation

  • pnpm -C web test app/components/workflow/block-selector/__tests__/main.spec.tsx app/components/workflow/operator/__tests__/add-block.spec.tsx app/components/workflow/__tests__/panel-contextmenu.spec.tsx
  • git diff --check

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

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.28%. Comparing base (4cd8b8c) to head (e374314).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #37998   +/-   ##
=======================================
  Coverage   85.28%   85.28%           
=======================================
  Files        4938     4938           
  Lines      256081   256086    +5     
  Branches    48563    48566    +3     
=======================================
+ Hits       218398   218403    +5     
  Misses      33436    33436           
  Partials     4247     4247           
Flag Coverage Δ
dify-ui 94.94% <ø> (ø)
web 84.77% <100.00%> (+<0.01%) ⬆️

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lyzno1 lyzno1 marked this pull request as ready for review June 26, 2026 03:53
@lyzno1 lyzno1 requested review from iamjoel and zxhlyh as code owners June 26, 2026 03:53
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 26, 2026
@lyzno1 lyzno1 enabled auto-merge June 26, 2026 03:53
@lyzno1 lyzno1 added this pull request to the merge queue Jun 26, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 26, 2026
Merged via the queue into main with commit 6ab1dd0 Jun 26, 2026
38 checks passed
@lyzno1 lyzno1 deleted the codex/workflow-contextmenu-node-selector-keyboard branch June 26, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants