Skip to content

Bugfix/workspace open success toast on cancel - #8146

Merged
bijin-bruno merged 2 commits into
usebruno:mainfrom
abhishekp-bruno:bugfix/workspace-open-success-toast-on-cancel
May 29, 2026
Merged

bijin-bruno merged 2 commits into
usebruno:mainfrom
abhishekp-bruno:bugfix/workspace-open-success-toast-on-cancel

Conversation

@abhishekp-bruno

@abhishekp-bruno abhishekp-bruno commented May 29, 2026 •

Copy link
Copy Markdown
Contributor

JIRA Link - https://usebruno.atlassian.net/browse/BRU-3488

Description

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Fixed workspace opening confirmation to display success message only when the operation completes successfully, rather than unconditionally.
  • Tests

    • Added integration test suite for workspace opening functionality to validate correct behavior in various scenarios.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 29, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 04ee5728-25f9-42c3-8ea2-b3c49b724e3e

📥 Commits

Reviewing files that changed from the base of the PR and between 244f528 and 472241b.

📒 Files selected for processing (3)
  • packages/bruno-app/src/components/AppTitleBar/index.js
  • packages/bruno-app/src/providers/ReduxStore/slices/workspaces/actions.js
  • tests/workspace/open-workspace/open-workspace.spec.ts

Walkthrough

This PR adds proper cancellation handling to the workspace open dialog. The action now explicitly returns null when the dialog is canceled, the component checks this return value before showing a success toast, and an integration test validates that canceled dialogs don't trigger false success messages.

Changes

Workspace Dialog Cancellation Handling

Layer / File(s) Summary
Dialog action return value
packages/bruno-app/src/providers/ReduxStore/slices/workspaces/actions.js
openWorkspaceDialog thunk now explicitly returns null when dialog is canceled or yields no result, providing clear signal to consumers.
Component conditional toast
packages/bruno-app/src/components/AppTitleBar/index.js
handleOpenWorkspace captures dispatch result and shows success toast only when truthy, preventing false success messages on cancellation.
Canceled dialog behavior test
tests/workspace/open-workspace/open-workspace.spec.ts
Integration test with Playwright verifies workspace name UI remains unchanged after canceled dialog interaction.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

Suggested labels

size/XS

Suggested reviewers

  • helloanoop
  • lohit-bruno
  • naman-bruno

Poem

🚪 A dialog was canceled, yet toasts still sang,
Until null was returned and conditions rang,
Now success only whispers when workspaces arrive,
With tests proving canc'lations stay—
The workspace flow thrives! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main bugfix: preventing a success toast from appearing when the user cancels workspace selection.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@bijin-bruno
bijin-bruno merged commit d8b6701 into usebruno:main May 29, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants