Skip to content

Commit 4dd9c14

Browse files
Merge remote-tracking branch 'origin/main' into beta-releases
2 parents b1e03f2 + ab6df08 commit 4dd9c14

28 files changed

+663
-307
lines changed

.evergreen.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
stepback: false
22
exec_timeout_secs: 5400
3+
foliage_should_block_merges: false
34
ignore:
45
- docs/**/*.md
56
- AUTHORS

.evergreen/buildvariants-and-tasks.in.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,12 @@ buildvariants:
290290
<% } %>
291291
<% } %>
292292

293+
- name: test-can-bundle-compass-web
294+
display_name: Test Can Bundle Compass Web
295+
run_on: ubuntu2004-large
296+
tasks:
297+
- name: test-can-bundle-compass-web
298+
293299
- name: test-web-sandbox-atlas-cloud
294300
display_name: Test Web Sandbox (w/ Atlas Cloud login)
295301
run_on: ubuntu2004-large
@@ -557,6 +563,19 @@ tasks:
557563
<% } %>
558564
<% } %>
559565

566+
- name: test-can-bundle-compass-web
567+
tags:
568+
- run-on-pr
569+
- assigned_to_jira_team_compass_compass
570+
- foliage_check_task_only
571+
commands:
572+
- func: prepare
573+
- func: install
574+
- func: bootstrap
575+
- func: compile-compass-web
576+
vars:
577+
debug: 'compass*,electron*,hadron*,mongo*'
578+
560579
- name: test-web-sandbox-atlas-cloud
561580
tags:
562581
- required-for-publish

.evergreen/buildvariants-and-tasks.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,11 @@ buildvariants:
280280
- name: test-web-sandbox-firefox-1
281281
- name: test-web-sandbox-firefox-2
282282
- name: test-web-sandbox-firefox-3
283+
- name: test-can-bundle-compass-web
284+
display_name: Test Can Bundle Compass Web
285+
run_on: ubuntu2004-large
286+
tasks:
287+
- name: test-can-bundle-compass-web
283288
- name: test-web-sandbox-atlas-cloud
284289
display_name: Test Web Sandbox (w/ Atlas Cloud login)
285290
run_on: ubuntu2004-large
@@ -1552,6 +1557,18 @@ tasks:
15521557
e2e_test_groups: 3
15531558
e2e_test_group: 3
15541559
debug: compass-e2e-tests*,electron*,hadron*,mongo*
1560+
- name: test-can-bundle-compass-web
1561+
tags:
1562+
- run-on-pr
1563+
- assigned_to_jira_team_compass_compass
1564+
- foliage_check_task_only
1565+
commands:
1566+
- func: prepare
1567+
- func: install
1568+
- func: bootstrap
1569+
- func: compile-compass-web
1570+
vars:
1571+
debug: compass*,electron*,hadron*,mongo*
15551572
- name: test-web-sandbox-atlas-cloud
15561573
tags:
15571574
- required-for-publish

.evergreen/functions.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,22 @@ functions:
688688
npm run --workspace @mongodb-js/compass-smoke-tests start -- dispatch --ref ${branch_name}
689689
fi
690690
691+
# Creating the webpack compass-web bundle ensures
692+
# that the bundle size does not grow too large for.
693+
# The webpack compile fails when it exceeds the size limit.
694+
compile-compass-web:
695+
- command: shell.exec
696+
# Fail the task if it's idle for 10 mins
697+
timeout_secs: 600
698+
params:
699+
working_dir: src
700+
shell: bash
701+
env:
702+
DEBUG: ${debug|}
703+
script: |
704+
set -e
705+
npm run --workspace @mongodb-js/compass-web compile
706+
691707
test-web-sandbox:
692708
- command: shell.exec
693709
# Fail the task if it's idle for 10 mins

THIRD-PARTY-NOTICES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The following third-party software is used by and included in **Mongodb Compass**.
2-
This document was automatically generated on Wed May 28 2025.
2+
This document was automatically generated on Sun Jun 01 2025.
33

44
## List of dependencies
55

docs/tracking-plan.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
> the tracking plan for the specific Compass version you can use the following
77
> URL: `https://github.com/mongodb-js/compass/blob/<compass version>/docs/tracking-plan.md`
88
9-
Generated on Wed, May 28, 2025
9+
Generated on Sun, Jun 1, 2025
1010

1111
## Table of Contents
1212

@@ -110,6 +110,11 @@ Generated on Wed, May 28, 2025
110110

111111
### Gen AI
112112

113+
- [AI Opt In Modal Shown](#event--AiOptInModalShownEvent)
114+
- [AI Opt In Modal Dismissed](#event--AiOptInModalDismissedEvent)
115+
- [AI Sign In Modal Shown](#event--AiSignInModalShownEvent)
116+
- [AI Sign In Modal Dismissed](#event--AiSignInModalDismissedEvent)
117+
- [AI Generate Query Clicked](#event--AiGenerateQueryClickedEvent)
113118
- [AI Prompt Submitted](#event--AiPromptSubmittedEvent)
114119
- [AI Query Feedback](#event--AiQueryFeedbackEvent)
115120
- [AI Response Failed](#event--AiResponseFailedEvent)
@@ -154,6 +159,8 @@ Generated on Wed, May 28, 2025
154159
- [Secret Storage Not Available](#event--SecretStorageNotAvailableEvent)
155160
- [Experiment Viewed](#event--ExperimentViewedEvent)
156161
- [Create Index Button Clicked](#event--CreateIndexButtonClickedEvent)
162+
- [Error parsing query](#event--CreateIndexErrorParsingQueryEvent)
163+
- [Error generating covered queries](#event--CreateIndexErrorGettingCoveredQueriesEvent)
157164
- [UUID Encountered](#event--UUIDEncounteredEvent)
158165

159166
### Performance Tab
@@ -1291,6 +1298,42 @@ the query results.
12911298

12921299
## Gen AI
12931300

1301+
<a name="event--AiOptInModalShownEvent"></a>
1302+
1303+
### AI Opt In Modal Shown
1304+
1305+
This event is fired when the AI Opt-In Modal is shown to the user.
1306+
1307+
<a name="event--AiOptInModalDismissedEvent"></a>
1308+
1309+
### AI Opt In Modal Dismissed
1310+
1311+
This event is fired when the AI Opt-In Modal is dismissed by the user.
1312+
1313+
<a name="event--AiSignInModalShownEvent"></a>
1314+
1315+
### AI Sign In Modal Shown
1316+
1317+
This event is fired when the AI Sign-In Modal is shown to the user.
1318+
1319+
<a name="event--AiSignInModalDismissedEvent"></a>
1320+
1321+
### AI Sign In Modal Dismissed
1322+
1323+
This event is fired when the AI Sign-In Modal is dismissed by the user.
1324+
1325+
<a name="event--AiGenerateQueryClickedEvent"></a>
1326+
1327+
### AI Generate Query Clicked
1328+
1329+
This event is fired when a user clicks the Generate Query / Aggregation entry point.
1330+
1331+
**Properties**:
1332+
1333+
- **type** (required): `"aggregation" | "query"`
1334+
- The type of query being generated.
1335+
- **is_compass_web** (optional): `true | undefined`
1336+
12941337
<a name="event--AiPromptSubmittedEvent"></a>
12951338

12961339
### AI Prompt Submitted
@@ -1803,6 +1846,24 @@ a system that doesn't offer a suitable secret storage backend.
18031846
- **context** (required): `"Create Index Modal"`
18041847
- **is_compass_web** (optional): `true | undefined`
18051848

1849+
<a name="event--CreateIndexErrorParsingQueryEvent"></a>
1850+
1851+
### Error parsing query
1852+
1853+
**Properties**:
1854+
1855+
- **context** (required): `"Create Index Modal"`
1856+
- **is_compass_web** (optional): `true | undefined`
1857+
1858+
<a name="event--CreateIndexErrorGettingCoveredQueriesEvent"></a>
1859+
1860+
### Error generating covered queries
1861+
1862+
**Properties**:
1863+
1864+
- **context** (required): `"Create Index Modal"`
1865+
- **is_compass_web** (optional): `true | undefined`
1866+
18061867
<a name="event--UUIDEncounteredEvent"></a>
18071868

18081869
### UUID Encountered

package-lock.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-crud/src/stores/crud-store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,7 @@ class CrudStoreImpl
18521852

18531853
openCreateIndexModal() {
18541854
this.localAppRegistry.emit('open-create-index-modal', {
1855-
query: EJSON.serialize(this.queryBar.getLastAppliedQuery('crud')),
1855+
query: EJSON.serialize(this.queryBar.getLastAppliedQuery('crud')?.filter),
18561856
});
18571857
}
18581858

packages/compass-generative-ai/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"@mongodb-js/compass-connections": "^1.57.0",
5858
"@mongodb-js/compass-intercom": "^0.23.0",
5959
"@mongodb-js/compass-logging": "^1.6.10",
60+
"@mongodb-js/compass-telemetry": "^1.7.1",
6061
"@mongodb-js/compass-utils": "^0.8.9",
6162
"bson": "^6.10.3",
6263
"compass-preferences-model": "^2.39.0",

packages/compass-generative-ai/src/components/ai-experience-entry.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { useCallback } from 'react';
22
import {
33
css,
44
cx,
@@ -8,6 +8,10 @@ import {
88
useDarkMode,
99
WorkspaceContainer,
1010
} from '@mongodb-js/compass-components';
11+
import {
12+
type TrackFunction,
13+
useTelemetry,
14+
} from '@mongodb-js/compass-telemetry/provider';
1115

1216
import {
1317
AIEntrySVG,
@@ -95,14 +99,20 @@ function AIExperienceEntry({
9599
onClick: () => void;
96100
}) {
97101
const darkMode = useDarkMode();
102+
const track = useTelemetry();
103+
104+
const handleClick = useCallback(() => {
105+
track('AI Generate Query Clicked', { type });
106+
onClick();
107+
}, [track, onClick, type]);
98108

99109
return (
100110
<button
101111
className={cx(
102112
aiEntryStyles,
103113
darkMode ? aiEntryDarkModeStyles : aiEntryLightModeStyles
104114
)}
105-
onClick={onClick}
115+
onClick={handleClick}
106116
data-testid={dataTestId}
107117
type="button"
108118
title={`Generate ${type}`}
@@ -119,10 +129,12 @@ function createAIPlaceholderHTMLPlaceholder({
119129
onClickAI,
120130
darkMode,
121131
placeholderText,
132+
track,
122133
}: {
123134
onClickAI: () => void;
124135
darkMode?: boolean;
125136
placeholderText: string;
137+
track: TrackFunction;
126138
}): HTMLElement {
127139
const containerEl = document.createElement('div');
128140

@@ -144,6 +156,7 @@ function createAIPlaceholderHTMLPlaceholder({
144156
aiButtonEl.addEventListener('click', (e) => {
145157
e.preventDefault();
146158
e.stopPropagation();
159+
track('AI Generate Query Clicked' as const, { type: 'query' });
147160
onClickAI();
148161
});
149162

0 commit comments

Comments
 (0)