Repository navigation
fix(ui): keep MCP connection toasts above native dialogs - #5871
Conversation
Move the shared toast portal host into the active modal so the MCP test result stays above its backdrop and accepts pointer and keyboard input. Preserve the host across dialog transitions and cover the production MCP detail flow in Storybook. Fixes apache#5870 Generated-by: Codex
Detect popover methods and modal selector support before creating the modal-aware portal host. Retain inline rendering in LinkeDOM and minimal DOM environments so the provider does not query unsupported selectors or rely on missing DOM methods. Validation: all 694 UI and 3070 Desktop tests pass; Storybook build and 10 focused toast/MCP smoke jobs pass. Generated-by: Codex
hqhq1025
left a comment
There was a problem hiding this comment.
Reviewed exact head 9dbae97160fb289f3a999dd501e3ae446092196e. The Astryx dependency patch now portals one toast viewport into the active native modal and reopens its popover after modal transitions (patches/@astryxdesign+core+0.6.3.patch, ToastViewport source and distributed JS hunks). It retains inline rendering when native popover or modal-selector support is absent. The MCP detail story exercises the production test-connection toast with hit-testing, focus, dismissal, and continued access to the dialog (apps/desktop/stories/module-hubs.stories.tsx:1256-1288). The patch removal condition is documented in patches/README.md:179.
I found no substantiated P0-P3 issue in the changed modal/top-layer, fallback, or Storybook paths. Node 24 clean npm ci and build:test passed, as did the focused UI toast tests (3/3). This exact head's hosted CI test and Windows recovery passed; the CI test job explicitly passed Build Storybook and Storybook smoke. Diff check and static merge against current main ed38ccbb were clean. I did not run a local native Electron window or verify other browsers' top-layer behavior; those remain outside this check. GitHub still requires its normal review gate; this comment is not merge approval.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
Astro-Han
left a comment
There was a problem hiding this comment.
Approved at @Astro-Han's explicit request: no blocking findings in our automated reviews of this head, and CI is green.
Summary
Fixes #5870
Testing an MCP connection while its detail dialog is open now shows a readable, dismissible result above the backdrop. Astryx's shared toast viewport uses a stable portal host inside the active native modal, then opens its popover; raising
z-indexor reopening a popover outside the modal leaves the notification obscured or inert. The host moves back when the dialog closes without remounting toast rows. Environments without native popover and modal-selector support retain the inline viewport.The change extends the existing Astryx dependency patch (source and distributed JavaScript), documents its removal condition, and adds browser hit-testing, keyboard-focus and dismissal assertions to the existing MCP detail story.
Dark-mode capture
Verification
@maka/uitest suite: 694 passed. Full@maka/desktoptest suite: 3070 passed, including the LinkeDOM and minimal DOM component tests that exposed the missing capability guard in the initial CI run.npm run lint,npm run build,npm run typecheck, and both requiredknipworkspace checks passed.npm run format:checkalso scanned 16 pre-existing untracked research/probe files and reported formatting errors there; those files are excluded from this PR.AI use
Tool(s) and scope: Codex implemented the patch and regression assertions, ran validation, and prepared this issue/PR on behalf of @liuxiaocs7. The commit includes
Generated-by: Codex.Checklist
Does this PR entail a change in behavior?