Skip to content

fix(local): fade dialogs out with their content, nest app-wide dialogs, hide servers for audio - #1929

Merged
AnishSarkar22 merged 5 commits into
MODSetter:devfrom
AnishSarkar22:feat/desktop-app-ui
Sep 26, 2026
Merged

AnishSarkar22 merged 5 commits into
MODSetter:devfrom
AnishSarkar22:feat/desktop-app-ui

Conversation

@AnishSarkar22

@AnishSarkar22 AnishSarkar22 commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • Closing a dialog cleared the data it showed in the same update, so its text went blank before the fade-out; dialogs the parent unmounted on close vanished with no fade at all.
  • Every dialog now keeps open apart from the data it shows: closing only flips open, and the data is cleared in Base UI's onOpenChangeComplete, once the close animation has finished.
  • Covers the delete confirms (artifacts, sources, workspaces, models), the studio composer, the workspace name dialog (create and rename now share one state), rename chat, try model, the unlisted-model confirm, the license form and ConnectionDialog. DeleteModelDialog gets an open / onOpenChange / onOpenChangeComplete API, used by all five parents.
  • ConnectionDialog no longer unmounts its form the moment it starts closing, and the Chats search resets after the close instead of during it.
  • Rename chat and the unlisted-model confirm render inside their parent dialog, so Base UI nests them and the parent steps back instead of two modals stacking.
  • New AppDialogs slot (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.
  • The egress queue and the report draft move into stores, since those dialogs remount as other dialogs open and close. An answered egress question stays shown until its prompt has closed, then the next one opens; a question left open when no prompt is mounted is answered no.
  • Onboarding's audio step no longer offers servers, matching Settings. serversCanServe() in features/models/remote/servers-can-serve.ts is the one list both read, and the step copy switches on it in every language.
  • The image editing step's copy now reads like the other steps.
  • Docs: base-ui.md (dialog pattern and APP_DIALOGS), egress.md, issue-reports.md, connections.md.
  • How to test: delete a source, rename a workspace or chat, edit a server; the text should stay put while the dialog fades. With Settings open, choose Help → Report Issue; the report should nest over Settings. Onboarding's audio step should show no "Use a server" option.

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 (useContentThroughExit and useDialogPayload) that preserves the last rendered content of dialogs during their exit animations, ensuring smooth transitions. The fix applies to both Dialog and AlertDialog components, 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
Order File Path
1 .agents/skills/frontend-workflow/base-ui.md
2 surfsense_local/frontend/src/components/ui/dialog-exit-content.tsx
3 surfsense_local/frontend/src/components/ui/dialog-exit-content.test.tsx
4 surfsense_local/frontend/src/components/ui/use-dialog-payload.ts
5 surfsense_local/frontend/src/components/ui/use-dialog-payload.test.ts
6 surfsense_local/frontend/src/components/ui/dialog.tsx
7 surfsense_local/frontend/src/components/ui/alert-dialog.tsx
8 docs/architecture/egress.md
9 surfsense_local/frontend/src/features/egress/egress-prompt.tsx
10 surfsense_local/frontend/src/features/egress/egress-prompt.test.tsx
11 surfsense_local/frontend/src/features/chat/chats-dialog.tsx
12 surfsense_local/frontend/src/features/workspaces/workspace-rail.tsx
13 surfsense_local/frontend/src/features/license/license-settings.tsx
14 surfsense_local/frontend/src/features/models/remote/models/try-model-dialog.tsx
15 surfsense_local/frontend/src/features/models/remote/models/server-models.tsx
16 surfsense_local/frontend/src/features/models/remote/connections/connection-dialog.tsx

Need help? Join our Discord

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.
@vercel

vercel Bot commented Sep 26, 2026

Copy link
Copy Markdown

@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.

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 00a94dd6-a4e7-4fb5-a602-7bfd44811b93

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

AnishSarkar22 and others added 4 commits September 26, 2026 17:30
…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>
@AnishSarkar22 AnishSarkar22 changed the title fix(local): keep dialog content through the exit animation fix(local): fade dialogs out with their content, nest app-wide dialogs, hide servers for audio Sep 26, 2026
@AnishSarkar22
AnishSarkar22 merged commit 7de1faf into MODSetter:dev Sep 26, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant