Skip to content

fix(desktop): close create workspace dialog immediately on submit#1290

Merged
Kitenite merged 1 commit into
mainfrom
kitenite/fluorine
Feb 8, 2026
Merged

fix(desktop): close create workspace dialog immediately on submit#1290
Kitenite merged 1 commit into
mainfrom
kitenite/fluorine

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Feb 8, 2026

Summary

  • The "Create Workspace" dialog previously stayed open until the backend mutation resolved, causing a noticeable delay after clicking the button
  • Move handleClose() before the async createWorkspace.mutateAsync call so the dialog dismisses instantly

Changes

  • apps/desktop/src/renderer/components/NewWorkspaceModal/NewWorkspaceModal.tsx: Move handleClose() to run before the async workspace creation call instead of after it. Success/error toasts still fire when the operation completes.

Test Plan

  • Open the "Create Workspace" dialog, fill in details, and click "Create Workspace"
  • Verify the dialog closes immediately upon clicking
  • Verify the success toast still appears after workspace creation finishes
  • Verify error toast appears if creation fails

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved modal behavior in workspace creation by adjusting the timing of when the modal closes relative to the operation completion.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 8, 2026

📝 Walkthrough

Walkthrough

The handleCreateWorkspace function in NewWorkspaceModal was modified to close the modal before invoking the createWorkspace mutation, eliminating a redundant close call that previously occurred after the mutation completed. This changes the closure timing from post-mutation to pre-mutation.

Changes

Cohort / File(s) Summary
Modal Closure Timing
apps/desktop/src/renderer/components/NewWorkspaceModal/NewWorkspaceModal.tsx
Modified handleCreateWorkspace to close the modal immediately before calling the createWorkspace mutation, removing the redundant close operation that previously occurred after mutation completion.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 A modal closes with hopeful cheer,
Before the work begins right here,
No lingering call when all is done,
The timing's fixed—one clean run!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: moving the dialog close to happen immediately on submit rather than waiting for the mutation to resolve.
Description check ✅ Passed The description covers the problem, solution, and test plan, though it deviates from the repository template by using a custom format instead of the specified sections.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kitenite/fluorine

No actionable comments were generated in the recent 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 and usage tips.

@Kitenite Kitenite merged commit 7fbbd98 into main Feb 8, 2026
6 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 8, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

@Kitenite Kitenite deleted the kitenite/fluorine branch February 9, 2026 01:18
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