Skip to content

fix: prevent success toast when workspace selection is cancelled - #8096

Merged
1 commit merged into
usebruno:mainfrom
DeviSriSaiCharan:bugfix/workspace-open-success-toast-on-cancel
May 29, 2026
Merged

fix: prevent success toast when workspace selection is cancelled#8096
1 commit merged into
usebruno:mainfrom
DeviSriSaiCharan:bugfix/workspace-open-success-toast-on-cancel

Conversation

@DeviSriSaiCharan

@DeviSriSaiCharan DeviSriSaiCharan commented May 25, 2026

Copy link
Copy Markdown
Contributor

Description

When attempting to open a workspace in Bruno, the application shows a success toast notification even if the workspace selection is canceled.

Changes Made

  • Updated handleOpenWorkspace to verify that a workspace was actually selected before showing the success toast.
  • Prevented false-positive success notifications when the folder picker dialog is canceled.

Before

  • Clicking Open Workspace
  • Canceling the folder selection dialog
  • Still showed: "Workspace opened successfully"
Screen.Recording.2026-05-22.at.10.49.37.PM.mov

After

  • Success toast is shown only when a valid workspace is selected and opened successfully.
  • Canceling the dialog now closes silently without any misleading notification.
Screen.Recording.2026-05-25.at.7.51.25.PM.mov

Fixes #8079

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue
  • 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.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed workspace open success notification to only appear when the workspace is successfully opened, improving accuracy of status feedback.

Review Change Stack

Copilot AI review requested due to automatic review settings May 25, 2026 15:30
@coderabbitai

coderabbitai Bot commented May 25, 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: 91a46f24-d4ff-4901-bd8c-510ceacbd7a0

ðŸ“Ĩ Commits

Reviewing files that changed from the base of the PR and between a3e3199 and 39308bc.

📒 Files selected for processing (1)
  • packages/bruno-app/src/components/AppTitleBar/index.js

Walkthrough

The PR fixes a bug where the "Workspace opened successfully" toast appeared even when users canceled the folder selection dialog. The handleOpenWorkspace function now conditionally shows the success notification only when the Redux dispatch returns a truthy value, indicating an actual workspace was selected and opened.

Changes

Workspace open success toast fix

Layer / File(s) Summary
Conditional success toast on workspace open
packages/bruno-app/src/components/AppTitleBar/index.js
handleOpenWorkspace captures the result from openWorkspaceDialog() dispatch and emits the success toast only when result is truthy, preventing false positive notifications on dialog cancellation.

Estimated code review effort

ðŸŽŊ 1 (Trivial) | ⏱ïļ ~5 minutes

Suggested reviewers

  • helloanoop
  • lohit-bruno
  • bijin-bruno

Poem

A dialog's choice, once left unheard,
Now whispers truth in every word.
No fake success when cancel's pressed—
Just honest toasts for workspace blessed. 🎉

ðŸšĨ 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 fix: preventing success toast display when workspace selection is cancelled, which is the core objective of the changeset.
Linked Issues check ✅ Passed The code changes directly address issue #8079 by conditionally showing the success toast only when a workspace is actually selected, preventing false-positive notifications on cancellation.
Out of Scope Changes check ✅ Passed All changes in the PR are scoped to the handleOpenWorkspace function's success toast logic and directly address the reported issue without introducing unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏ïļ 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the workspace open flow in the title bar to avoid showing a success toast unconditionally.

Changes:

  • Capture the dispatch(openWorkspaceDialog()) result.
  • Gate the success toast behind a truthy result.

ðŸ’Ą Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/bruno-app/src/components/AppTitleBar/index.js
@bijin-bruno bijin-bruno closed this pull request by merging all changes into usebruno:main in d8b6701 May 29, 2026
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.

“Workspace opened successfully” Toast Appears Even After Canceling Workspace Folder Selection

3 participants