Repository navigation
fix(web): restore list focus after app and agent deletion - #44736
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #44736 +/- ##
=======================================
Coverage 89.37% 89.38%
=======================================
Files 5985 5986 +1
Lines 375030 375051 +21
Branches 76057 76065 +8
=======================================
+ Hits 335178 335221 +43
+ Misses 33815 33793 -22
Partials 6037 6037
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lyzno1
marked this pull request as ready for review
October 25, 2026 08:09
lyzno1
requested review from
JzoNgKVO,
hyoban,
iamjoel and
zxhlyh
as code owners
October 25, 2026 08:09
hyoban
approved these changes
Oct 25, 2026
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #44735.
Deleting an app or agent can leave keyboard focus on the document body after its card disappears. Keep the Studio delete dialog and mutation in the surviving catalog. On success, focus the next surviving card's primary link or existing primary button, then a previous card, and finally the named scroll viewport when no candidate remains. Candidates stay within the originating list section, and restoration preserves scroll position. Cancellation retains Base UI's default restoration to the originating action.
Each confirmation snapshots its adjacent controls and carries a fresh success-only fallback ref. Populate that ref synchronously before closing so restoration does not depend on mutation state rendering before an immediate close. AgentRosterList owns its viewport and accepts native
aria-labelledbyderived from the exported viewport props. App menu actions use the primitive's normal close behavior instead of manual close/microtask sequencing.Keep the small shared card-focus helper beside the base UI components. Colocate Studio list navigation and its tests with Apps, keep its atoms private, and preserve workspace-scoped return URLs and pending URL-write flushing. These supporting behaviors do not introduce standalone top-level feature modules.
Validation
vp run dify-web#type-checkpassed.vp run -w checkpassed with existing repository warnings and no errors.Checklist
From Codex