Skip to content

feat(aggregations): add search activation p2 debug button to $search error banner #8146

Draft
DarshanaVenkatesh wants to merge 11 commits into
mainfrom
COMPASS-10730
Draft

feat(aggregations): add search activation p2 debug button to $search error banner #8146
DarshanaVenkatesh wants to merge 11 commits into
mainfrom
COMPASS-10730

Conversation

@DarshanaVenkatesh

@DarshanaVenkatesh DarshanaVenkatesh commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Description

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 10, 2026 19:19
@github-actions github-actions Bot added the feat label Jun 10, 2026
@DarshanaVenkatesh DarshanaVenkatesh added the feature flagged PRs labeled with this label will not be included in the release notes of the next release label Jun 10, 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 integrates the Compass Assistant with the aggregations server error banner to provide an in-product “Debug” entry point for $search stage failures, by wiring stage context + error details into a new proactive-insights prompt.

Changes:

  • Adds a new proactive-insights context (aggregation-pipeline-error) and prompt for diagnosing aggregation pipeline failures.
  • Adds a “Debug” button to the aggregations server error banner for $search errors that forwards stage context to the Assistant (and closes focus mode first).
  • Exposes AssistantActionsContext from the assistant package entrypoint and adds component-level tests for the new debug button behavior.

Reviewed changes

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

Show a summary per file
File Description
packages/compass-assistant/src/prompts.ts Adds a new proactive-insights context + prompt for aggregation pipeline errors.
packages/compass-assistant/src/index.tsx Re-exports AssistantActionsContext for consumption outside the assistant package (tests/consumers).
packages/compass-aggregations/src/components/stage-editor/stage-editor.tsx Passes stage context and focus-mode close handler down to the error banner.
packages/compass-aggregations/src/components/server-error-banner.tsx Renders the “Debug” button for $search errors and triggers Assistant insight flow.
packages/compass-aggregations/src/components/server-error-banner.spec.tsx Adds coverage for debug button visibility and click behavior.

Comment thread packages/compass-assistant/src/prompts.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat feature flagged PRs labeled with this label will not be included in the release notes of the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants