Skip to content

fix(web): restore default account menu focus handling - #46702

Merged
lyzno1 merged 1 commit into
mainfrom
codex/account-menu-default-focus
Nov 18, 2026
Merged

lyzno1 merged 1 commit into
mainfrom
codex/account-menu-default-focus

Conversation

@lyzno1

@lyzno1 lyzno1 commented Nov 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Remove the account menu's custom focus restoration and input tracking. The menu now uses Base UI's default focus management and the browser's native :focus-visible behavior.
  • Update the browser regression to cover opening the avatar menu with a mouse and pressing Escape immediately. Remove assertions that required the old pointer-specific focus suppression.

The override was introduced in #41025.

Verification

  • Opened the Dify homepage in Chrome against the local dev server. Clicked the avatar and pressed Escape. The menu closed and the avatar showed its blue focus ring.
  • Account menu test suite passed in Chromium (5 tests) and the unit project (19 tests). The Chromium suite also verifies that focus stays in Preferences after the menu closes.
  • Scoped static checks passed with one existing lint warning on the settings query-state destructuring.

From Codex

@github-actions github-actions Bot added web This relates to changes on the web. size:L This PR changes 100-499 lines, ignoring generated files. labels Nov 18, 2026
@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.26%. Comparing base (f1ed2e7) to head (c550868).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #46702   +/-   ##
=======================================
  Coverage   90.26%   90.26%           
=======================================
  Files        6452     6452           
  Lines      407038   407005   -33     
  Branches    81756    81740   -16     
=======================================
- Hits       367409   367389   -20     
+ Misses      33226    33213   -13     
  Partials     6403     6403           
Flag Coverage Δ
dify-ui 92.65% <ø> (ø)
web 90.31% <ø> (+<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:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lyzno1
lyzno1 added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 65cc725 Nov 18, 2026
59 checks passed
@lyzno1
lyzno1 deleted the codex/account-menu-default-focus branch November 18, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 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