Skip to content

fix(workspace): showing only the remove option for the failed collection in workspace overview - #8932

Merged
utkarsh-bruno merged 3 commits into
usebruno:mainfrom
ravindra-bruno:fix/bru-4246
Aug 11, 2026
Merged

utkarsh-bruno merged 3 commits into
usebruno:mainfrom
ravindra-bruno:fix/bru-4246

Conversation

@ravindra-bruno

@ravindra-bruno ravindra-bruno commented Aug 11, 2026 •

Copy link
Copy Markdown
Collaborator

Description

BRU-4246

For collections that fail to open, the workspace overview currently shows all context-menu options. However, most of these actions are not supported for failed collections and will fail when selected. The Remove option is the only action that works correctly.

Problem

When a collection cannot be opened, users can still see actions such as Rename, Share, Delete, and other options in the context menu. These actions do not work for failed collections, which can be confusing and prevent users from properly managing invalid collections.

Fix

For collections that failed to open, only showing the Remove option in the dropdown.

Screenshots

Before

Screenshot 2026-08-11 at 4 23 45 PM

After

Screenshot 2026-08-11 at 4 23 19 PM

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.
  • I've run the claude code review skill locally.

Summary by CodeRabbit

  • Bug Fixes
    • Updated collection menus to hide unavailable actions for collections that fail to open, including Rename, Share, Delete, Show in Folder, and Git options.
    • Kept the Remove option available for failed collections.
    • Preserved the full set of actions for collections that open successfully.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Failed collections now show only Remove in their menu. Healthy collections retain their existing actions. Shared workspace overview locators support the end-to-end coverage for both states.

Changes

Collection menu actions

Layer / File(s) Summary
Filter collection actions
packages/bruno-app/src/components/WorkspaceHome/WorkspaceOverview/CollectionsList/index.js
Failed collections hide Rename, Share, Show in Folder, Git, and Delete.
Shared locators and menu validation
tests/utils/page/locators.ts, tests/utils/page/workspace/workspace-overview.ts, tests/workspace/unopenable-collections/unopenable-collections.spec.ts
Common locators now expose workspace overview selectors. Tests use scoped selectors and verify failed menus contain only Remove, while healthy menus retain their actions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: vijayh-bruno

Poem

Failed cards keep Remove near,
Healthy menus stay clear.
Shared locators guide the test,
Each menu shows its proper zest.
The workspace state is now expressed.

🚥 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 clearly summarizes the main change: showing only the Remove action for collections that failed to open.
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 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.

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/workspace/unopenable-collections/unopenable-collections.spec.ts`:
- Around line 19-24: Move collectionCardMenu and collectionCardMenuItems out of
the spec into the appropriate page module under tests/utils/page, expose the
corresponding locators through buildCommonLocators, and update the spec to
obtain and use them from that builder instead of defining raw selectors locally.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b714d4cb-77c2-45d5-a740-f25770179e88

📥 Commits

Reviewing files that changed from the base of the PR and between 6924173 and 6419201.

📒 Files selected for processing (2)
  • packages/bruno-app/src/components/WorkspaceHome/WorkspaceOverview/CollectionsList/index.js
  • tests/workspace/unopenable-collections/unopenable-collections.spec.ts

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/workspace/unopenable-collections/unopenable-collections.spec.ts (1)

170-188: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Assert that each opened menu is visible.

toHaveText does not assert visibility. After each menu click, assert that the first menu item is visible before checking its text.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/workspace/unopenable-collections/unopenable-collections.spec.ts` around
lines 170 - 188, Update both menu assertions in the test step to verify the
opened menu’s first item is visible immediately after clicking each collection
card menu, then retain the existing toHaveText checks for the expected menu
contents. Use collectionCardMenuItems(MISSING_COLL) and
collectionCardMenuItems(HEALTHY_COLL) as the targets.

Sources: Path instructions, MCP tools

🧹 Nitpick comments (1)
tests/workspace/unopenable-collections/unopenable-collections.spec.ts (1)

40-47: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Reuse local locator variables in the spec.

Several steps construct the same Locator more than once. Assign reused cards and menu-item collections to local variables before assertions and actions. This keeps the Arrange, Act, and Assert flow clear.

Cache reused locators
       for (const name of [MISSING_COLL, EMPTY_COLL]) {
-        await expect(workspaceOverview.collectionCard(name)).toBeVisible();
-        await expect(workspaceOverview.collectionCard(name).getByText('Failed to open')).toBeVisible();
+        const card = workspaceOverview.collectionCard(name);
+        await expect(card).toBeVisible();
+        await expect(card.getByText('Failed to open')).toBeVisible();
       }

As per path instructions, “Use locator variables for locators.”

Also applies to: 69-78, 132-143, 170-188

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/workspace/unopenable-collections/unopenable-collections.spec.ts` around
lines 40 - 47, Update the test steps in the affected ranges to cache repeated
card and menu-item locators in local variables before using them. Reuse those
variables for all subsequent assertions and actions, including the cards
referenced in the healthy/git-backed step and the locators in the other
specified steps, while preserving the existing test behavior.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/utils/page/workspace/workspace-overview.ts`:
- Around line 4-5: Update the collectionCard locator to match the exact
collection name rather than using the case-insensitive substring filter; use an
exact text/name locator or an available stable test ID while preserving the
existing collection-card scope.

---

Outside diff comments:
In `@tests/workspace/unopenable-collections/unopenable-collections.spec.ts`:
- Around line 170-188: Update both menu assertions in the test step to verify
the opened menu’s first item is visible immediately after clicking each
collection card menu, then retain the existing toHaveText checks for the
expected menu contents. Use collectionCardMenuItems(MISSING_COLL) and
collectionCardMenuItems(HEALTHY_COLL) as the targets.

---

Nitpick comments:
In `@tests/workspace/unopenable-collections/unopenable-collections.spec.ts`:
- Around line 40-47: Update the test steps in the affected ranges to cache
repeated card and menu-item locators in local variables before using them. Reuse
those variables for all subsequent assertions and actions, including the cards
referenced in the healthy/git-backed step and the locators in the other
specified steps, while preserving the existing test behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 272dd4ae-1edc-47bf-9b88-f2dfe3a7f0b5

📥 Commits

Reviewing files that changed from the base of the PR and between 3e3f6b3 and f34fb37.

📒 Files selected for processing (3)
  • tests/utils/page/locators.ts
  • tests/utils/page/workspace/workspace-overview.ts
  • tests/workspace/unopenable-collections/unopenable-collections.spec.ts

@utkarsh-bruno
utkarsh-bruno merged commit 968c98d into usebruno:main Aug 11, 2026
12 of 14 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.

2 participants