Repository navigation
fix(local): fade dialogs out with their content, nest app-wide dialogs, hide servers for audio - #1929
Conversation
Closing a dialog cleared the data it showed in the same update, so its text went blank before the fade-out. Dialogs that the parent unmounted on close vanished with no fade at all. - DialogContent and AlertDialogContent keep their last open children until Base UI unmounts the popup. - Rename workspace/chat, create workspace, try model, license form and the egress prompt stay mounted on their last value, keyed by useDialogPayload's opening count so each opening starts fresh. - ConnectionDialog no longer drops its form the moment it starts closing. - Rename chat and the unlisted-model confirm render inside their parent dialog, so Base UI nests them and the parent steps back. - Refused requests go to the innermost egress prompt, like askEgress, and ConnectionDialog hosts one, so consent for a new server's host opens as that dialog's nested dialog.
|
@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…dialogs Replace the exit-animation workarounds with Base UI's own callback: each dialog keeps `open` apart from the data it shows, closing only flips `open`, and the data is cleared in onOpenChangeComplete once the close animation has finished. - Drop useContentThroughExit and useDialogPayload; the Dialog and AlertDialog wrappers are back to base-nova apart from the slot host. - Delete confirms, the studio composer, the workspace name dialog, rename chat, try model, the unlisted-model confirm, the license form, ConnectionDialog and DeleteModelDialog (all five parents) follow this pattern. The Chats search resets after the close. - The egress prompt keeps an answered question until it has closed, then opens the next one in the queue. Add AppDialogs for dialogs with no parent in the tree. The egress prompt and the bug report render inside the deepest open popup, so the dialog behind steps back instead of two modals stacking. Their state moves into stores (the egress queue, the report draft), since they remount as dialogs open and close; the hand-placed nested egress prompts in Settings and ConnectionDialog are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No server model can voice podcasts yet, so the audio step offered a server it could never use. serversCanServe() now holds the one list of model types servers cannot fill; Settings and onboarding both ask it, replacing the per-caller `servers` prop. Onboarding copy drops "or use one from a server" and "Use a server instead" where servers are not offered, in every language. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
openapart from the data it shows: closing only flipsopen, and the data is cleared in Base UI'sonOpenChangeComplete, once the close animation has finished.open/onOpenChange/onOpenChangeCompleteAPI, used by all five parents.AppDialogsslot (components/ui/app-dialog-slot.tsx) for dialogs with no parent in the tree: the egress prompt and the bug report render inside the deepest open popup, so they nest under whatever dialog is open. The hand-placed nested egress prompts in Settings and ConnectionDialog are gone.serversCanServe()infeatures/models/remote/servers-can-serve.tsis the one list both read, and the step copy switches on it in every language.Why
Fixes #
How to test
High-level PR Summary
This PR fixes a visual bug where dialog content would disappear or go blank before the fade-out animation completed. It introduces a new mechanism (
useContentThroughExitanduseDialogPayload) that preserves the last rendered content of dialogs during their exit animations, ensuring smooth transitions. The fix applies to bothDialogandAlertDialogcomponents, affecting multiple features including chat renaming, workspace management, model selection, license settings, and egress prompts. Additionally, nested dialogs now properly render inside their parent dialogs so Base UI can manage the nesting behavior correctly.⏱️ Estimated Review Time: 30-90 minutes
💡 Review Order Suggestion
.agents/skills/frontend-workflow/base-ui.mdsurfsense_local/frontend/src/components/ui/dialog-exit-content.tsxsurfsense_local/frontend/src/components/ui/dialog-exit-content.test.tsxsurfsense_local/frontend/src/components/ui/use-dialog-payload.tssurfsense_local/frontend/src/components/ui/use-dialog-payload.test.tssurfsense_local/frontend/src/components/ui/dialog.tsxsurfsense_local/frontend/src/components/ui/alert-dialog.tsxdocs/architecture/egress.mdsurfsense_local/frontend/src/features/egress/egress-prompt.tsxsurfsense_local/frontend/src/features/egress/egress-prompt.test.tsxsurfsense_local/frontend/src/features/chat/chats-dialog.tsxsurfsense_local/frontend/src/features/workspaces/workspace-rail.tsxsurfsense_local/frontend/src/features/license/license-settings.tsxsurfsense_local/frontend/src/features/models/remote/models/try-model-dialog.tsxsurfsense_local/frontend/src/features/models/remote/models/server-models.tsxsurfsense_local/frontend/src/features/models/remote/connections/connection-dialog.tsx