Skip to content

fix(compass-indexes): fix margin for error banner and update search incompatible view ui COMPASS-10745#8160

Open
DarshanaVenkatesh wants to merge 11 commits into
mainfrom
COMPASS-10745
Open

fix(compass-indexes): fix margin for error banner and update search incompatible view ui COMPASS-10745#8160
DarshanaVenkatesh wants to merge 11 commits into
mainfrom
COMPASS-10745

Conversation

@DarshanaVenkatesh

@DarshanaVenkatesh DarshanaVenkatesh commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Description

  • Add spacing above error message
  • if the view is incompatible and does not contain search indexes
    • hide toolbar
    • show the default "no standard indexes for views" text

For a search-incompatible view with no search indexes, hide the toolbar and show a "No standard indexes" empty state instead of a disabled create button.
Screenshot 2026-07-07 at 5 37 29 PM

Incompatible views that still have (failed) indexes keep current behavior of listing indexes w/ toolbar
Screenshot 2026-07-07 at 6 00 25 PM

Error w/ spacing
Screenshot 2026-07-07 at 6 13 11 PM

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • If this change could impact the load on the MongoDB cluster, please describe the expected and worst case impact
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

Copilot AI review requested due to automatic review settings June 18, 2026 23:40
@github-actions github-actions Bot added the fix label Jun 18, 2026

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

This PR updates the Compass Indexes UI behavior for views that are incompatible with Atlas Search, and adjusts toolbar layout/visibility to better handle error and “incompatible view” scenarios.

Changes:

  • Tweaks the view pipeline incompatibility banner content gating to better match the “no search indexes” scenario.
  • Adds a special-case empty-state path in the Search Indexes table for non-queryable view pipelines.
  • Adjusts the indexes toolbar layout (flex + gap) and visibility logic, including wiring a hasSearchIndexes derived prop from state.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/compass-indexes/src/components/view-incompatible-components/view-pipeline-incompatible-banner.tsx Adjusts which banner header content is shown based on whether search indexes exist.
packages/compass-indexes/src/components/search-indexes-table/search-indexes-table.tsx Adds a new empty-state branch for read-only views with non-queryable pipelines.
packages/compass-indexes/src/components/indexes-toolbar/indexes-toolbar.tsx Updates toolbar container spacing and refines toolbar visibility rules using a new hasSearchIndexes prop.

Comment thread packages/compass-indexes/src/components/indexes-toolbar/indexes-toolbar.tsx Outdated
@DarshanaVenkatesh DarshanaVenkatesh added bug no release notes Fix or feature not for release notes and removed bug labels Jun 19, 2026
@DarshanaVenkatesh DarshanaVenkatesh marked this pull request as ready for review July 8, 2026 02:01
@DarshanaVenkatesh DarshanaVenkatesh requested a review from a team as a code owner July 8, 2026 02:01
@DarshanaVenkatesh DarshanaVenkatesh requested review from a team, paula-stacho and pavithrachidambaram-afk and removed request for a team July 8, 2026 02:01
isVersionCompatible &&
isSearchManagementActive &&
(isViewPipelineSearchQueryable || isIncompatibleViewWithExistingIndexes);
const showToolbarButtons = !isReadonlyView || canManageSearchIndexesOnView;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is getting hard to understand, perhaps it would be worth to separate this logic into a function, so that we can have early returns (for example for non views). And possibly comments 😊

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fair point, extracted into helper!

variant={hasNoSearchIndexes ? 'warning' : 'danger'}
data-testid="view-not-search-compatible-banner"
>
{!hasNoSearchIndexes && (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oh my! 🙈

@pavithrachidambaram-afk pavithrachidambaram-afk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix no release notes Fix or feature not for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants