diff --git a/apps/momentic/chat-finished-with-dashboard.module.yaml b/apps/momentic/chat-finished-with-dashboard.module.yaml new file mode 100644 index 000000000..8fab3d1a1 --- /dev/null +++ b/apps/momentic/chat-finished-with-dashboard.module.yaml @@ -0,0 +1,31 @@ +fileType: momentic/module +schemaVersion: 1.0.21 +moduleId: 34c6e2fd-2455-4423-bd16-81f75250a72e +name: chat-finished-with-dashboard +description: Chat should finish and there should be a dashboard on right side of the screen +enabled: true +steps: + - id: cf07daef-232a-41a3-a0ff-45f0cc7dbdaf + type: PRESET_ACTION + command: + id: 0b256f5a-250e-4026-b46a-c22d6986578d + type: WAIT_FOR_URL + matcher: + type: SUBSTRING + url: /dashboards + timeout: 600 + - id: bec2dd00-99ee-432e-911e-a0d279cda9fa + type: PRESET_ACTION + command: + id: 361c5c6e-2b9f-4645-8397-6352f2d2640c + type: AI_ASSERTION + assertion: Verify we have a dashboard on the right side of the screen with + multiple metrics. These metrics can be graphs, charts, or values. + - id: b418882e-262b-49e4-bdfa-b452a99267e3 + type: PRESET_ACTION + command: + id: e6ed4354-67e5-4b6f-8bb7-677f186f0397 + type: AI_ASSERTION + assertion: On the left side, we should see a "reasoned for x minutes|seconds" + and then we should see normal formatted text under that with a pill + containing the title of the dashboard that we are evaluating. diff --git a/apps/momentic/chat-finished-with-metric.module.yaml b/apps/momentic/chat-finished-with-metric.module.yaml new file mode 100644 index 000000000..19a81d123 --- /dev/null +++ b/apps/momentic/chat-finished-with-metric.module.yaml @@ -0,0 +1,34 @@ +fileType: momentic/module +schemaVersion: 1.0.21 +moduleId: 666c6102-d4fa-4c6e-998c-4b283337ad92 +name: chat-finished-with-metric +description: The chat has finished and a metric is showing. +enabled: true +steps: + - id: 5a0ce4f8-0d7b-4836-910a-48f31d29d0ff + type: PRESET_ACTION + command: + id: 4ff5faf6-5cdc-4153-99b9-563dea9184ff + type: WAIT_FOR_URL + matcher: + type: SUBSTRING + url: /metrics + timeout: 180 + - id: aa57fa2f-8c03-4928-9163-15a41ee776f3 + type: PRESET_ACTION + command: + id: 21a91075-c205-4926-af5c-73c32cc4151d + type: AI_ASSERTION + assertion: Confirm that a metric has been delivered, it should be on the right + side of the page. It should have the chart, results, sql up top, it + should have the title, the time frame description, and a question + looking description. In the center of that div. We should also see a + number descibing total bike sales + - id: 78fc9cd5-e8aa-41df-b270-daa24a27843c + type: PRESET_ACTION + command: + id: 4f2074f8-bcf5-49e3-bedf-e378af51f82b + type: AI_ASSERTION + assertion: On the left side, we should see a "reasoned for x minutes|seconds" + and then we should see normal formatted text under that with a pill + containing the title of the metric that we are evaluating. diff --git a/apps/momentic/chat-finished-with-report.module.yaml b/apps/momentic/chat-finished-with-report.module.yaml new file mode 100644 index 000000000..3e2ad5610 --- /dev/null +++ b/apps/momentic/chat-finished-with-report.module.yaml @@ -0,0 +1,33 @@ +fileType: momentic/module +schemaVersion: 1.0.21 +moduleId: 782571e2-3c8e-49fe-a59e-0685924c5a43 +name: chat-finished-with-report +description: Chat should have finished and there should be a report on the right + side of the screen +enabled: true +steps: + - id: 810b467f-1a1d-46a1-bda3-dc975999dea1 + type: PRESET_ACTION + command: + id: 4b86bb37-ca4a-482a-b0d2-25e04fa232c9 + type: WAIT_FOR_URL + matcher: + type: SUBSTRING + url: /reports + timeout: 600 + - id: 94000b39-52e1-4cf5-93f0-1b0316458caf + type: PRESET_ACTION + command: + id: 2e0619bb-23aa-4302-8b9f-5417e7763801 + type: AI_ASSERTION + assertion: Verify we have a report on the right side of the screen with a title + text and metric or metrics. These metrics can be graphs, charts, or + values. + - id: 10746bb0-a990-4604-938c-faf9c20db332 + type: PRESET_ACTION + command: + id: 0d076d39-f21c-4001-b3e7-77f1b5ebe548 + type: AI_ASSERTION + assertion: On the left side, we should see a "reasoned for x minutes|seconds" + and then we should see normal formatted text under that with a pill + containing the title of the report that we are evaluating. diff --git a/apps/momentic/new-chat-and-reasoning-started.module.yaml b/apps/momentic/new-chat-and-reasoning-started.module.yaml new file mode 100644 index 000000000..f1eb3117c --- /dev/null +++ b/apps/momentic/new-chat-and-reasoning-started.module.yaml @@ -0,0 +1,46 @@ +fileType: momentic/module +moduleId: 805447d3-e699-46f6-b1d2-0132840b3f20 +name: new-chat-and-reasoning-started +description: Navigated to /chat and after waiting the reasoning is coming in +enabled: true +schemaVersion: 1.0.21 +steps: + - id: 530e80e6-26f8-4db1-82b1-f5644b425726 + type: PRESET_ACTION + command: + id: 3cd70032-2335-4fcd-a462-da46cce1bab7 + type: WAIT_FOR_URL + matcher: + type: SUBSTRING + url: /chat + - id: 13eef3cf-c983-45a1-bc6b-fdde2b7067e9 + type: PRESET_ACTION + command: + id: 626f8745-fe33-49ab-8310-4335a0c7a51f + type: AI_ASSERTION + assertion: Text should appear in the middle of the screen showing the question + we asked + - id: a460ed8a-36ce-4145-9f79-ed46489125f6 + type: PRESET_ACTION + command: + id: cd032a60-e769-48c5-924f-29d6c8c8499e + type: WAIT_FOR_URL + matcher: + type: SUBSTRING + url: /reasoning + timeout: 30 + - id: e4d03ee3-e9e1-4dc0-a93e-0e2eb46f6c4c + type: PRESET_ACTION + command: + id: 865b7ca4-70df-4137-bdb3-32be38a9bd2f + type: WAIT + delay: 15 + - id: d8b65a75-41ee-492d-80ea-c5749d2910a3 + type: PRESET_ACTION + command: + id: 904c4a0e-e1d7-41c3-bbc1-b10cb8639239 + type: AI_ASSERTION + assertion: We must confirm that on the right side there is a stream of + "reasoning messages" these may look like text, code blocks, sql + statements, etc. I want to verify that they are there and that there is + content. diff --git a/apps/momentic/package.json b/apps/momentic/package.json index 1fb51ce94..5ad328fc8 100644 --- a/apps/momentic/package.json +++ b/apps/momentic/package.json @@ -16,7 +16,7 @@ }, "scripts": { "prebuild": "[ \"$SKIP_ENV_CHECK\" = \"true\" ] || tsx scripts/validate-env.ts", - "momentic": "pnpm dlx momentic app --api-key $MOMENTIC_API_KEY", + "momentic": "pnpm dlx momentic install-browsers --all &&pnpm dlx momentic app --api-key $MOMENTIC_API_KEY", "momentic:run": "pnpm dlx momentic run --api-key $MOMENTIC_API_KEY" }, "dependencies": { diff --git a/apps/momentic/tests/api-v2-tests.test.yaml b/apps/momentic/tests/api-v2-tests.test.yaml new file mode 100644 index 000000000..b29f8d939 --- /dev/null +++ b/apps/momentic/tests/api-v2-tests.test.yaml @@ -0,0 +1,115 @@ +fileType: momentic/test +id: 20b55cdd-3d7e-413f-98a9-d78a5b28625c +name: api-v2-tests +description: Run all api v2 calls and determine we get results back that are expected +schemaVersion: 1.0.21 +advanced: + viewport: + width: 1920 + height: 1080 + extraHeaders: {} + browserType: Chromium +retries: 0 +envs: + - name: development + default: true +steps: + - id: 6e2bd037-2ad8-46f7-bca7-fa8dce20b1f3 + envKey: CHATS_RESPONSE + type: PRESET_ACTION + command: + id: a55195a0-895c-4e41-a129-95fd942821d5 + type: REQUEST + url: http://localhost:3002/api/v2/chats + method: GET + headers: + Authorization: Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjMmRkNjRjZC1mN2YzLTQ4ODQtYmM5MS1kNDZhZTQzMTkwMWUiLCJuYW1lIjoiSm9obiBEb2UiLCJpYXQiOjE1MTYyMzkwMjIsImV4cCI6MjUxODU1NTMyNiwiYXVkIjoiYXV0aGVudGljYXRlZCJ9.uRs5OVyYErQ1iSQwAXVUD6TFolOu31ejPhcBS41ResA + Accept-Encoding: gzip, deflate, br, zstd + Accept: application/json, text/plain, */* + Accept-Language: en-US,en; + Connection: keep-alive + Host: localhost:3002 + Origin: http://localhost:3000 + - id: 5f735f9b-8050-4963-a0ac-ebf056cae338 + type: PRESET_ACTION + command: + id: 23d0449f-396f-461c-bedd-2a620d5388a7 + type: REQUEST + url: http://localhost:3002/api/v2/users?page=1&page_size=5 + method: GET + headers: + Authorization: Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjMmRkNjRjZC1mN2YzLTQ4ODQtYmM5MS1kNDZhZTQzMTkwMWUiLCJuYW1lIjoiSm9obiBEb2UiLCJpYXQiOjE1MTYyMzkwMjIsImV4cCI6MjUxODU1NTMyNiwiYXVkIjoiYXV0aGVudGljYXRlZCJ9.uRs5OVyYErQ1iSQwAXVUD6TFolOu31ejPhcBS41ResA + Accept-Encoding: gzip, deflate, br, zstd + Accept: application/json, text/plain, */* + Accept-Language: en-US,en; + Connection: keep-alive + Host: localhost:3002 + Origin: http://localhost:3000 + params: + "": "" + - id: 1ae73699-1d71-4e09-939c-2cbe03535acf + type: PRESET_ACTION + command: + id: 9bbaa784-e7a5-4dcf-b5a2-3d6765d291da + type: REQUEST + url: http://localhost:3002/api/v2/search?query=sales&includeAssetAncestors=True&page=1&page_size=25 + method: GET + headers: + Authorization: Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjMmRkNjRjZC1mN2YzLTQ4ODQtYmM5MS1kNDZhZTQzMTkwMWUiLCJuYW1lIjoiSm9obiBEb2UiLCJpYXQiOjE1MTYyMzkwMjIsImV4cCI6MjUxODU1NTMyNiwiYXVkIjoiYXV0aGVudGljYXRlZCJ9.uRs5OVyYErQ1iSQwAXVUD6TFolOu31ejPhcBS41ResA + Accept-Encoding: gzip, deflate, br, zstd + Accept: application/json, text/plain, */* + Accept-Language: en-US,en; + Connection: keep-alive + Host: localhost:3002 + Origin: http://localhost:3000 + - id: 5b617e66-9819-49eb-952d-8956327830a1 + type: PRESET_ACTION + command: + id: cabd0d81-22d0-4ef1-aa19-ca6962c45726 + type: REQUEST + url: http://localhost:3002/api/v2/users/c2dd64cd-f7f3-4884-bc91-d46ae431901e + method: GET + headers: + Authorization: Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjMmRkNjRjZC1mN2YzLTQ4ODQtYmM5MS1kNDZhZTQzMTkwMWUiLCJuYW1lIjoiSm9obiBEb2UiLCJpYXQiOjE1MTYyMzkwMjIsImV4cCI6MjUxODU1NTMyNiwiYXVkIjoiYXV0aGVudGljYXRlZCJ9.uRs5OVyYErQ1iSQwAXVUD6TFolOu31ejPhcBS41ResA + Accept-Encoding: gzip, deflate, br, zstd + Accept: application/json, text/plain, */* + Accept-Language: en-US,en; + Connection: keep-alive + Host: localhost:3002 + Origin: http://localhost:3000 + - id: bff65d95-b288-4336-a390-a2830d6efb9b + type: PRESET_ACTION + command: + id: 41e9a3ee-10c6-4809-8a68-28f504a75a84 + type: REQUEST + url: http://localhost:3002/api/v2/users/c2dd64cd-f7f3-4884-bc91-d46ae431901e/suggested-prompts + method: GET + headers: + Authorization: Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjMmRkNjRjZC1mN2YzLTQ4ODQtYmM5MS1kNDZhZTQzMTkwMWUiLCJuYW1lIjoiSm9obiBEb2UiLCJpYXQiOjE1MTYyMzkwMjIsImV4cCI6MjUxODU1NTMyNiwiYXVkIjoiYXV0aGVudGljYXRlZCJ9.uRs5OVyYErQ1iSQwAXVUD6TFolOu31ejPhcBS41ResA + Accept-Encoding: gzip, deflate, br, zstd + Accept: application/json, text/plain, */* + Accept-Language: en-US,en; + Connection: keep-alive + Host: localhost:3002 + Origin: http://localhost:3000 + - id: ff6f4029-88fe-4b6e-a773-af74ea7195cc + type: PRESET_ACTION + command: + id: cf0281d3-dae7-4ca2-b547-7c9ac9682ecc + type: REQUEST + url: http://localhost:3002/api/v2/docs?page_size=10 + method: GET + headers: + Authorization: Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjMmRkNjRjZC1mN2YzLTQ4ODQtYmM5MS1kNDZhZTQzMTkwMWUiLCJuYW1lIjoiSm9obiBEb2UiLCJpYXQiOjE1MTYyMzkwMjIsImV4cCI6MjUxODU1NTMyNiwiYXVkIjoiYXV0aGVudGljYXRlZCJ9.uRs5OVyYErQ1iSQwAXVUD6TFolOu31ejPhcBS41ResA + Accept-Encoding: gzip, deflate, br, zstd + Accept: application/json, text/plain, */* + Accept-Language: en-US,en; + Connection: keep-alive + Host: localhost:3002 + Origin: http://localhost:3000 diff --git a/apps/momentic/tests/create-dashboard.test.yaml b/apps/momentic/tests/create-dashboard.test.yaml new file mode 100644 index 000000000..e0da87beb --- /dev/null +++ b/apps/momentic/tests/create-dashboard.test.yaml @@ -0,0 +1,50 @@ +fileType: momentic/test +id: e0d1d295-0df6-4104-b54c-906c0c772196 +name: create-dashboard +description: Start a new chat and create a report. Make sure the report is saved properly. +schemaVersion: 1.0.21 +advanced: + viewport: + width: 1920 + height: 1080 + browserType: Chromium +retries: 0 +envs: + - name: development + default: true +steps: + - id: 4ef924e0-f3ec-4830-b0b5-3127dd640de4 + type: MODULE + moduleId: defc36e9-b0a7-4bfe-940f-7901493d5e5e + - id: 2bf4f1e1-84da-4c66-baf9-85b7a2e71332 + type: PRESET_ACTION + command: + id: 1e3b9123-24b3-4316-8d62-857f1d4e44a0 + clearContent: true + type: TYPE + target: + type: description + elementDescriptor: The text input box with Ask Buster a question.. + value: Create me a dashboard with multiple metrics describing sales in 2024. + - id: 1c1f4582-4a31-458b-ba66-b7d26b7a6500 + type: PRESET_ACTION + command: + id: 89a75b10-572c-4fb4-98a2-cc292c497046 + type: CLICK + target: + type: description + elementDescriptor: Click the submit question button in the text box + - id: 16ed88c7-26e4-4c40-a133-8764f574f6d4 + type: MODULE + moduleId: 805447d3-e699-46f6-b1d2-0132840b3f20 + - id: b541eff4-bf57-4921-b892-73ca920b26b1 + type: MODULE + moduleId: 34c6e2fd-2455-4423-bd16-81f75250a72e + - id: 53ba9655-010d-46dc-99e1-e1cc8114d3c1 + type: PRESET_ACTION + command: + id: a1a6b321-d7f8-4303-98d9-e47d6ac4214d + type: CLICK + target: + type: description + elementDescriptor: Dashboards in the left side navigation panel diff --git a/apps/momentic/tests/create-metric.test.yaml b/apps/momentic/tests/create-metric.test.yaml new file mode 100644 index 000000000..20c3b3350 --- /dev/null +++ b/apps/momentic/tests/create-metric.test.yaml @@ -0,0 +1,51 @@ +fileType: momentic/test +id: 21bba88f-a33a-4961-b108-3156d11a13e5 +name: create-metric +description: Kick off a new chat asking for Revenue in 2024 and verify a metric was created. +schemaVersion: 1.0.21 +advanced: + viewport: + width: 1920 + height: 1080 + browserType: Chromium +retries: 0 +envs: + - name: development + default: true +steps: + - id: 80654251-cf56-4d50-b62b-218caaa3680c + type: MODULE + moduleId: defc36e9-b0a7-4bfe-940f-7901493d5e5e + - id: c183810d-3646-4fad-8659-e0c4410668c1 + type: PRESET_ACTION + command: + id: 85256ad7-2be8-414a-802b-4cacfa14bea9 + clearContent: true + type: TYPE + target: + type: description + elementDescriptor: The text input box with Ask Buster a question.. + value: Create me a metric to show how many sales in 2024. Do not create me a + report. + - id: 9408b9f5-c28e-42f0-8e49-9bdae01d954b + type: PRESET_ACTION + command: + id: dd3c505e-8d4f-4165-8b9b-4cd8287e54eb + type: CLICK + target: + type: description + elementDescriptor: Click the submit question button in text box + - id: e891b9fd-4157-46fd-abc7-38b40e52f6d3 + type: MODULE + moduleId: 805447d3-e699-46f6-b1d2-0132840b3f20 + - id: 277b0e2e-36fb-4c41-95c7-8f661e96c98e + type: MODULE + moduleId: 666c6102-d4fa-4c6e-998c-4b283337ad92 + - id: 4da5083c-3a49-4741-8740-7c408dfe088a + type: PRESET_ACTION + command: + id: fb0db24d-c142-4a07-82a1-e9ae0693aff1 + type: CLICK + target: + type: description + elementDescriptor: Metrics in the left side navigation panel diff --git a/apps/momentic/tests/create-report.test.yaml b/apps/momentic/tests/create-report.test.yaml new file mode 100644 index 000000000..e7b7ebaa0 --- /dev/null +++ b/apps/momentic/tests/create-report.test.yaml @@ -0,0 +1,51 @@ +fileType: momentic/test +id: ac7ccb7b-489d-4b37-9bd6-bda9193004b6 +name: create-report +description: Start a new chat to create a dashboard. Verify that it is created + and saved properly +schemaVersion: 1.0.21 +advanced: + viewport: + width: 1920 + height: 1080 + browserType: Chromium +retries: 0 +envs: + - name: development + default: true +steps: + - id: d4112b77-f85e-4574-9fed-79b7e021ae61 + type: MODULE + moduleId: defc36e9-b0a7-4bfe-940f-7901493d5e5e + - id: a9c567ec-c1db-4c3b-a468-76f6abda57af + type: PRESET_ACTION + command: + id: 9bfcb30e-8eab-4a62-9f43-ecae73e1a5a8 + clearContent: true + type: TYPE + target: + type: description + elementDescriptor: The text input box with Ask Buster a question.. + value: Create me a report detailing which products had more orders in 2024. + - id: 3055c1c9-a374-4bb0-a572-2803797b76e6 + type: PRESET_ACTION + command: + id: dddcebc7-8154-4810-b589-2a61086f2e00 + type: CLICK + target: + type: description + elementDescriptor: Click the submit question button in text box + - id: 613cbed8-7896-411f-b56e-0b97f0891b68 + type: MODULE + moduleId: 805447d3-e699-46f6-b1d2-0132840b3f20 + - id: 811ac890-555e-452f-9c2d-0452a50b93c8 + type: MODULE + moduleId: 782571e2-3c8e-49fe-a59e-0685924c5a43 + - id: dd1f65e1-62a6-4903-89c7-f9fa43ca061d + type: PRESET_ACTION + command: + id: 77dac8f0-36ba-4a68-941d-cd20e5b52a57 + type: CLICK + target: + type: description + elementDescriptor: Reports in the left side navigation panel diff --git a/apps/momentic/tests/edit-with-ai-dashboard.test.yaml b/apps/momentic/tests/edit-with-ai-dashboard.test.yaml new file mode 100644 index 000000000..a5c626ff9 --- /dev/null +++ b/apps/momentic/tests/edit-with-ai-dashboard.test.yaml @@ -0,0 +1,100 @@ +fileType: momentic/test +id: 17b35469-b175-4d01-8df3-5e713540d625 +name: edit-with-ai-dashboard +description: Click into an already created dashboard and hit edit with ai to modify it +schemaVersion: 1.0.21 +advanced: + viewport: + width: 1920 + height: 1080 + browserType: Chromium +retries: 0 +envs: + - name: development + default: true +steps: + - id: 4a5ad7ae-44dd-4eab-98d0-1dde0064ead1 + type: MODULE + moduleId: defc36e9-b0a7-4bfe-940f-7901493d5e5e + - id: 550251fb-5277-4dd8-acfe-6803835a103e + type: PRESET_ACTION + command: + id: 454a3d63-a4cd-4349-9775-033cfa8e5f3a + type: CLICK + target: + type: description + elementDescriptor: Dashboards in the left navigation panel + - id: a440cada-a3f0-4d81-ad43-c906b98dc93e + type: PRESET_ACTION + command: + id: 6414c705-109a-420d-bbc5-641daa5279f9 + type: CLICK + target: + type: description + elementDescriptor: click the bottom Dashboard title in the list of Dashboards + - id: 74cc34ca-dbe7-4d4a-be94-45a710a5d943 + type: PRESET_ACTION + command: + id: 89950f12-19ab-4a2d-ac51-bd1ba3c21821 + type: WAIT + delay: 1 + - id: ee102803-53a3-4375-b398-fef4cfacf47d + type: PRESET_ACTION + command: + id: 13003806-55ce-4ff2-a801-962b4b1aa1ec + type: CLICK + target: + type: description + elementDescriptor: Click the Edit with ai button above the dashboard on the + right side of the screen. + - id: 66d225c1-7c39-4624-b05d-ddc8b24651fe + type: PRESET_ACTION + command: + id: 5d19c7d4-31f4-4b82-acf2-d9c2a28b1ef6 + type: WAIT_FOR_URL + matcher: + type: SUBSTRING + url: /chats + timeout: 2 + - id: 0a3b675d-c0d6-4164-91af-f0b2f1876a90 + type: PRESET_ACTION + command: + id: 1a1c33d7-8c69-462c-82db-f9bd23757f38 + type: WAIT_FOR_URL + matcher: + type: SUBSTRING + url: /dashboards + timeout: 2 + - id: 0ec0914c-dc33-4230-a425-00a516c19680 + type: PRESET_ACTION + command: + id: 42467313-a17a-47b4-9474-27b1c18aaca1 + type: AI_ASSERTION + assertion: Confirm we have message history on the left side of the screen and + that we have a dashboard on the right side of the screen with multiple + metrics. Metrics can be charts graphs or values. + - id: 24bf099c-cca8-4edb-b5d7-dbc2a33121f7 + type: PRESET_ACTION + command: + id: 7ee37c71-a82c-4dba-afee-2c5d8b9877b7 + clearContent: true + type: TYPE + target: + type: description + elementDescriptor: Text box on left side of the screen should say Ask Buster a question... + value: Can you add a pie chart to the top of this dashboard that shows orders by + product type. + - id: e160f565-db25-403e-9d8f-966bc5b4822c + type: PRESET_ACTION + command: + id: 86b05ada-93b7-40f1-882b-669aa4bfbc9a + type: CLICK + target: + type: description + elementDescriptor: Submit question button in the text box on bottom left side. + - id: 76528e4d-fdc7-47c6-8f31-994b030878a7 + type: MODULE + moduleId: 805447d3-e699-46f6-b1d2-0132840b3f20 + - id: 12696ecd-9138-4f9d-9cba-4c19a1ab2c27 + type: MODULE + moduleId: 34c6e2fd-2455-4423-bd16-81f75250a72e diff --git a/apps/momentic/tests/edit-with-ai-metric.test.yaml b/apps/momentic/tests/edit-with-ai-metric.test.yaml new file mode 100644 index 000000000..e31293a8a --- /dev/null +++ b/apps/momentic/tests/edit-with-ai-metric.test.yaml @@ -0,0 +1,93 @@ +fileType: momentic/test +id: 138abd87-2ef5-466c-b826-70529a1073ae +name: edit-with-ai-metric +description: "Click into an already created metric and edit it with an ai chat. " +schemaVersion: 1.0.21 +advanced: + viewport: + width: 1920 + height: 1080 + browserType: Chromium +retries: 0 +envs: + - name: development + default: true +steps: + - id: 973ab47b-4cb7-4534-9732-70d9bbfe59f7 + type: MODULE + moduleId: defc36e9-b0a7-4bfe-940f-7901493d5e5e + - id: 1908cbc6-9ae9-4634-9c46-21c35c3d34d8 + type: PRESET_ACTION + command: + id: 7da8c0e6-dc4a-4862-8860-5712963d5741 + type: CLICK + target: + type: description + elementDescriptor: Metrics in the side navigation panel + - id: e4be37e2-e046-43a0-aa3b-e5e30311de97 + type: PRESET_ACTION + command: + id: 09107b57-ca3f-493f-b0b7-bdad37960a7e + type: CLICK + target: + type: description + elementDescriptor: Click on the bottom metric title + - id: 639155eb-2be8-4657-a2e1-99edd50d38df + type: PRESET_ACTION + command: + id: c155678c-4a63-4e29-a2dd-83dec90c36c7 + type: CLICK + target: + type: description + elementDescriptor: Edit with Ai button above the metric on the right side of the screen + - id: 51497111-5bc8-46d0-9fe3-a68ac6a1eb6f + type: PRESET_ACTION + command: + id: 3264815f-62e7-423c-9edf-a258679b2185 + type: WAIT_FOR_URL + matcher: + type: SUBSTRING + url: /metrics + timeout: 2 + - id: 855ab648-dbad-4689-bfe3-0950938a3b2b + type: PRESET_ACTION + command: + id: 66de14be-3e56-404c-9dba-42d8b9f9bfa5 + type: AI_ASSERTION + assertion: There should be a metric on the right side of the screen. This should + have a title and could be a chat, graph, or value. + - id: 558b8ced-9381-4705-af26-a2e0f86902f4 + type: PRESET_ACTION + command: + id: f3aa227c-969f-4e78-ac8e-65a7d4cb1613 + type: AI_ASSERTION + assertion: There should be message history on the left side of the screen with a + text input box at the bottom to continue a conversation. + - id: 4b6612a8-cef9-464a-99d1-6eb93a15f318 + type: PRESET_ACTION + command: + id: e5e0f7c9-600e-4f60-b59b-ed87afe96ad3 + clearContent: true + type: TYPE + target: + type: description + elementDescriptor: The text box on the left side of the screen with Ask Buster a + question... + value: Can you update the existing metric to be a pie chart. Don't create a + report only update the existing metric. No matter what the data is you + should convert it to something that can be seen through a pie chart. + - id: 0358d205-ecbe-42a4-8d3b-53ce71c53bea + type: PRESET_ACTION + command: + id: 6f059746-b5d8-493b-ae95-4f0501b6b84f + type: CLICK + target: + type: description + elementDescriptor: Click the submit question in the text box of the left side of + the screen. + - id: 4ef2efe9-8056-49a1-9481-9d22606e0192 + type: MODULE + moduleId: 805447d3-e699-46f6-b1d2-0132840b3f20 + - id: 9a66ca43-1333-4ee2-8cb7-b34a3d059897 + type: MODULE + moduleId: 666c6102-d4fa-4c6e-998c-4b283337ad92 diff --git a/apps/momentic/tests/edit-with-ai-report.test.yaml b/apps/momentic/tests/edit-with-ai-report.test.yaml new file mode 100644 index 000000000..d2f5b9142 --- /dev/null +++ b/apps/momentic/tests/edit-with-ai-report.test.yaml @@ -0,0 +1,85 @@ +fileType: momentic/test +id: e1c95324-310b-48e4-beee-97fa99b2cba4 +name: edit-with-ai-report +description: Click into an existing report and hit modify with ai. Edit the + report through the chat. +schemaVersion: 1.0.21 +advanced: + viewport: + width: 1920 + height: 1080 + browserType: Chromium +retries: 0 +envs: + - name: development + default: true +steps: + - id: cbc160a7-92b0-4154-a318-7840a1566c44 + type: MODULE + moduleId: defc36e9-b0a7-4bfe-940f-7901493d5e5e + - id: 4f1e9740-ce75-4906-87cb-4bc356bc9bfe + type: PRESET_ACTION + command: + id: 14e30e64-1edd-49dd-b2af-bda5de7030c0 + type: CLICK + target: + type: description + elementDescriptor: Reports on the left side navigation panel + - id: 8feed9dd-09a8-4c2c-b684-e9540f2081a1 + type: PRESET_ACTION + command: + id: 4e43c0b0-a91a-4e55-bf0b-4d74782f486b + type: CLICK + target: + type: description + elementDescriptor: the bottom report title in the list of reports + - id: 5c331e38-5313-4386-a268-ca5e6d274b32 + type: PRESET_ACTION + command: + id: 99bd9a97-228f-4a8d-8e1b-a388dc1e88b6 + type: AI_ASSERTION + assertion: Confirm there is a report on the page with a title and some text with + at least one metric. The metric can be a graph, chart, or value. + - id: 8d30d08b-4866-409f-9d4f-97ade9eabf2b + type: PRESET_ACTION + command: + id: 8278a540-baee-44d6-add9-d239f41c98f8 + type: CLICK + target: + type: description + elementDescriptor: the 3 dots ... above the report at the top + - id: 68004556-eedf-4d5f-adeb-0a010a654ac9 + type: PRESET_ACTION + command: + id: 8d7f0464-fb48-4ae1-a9db-a78da87d9e6b + type: CLICK + target: + type: description + elementDescriptor: Refresh the report on the drop down of options + - id: 4ba5179d-2c40-482c-b95c-0a65ed95441f + type: PRESET_ACTION + command: + id: 6b3c19fa-341f-405c-80f2-38a500c55086 + type: WAIT_FOR_URL + matcher: + type: SUBSTRING + url: /reasoning + timeout: 15 + - id: 9ccfc73f-9bd8-4085-924e-66ed344c244d + type: PRESET_ACTION + command: + id: ae8183c6-53e8-4ce7-83e7-3912d4454cba + type: WAIT + delay: 10 + - id: 5140d67e-86b9-4e85-8deb-e8dae79446d6 + type: PRESET_ACTION + command: + id: c369d02a-a84d-4139-be57-b0cd3e3241e0 + type: AI_ASSERTION + assertion: We must confirm that on the right side there is a stream of + "reasoning messages" these may look like text, code blocks, sql + statements, etc. I want to verify that they are there and that there is + content. + - id: 7d7d43ef-094a-4b0c-acf4-03639c8efcfb + type: MODULE + moduleId: 782571e2-3c8e-49fe-a59e-0685924c5a43 diff --git a/apps/momentic/tests/poke-around-assets.test.yaml b/apps/momentic/tests/poke-around-assets.test.yaml new file mode 100644 index 000000000..27b0923f6 --- /dev/null +++ b/apps/momentic/tests/poke-around-assets.test.yaml @@ -0,0 +1,138 @@ +fileType: momentic/test +id: e257c5b0-a1c0-462a-8ebe-40eaa6aa5b42 +name: poke-around-assets +description: Clicks on each assets page and confirms that they are all working. + Dig into an asset and confirm that it shows and there are no errors. +schemaVersion: 1.0.21 +advanced: + viewport: + width: 1920 + height: 1080 + browserType: Chromium +retries: 0 +envs: + - name: development + default: true +steps: + - id: ec3b686b-19f6-44f0-a7a2-87ac70ff5646 + type: MODULE + moduleId: defc36e9-b0a7-4bfe-940f-7901493d5e5e + - id: a4016900-d9db-4b78-823b-c9c1a86fcf38 + type: PRESET_ACTION + command: + id: c82bb53a-5fa4-4533-9269-820a16ce46ec + type: CLICK + target: + type: description + elementDescriptor: Chat history link in sidebar + - id: f5edadec-c5dd-4ca7-a83b-77340a19a553 + type: PRESET_ACTION + command: + id: db2fe57e-6a83-4f87-bcb8-a58a67f61c7e + type: AI_ASSERTION + assertion: The page shows a list of chats ordered by last updated. + - id: d4f51536-0dc5-4220-8279-7aad4fb33b60 + type: PRESET_ACTION + command: + id: c3951a32-2300-4057-936b-a0a6bd21f14e + type: CLICK + target: + type: description + elementDescriptor: The first chat title + - id: 04501e1a-99e3-477b-b588-c1e2a0dea74d + type: PRESET_ACTION + command: + id: c0c882fc-7a21-493e-897c-79ea814a5612 + type: AI_ASSERTION + assertion: Previous messages have loaded and there is an input text box with Ask + Buster a question.. + - id: 048f09d7-b9a7-4414-b1bb-63094ecdc0d6 + type: PRESET_ACTION + command: + id: bf3b0068-aa8b-4e46-b189-01ba172bf1f9 + type: CLICK + target: + type: description + elementDescriptor: Metrics link in sidebar + - id: e2ef9894-6f3a-44a2-a002-c81ac1f608c0 + type: PRESET_ACTION + command: + id: ebb9a1c3-5d1e-4ae1-a389-2627dd6e7c24 + type: AI_ASSERTION + assertion: The page shows a list of metrics with various titles. + - id: 9d42930d-c514-41d7-a7e7-f25e4f67c1be + type: PRESET_ACTION + command: + id: 8180b086-ac45-4ee0-8de3-3a30c1ef37f5 + type: CLICK + target: + type: description + elementDescriptor: The first Metric title in the list + - id: 75ad2e09-0550-44ce-af16-71463149d094 + type: PRESET_ACTION + command: + id: 987f393c-51a7-4c18-b8e8-147c4c4c07d5 + type: AI_ASSERTION + assertion: Check that we have navigated to /app/metrics and that there is a + chart or value showing + - id: 619998a7-31ea-4680-8d06-b68e3c395228 + type: PRESET_ACTION + command: + id: c81265f6-b341-4200-962d-a6917dd1edb3 + type: CLICK + target: + type: description + elementDescriptor: Dashboards link in sidebar + - id: 09d205fa-81a0-4c14-8e68-91400ef40b81 + type: PRESET_ACTION + command: + id: 2d080dff-d441-4dd8-9870-9a562eaafc2c + type: AI_ASSERTION + assertion: The page shows a list of dashboards ordered by last updated + - id: ecf75305-c1c8-4a4b-ad47-084f49b27ea7 + type: PRESET_ACTION + command: + id: 3b5d81bc-348d-4bc8-aae1-2c951c7d88e5 + type: CLICK + target: + type: description + elementDescriptor: The first dashboard title + - id: 6b29840f-1c4c-457b-b234-117705d5ec79 + type: PRESET_ACTION + command: + id: 6d3cba6c-cbc1-4731-a72f-206a78fd0c95 + type: AI_ASSERTION + assertion: Confirm /app/dashboards is in the url and there are multiple graphs, + charts, or value metrics showing + - id: bc81da52-c83f-4d01-a4aa-500b70b0303a + type: PRESET_ACTION + command: + id: 2f98e713-8a5e-4f0b-b271-42aada44887a + type: CLICK + target: + type: description + elementDescriptor: Reports link in sidebar + - id: 329047cb-77f3-45b1-8437-7c9e1d8cd332 + type: PRESET_ACTION + command: + id: e17308c1-b9f7-4908-b909-058a2d380cfa + type: AI_ASSERTION + assertion: The page shows a list of reports ordered by updated at + - id: 6a1235f9-2623-4ada-8722-38a6faf44883 + type: PRESET_ACTION + command: + id: 51bcfee5-0b58-4ddb-9844-0cad2ead40ef + type: CLICK + target: + type: description + elementDescriptor: Click on the first report title + - id: 6246596c-0ef8-4629-8436-445cd93bea1c + type: PRESET_ACTION + command: + id: 202ac53e-8689-4038-b3b7-01d7a6a03890 + type: AI_ASSERTION + assertion: Confirm /app/reports is in the url and there is a report with text + and metric graphics + - id: e230c41a-b5a5-45ad-8e8b-10b85f6714ec + type: MODULE + moduleId: d5944b6b-f9c3-4952-8f0e-bec9bc31da95 diff --git a/apps/momentic/tests/update-and-save-metric-version.test.yaml b/apps/momentic/tests/update-and-save-metric-version.test.yaml new file mode 100644 index 000000000..76e5d4e05 --- /dev/null +++ b/apps/momentic/tests/update-and-save-metric-version.test.yaml @@ -0,0 +1,171 @@ +fileType: momentic/test +id: 83199e36-c987-437f-8e97-cd84e0fa87bc +name: update-and-save-metric-version +description: Click into a metric and look around the edit options. Make sure no + errors are thrown. Save a change to a metric, refresh the page and make sure + that it loads. +schemaVersion: 1.0.21 +advanced: + viewport: + width: 1920 + height: 1080 + browserType: Chromium +retries: 0 +envs: + - name: development + default: true +steps: + - id: 0e93bee3-d7b9-4e02-923c-a478d1b15b0b + type: MODULE + moduleId: defc36e9-b0a7-4bfe-940f-7901493d5e5e + - id: eb1d6165-555e-496c-a8a4-95480697d2cd + type: PRESET_ACTION + command: + id: 148d835f-b9cd-4f38-aaef-8ec6133e895e + type: CLICK + target: + type: description + elementDescriptor: Metrics on the left side navigation panel + - id: a427c4c3-9910-485a-a49f-572801cdca4c + type: PRESET_ACTION + command: + id: b48ef8ae-e668-40bc-b5d4-f1627651da38 + type: CLICK + target: + type: description + elementDescriptor: Click the second metric title from the top of the list of metrics + - id: 18ccec13-eb82-4434-8486-66547a2872b2 + type: PRESET_ACTION + command: + id: bbf3ad1e-4d2c-4501-a528-504fa216abe4 + type: WAIT_FOR_URL + matcher: + type: SUBSTRING + url: /metrics + timeout: 2 + - id: 4383c4b9-c590-480f-8812-03d369c5c679 + type: PRESET_ACTION + command: + id: 9c1a8b69-3b02-454d-b83c-c57abd95302a + type: AI_ASSERTION + assertion: Confirm there is a title and a metric displayed. The metric can be a + chart, graph, table, or value. + - id: 5ccb73fa-40d6-4b5a-80da-195f9f47a6c0 + type: PRESET_ACTION + command: + id: 40e714b7-40d2-4e39-8382-9775889c7ce8 + type: CLICK + target: + type: description + elementDescriptor: Results tab above the Metric + - id: 88da2ed7-aaa2-442d-bd03-2fe910297402 + type: PRESET_ACTION + command: + id: 6849fff3-8f0b-4c0a-bab3-d9f06caad107 + type: AI_ASSERTION + assertion: There is at least one row and one column shown in the results + - id: d0494935-7b0a-4fbd-a7e9-046c3a2b2ca3 + type: PRESET_ACTION + command: + id: 7870cedb-d930-42d5-8e03-ec8964958993 + type: CLICK + target: + type: description + elementDescriptor: SQL tab + - id: 164ed48c-bf61-462c-97a7-209a09780b4c + type: PRESET_ACTION + command: + id: 7e6dea65-7380-456c-8637-614e8d7bcfc6 + type: AI_ASSERTION + assertion: Confirm there is SQL code displayed in the center + - id: 5e574283-a2f4-46d2-b14a-def032b9889c + type: PRESET_ACTION + command: + id: df5914de-803b-4d0a-80ca-325dace3a7fc + type: CLICK + target: + type: description + elementDescriptor: three dots ... next to the share icon at the top + - id: 20244d30-4686-4555-84a6-f95e1a31ff0b + type: PRESET_ACTION + command: + id: 1fcc4272-22e1-4664-93c7-0c1b697ca4c8 + type: CLICK + target: + type: description + elementDescriptor: Edit chart option from the dropdown + - id: f8f16248-5d84-4625-ac87-29dcb2d1bc3d + type: PRESET_ACTION + command: + id: 135e99db-95df-4abc-9c33-66dbb61dd471 + type: AI_ASSERTION + assertion: "Editing panel is displayed from the right with tabs for Visualize, + Styling, and Colors. " + - id: bae7b04d-e6b4-4bc7-896c-e93538922edd + type: PRESET_ACTION + command: + id: cddb9248-02c0-43f0-902b-af542886ddab + type: CLICK + target: + type: description + elementDescriptor: Last scatter plot icon 3rd row down and 4th across in the + group of visualization icons. + - id: 2ae8fae5-6fa8-44d7-a4c6-db8fc2369138 + type: PRESET_ACTION + command: + id: 383a4142-98e2-473e-9887-331a6248d62f + type: AI_ASSERTION + assertion: Confirm there is a pop up at the bottom with "Unsaved Changes Reset Save" + - id: cf787422-678e-454d-a3ce-cff9ef444195 + type: PRESET_ACTION + command: + id: 7128c793-178a-482c-82f2-e1ae14802f49 + type: CLICK + target: + type: description + elementDescriptor: reset next to Unsaved changes + - id: edf92c40-e10e-4a7c-b39c-729cee49f6bc + type: PRESET_ACTION + command: + id: 1a868eb0-7ee6-44db-8497-43b720dc8ef6 + clearContent: true + type: TYPE + target: + type: description + elementDescriptor: The title above the metric + value: momentic-test-metric + - id: 15239cdc-448c-4e0f-91fb-08339c565966 + type: PRESET_ACTION + command: + id: ccec315a-7369-4a8a-950a-3bbba76c89aa + type: CLICK + target: + type: description + elementDescriptor: The empty whitespace below the metric + - id: df94543c-3fb2-4862-ab45-fb68dfc09639 + type: PRESET_ACTION + command: + id: 87161b69-c52f-44df-8310-8e5896b6ffb5 + type: AI_ASSERTION + assertion: Confirm there is a pop up at the bottom with "Unsaved Changes Reset Save" + - id: e2a0f74d-058a-4450-b4e7-812ec1d1d0c2 + type: PRESET_ACTION + command: + id: 4868bdef-3df2-4d39-a3a7-f7d6c68f70ee + type: CLICK + target: + type: description + elementDescriptor: Save next to Unsaved Changes + - id: cd696a80-d2b2-4f58-89d3-bbb0d95a198e + type: PRESET_ACTION + command: + id: 47e7bb3e-fe86-4414-8fbb-1983fd9edca6 + loadTimeout: 2 + type: REFRESH + - id: 5de3a198-c9b0-4ba3-a23f-7c150ba66bf8 + type: PRESET_ACTION + command: + id: bb8ed7b3-5fad-4eca-8640-a33167547f71 + type: AI_ASSERTION + assertion: Confirm there is a metric with "momentic-test-metric" in the title + above it diff --git a/apps/web/src/components/features/auth/LoginForm.tsx b/apps/web/src/components/features/auth/LoginForm.tsx index cb51a21a7..7d8fc1f4a 100644 --- a/apps/web/src/components/features/auth/LoginForm.tsx +++ b/apps/web/src/components/features/auth/LoginForm.tsx @@ -306,6 +306,23 @@ const AlreadyHaveAccount: React.FC<{ setSignUpFlow: (value: boolean) => void; signUpFlow: boolean; }> = React.memo(({ setErrorMessages, setPassword2, setSignUpFlow, signUpFlow }) => { + const handleToggleClick = () => { + if (!signUpFlow) { + // User clicked "Sign up" - redirect to get-started page + window.location.href = 'https://www.buster.so/get-started'; + } else { + // User clicked "Sign in" - use existing toggle logic + setErrorMessages([]); + setPassword2(''); + setSignUpFlow(!signUpFlow); + } + + // TODO: Original toggle logic preserved for future re-enablement + // setErrorMessages([]); + // setPassword2(''); + // setSignUpFlow(!signUpFlow); + }; + return (
@@ -317,11 +334,7 @@ const AlreadyHaveAccount: React.FC<{ variant="primary" size="xs" className={cn('ml-1 cursor-pointer font-normal')} - onClick={() => { - setErrorMessages([]); - setPassword2(''); - setSignUpFlow(!signUpFlow); - }} + onClick={handleToggleClick} > {!signUpFlow ? 'Sign up' : 'Sign in'} diff --git a/apps/web/src/components/features/auth/WelcomeSidebar.tsx b/apps/web/src/components/features/auth/WelcomeSidebar.tsx index 3d5803697..4436b935e 100644 --- a/apps/web/src/components/features/auth/WelcomeSidebar.tsx +++ b/apps/web/src/components/features/auth/WelcomeSidebar.tsx @@ -1,4 +1,3 @@ -import { Link } from '@tanstack/react-router'; import type React from 'react'; import { BusterLogoWithText } from '@/assets/svg/BusterLogoWithText'; import { Text } from '@/components/ui/typography'; @@ -10,9 +9,9 @@ export const WelcomeToBuster: React.FC<{
- + - +

(({ children, loadingData, hasData, errorData, isTable, className }, ref) => { const cardClass = React.useMemo(() => { if (loadingData || errorData || !hasData) return 'h-full max-h-[600px]'; - if (isTable) return ''; + if (isTable) return 'h-full'; return 'h-full max-h-[600px]'; }, [isTable, loadingData, hasData, errorData]); @@ -162,7 +162,7 @@ const MetricViewChartCardContainer = React.forwardRef<
x?.chart_config?.selectedChartType, []) } + ); + const { isFetched: isFetchedMetricData } = useGetMetricData( + { id: metricId }, + { select: useCallback((x: BusterMetricData) => x, []) } + ); + const isTable = selectedChartType === 'table' && isFetchedMetricData; + const content = metricId ? ( - + = ({ children }) => { +const MetricResizeContainer: React.FC> = ({ + children, + isTable, +}) => { const width = (useResizableValue('width') as number) || 700; const ref = useRef(null); const element = useElement(); const editor = useEditorRef(); const editorWidth = useSize(ref)?.width ?? 700; const isSelected = useSelected(); - // const { isDragging, handleRef } = useDraggable({ - // element: element, - // }); const align = 'center'; // Default align for metrics const selectNode = () => { @@ -86,11 +98,11 @@ const MetricResizeContainer: React.FC = ({ children }) => { }; const height = useMemo(() => { + if (isTable) return undefined; const ratio = 9 / 16; if (typeof width !== 'number') return (editorWidth ?? 400) * ratio; - return width * ratio; - }, [width, editorWidth]); + }, [width, editorWidth, isTable]); return (
= ({ children }) => {
{ convertNumberTo: 'day_of_week', }) ).toMatch(/Monday/); - expect( - formatLabel(1, { - columnType: 'date', - style: 'date', - convertNumberTo: 'quarter', - }) - ).toMatch(`${currentYear} QQ`); }); it('should handle null/undefined dates', () => { diff --git a/apps/web/src/lib/columnFormatter.ts b/apps/web/src/lib/columnFormatter.ts index c2bf26a5d..a4ae990f3 100644 --- a/apps/web/src/lib/columnFormatter.ts +++ b/apps/web/src/lib/columnFormatter.ts @@ -133,7 +133,6 @@ const formatLabelDate = ( isUTC = false, convertNumberTo, } = props; - const dateFormat = dateFormatProp === 'auto' ? autoFormats(convertNumberTo) : dateFormatProp; return formatDate({ diff --git a/apps/web/src/lib/date.ts b/apps/web/src/lib/date.ts index b5a5473df..fb8e0b3cb 100644 --- a/apps/web/src/lib/date.ts +++ b/apps/web/src/lib/date.ts @@ -15,8 +15,6 @@ import isDate from 'lodash/isDate'; import lodashIsNaN from 'lodash/isNaN'; import isNumber from 'lodash/isNumber'; import isString from 'lodash/isString'; -import { SupportedLanguages } from '@/config/languages'; -import { getBrowserLanguage } from './language'; import { isNumeric } from './numbers'; dayjs.extend(relativeTime); diff --git a/packages/ai/src/steps/analyst-agent-steps/create-todos-step/create-todos-system-prompt.txt b/packages/ai/src/steps/analyst-agent-steps/create-todos-step/create-todos-system-prompt.txt index f5b944029..fb2a650c9 100644 --- a/packages/ai/src/steps/analyst-agent-steps/create-todos-step/create-todos-system-prompt.txt +++ b/packages/ai/src/steps/analyst-agent-steps/create-todos-step/create-todos-system-prompt.txt @@ -3,6 +3,13 @@ You are a specialized AI agent within an AI-powered data analyst system. You are Your role is to interpret a user request—using the chat history as additional context—and break down the request into a markdown TODO list. This TODO list should break down each aspect of the user request into specific TODO list items that the AI-powered data analyst system needs to think through and clarify before proceeding with its analysis (e.g., looking through data catalog documentation, writing SQL, building charts/dashboards, or fulfilling the user request). **Important**: Pay close attention to the conversation history. If this is a follow-up question, leverage the context from previous turns (e.g., existing data context, previous plans or results) to identify what aspects of the most recent user request needs need to be interpreted. --- +### Conversational Handling +If the user request is casual, meta, or exploratory (e.g., greetings like "Hello", "Hey there", or meta-questions like "What can I ask?", "What types of data do you have access to?"), you should: +- Still produce a TODO list (to follow the system requirement), but make it **lightweight and adaptive**. +- For greetings, produce a simple TODO like `[ ] Acknowledge the user and respond in a friendly manner`. +- For meta-questions (like "what can I ask?"), produce TODOs such as `[ ] Suggest categories of analytics-related questions the user can ask` or `[ ] List types of available data sources`. +- Do NOT block the interaction or claim that only analytics-related tasks are possible — instead, adapt the TODO list to match the user’s intent. +--- ### Tool Calling You have access to various tools to complete tasks. Adhere to these rules: 1. **Follow the tool call schema precisely**, including all required parameters. @@ -64,6 +71,10 @@ The TODO list should break down each aspect of the user request into tasks, base - The TODO list is meant to guide the system's internal decision-making process, so it should focus on listing the decisions that need to be made, not on providing potential answers or clarifications. - Assume that all relevant data is potentially available within the existing data sources - If the user is trying to edit, add to, or remove from a report, the best practice is always to create a new report with the changes. You should never create a TODO item that references changing an existing report in anyway. +**Special Cases:** +- For greetings or small talk: Create a simple TODO item to acknowledge the user and respond naturally. +- For exploratory or meta-requests (e.g., "what can I ask?", "what data do you have?"): Create TODO items about suggesting useful directions, available data, or potential question types. +- For ambiguous or undefined requests (e.g., "show me something interesting"): Create TODO items that capture the need to define what "interesting" or "important" might mean in context. **Note**: The TODO list must focus on enabling the system to make its own assumptions and decisions without seeking clarification from the user. Do not use phrases like "Clarify..." in the TODO list items to avoid implying that the system should ask the user for further input. --- ### Examples @@ -131,11 +142,17 @@ The TODO list should break down each aspect of the user request into tasks, base [ ] Determine if USPS tracking number mappings exist in the available data [ ] Determine how to identify the relationship between FedEx and USPS tracking numbers for Smartpost shipments ``` +### User Request: "I have a Fedex Smartpost tracking number and I need the USPS tracking number. Can you find that for me? Here is the fedex number: 286744112345" +``` +[ ] Determine if FedEx Smartpost tracking data is available in the current data sources +[ ] Determine if USPS tracking number mappings exist in the available data +[ ] Determine how to identify the relationship between FedEx and USPS tracking numbers for Smartpost shipments +``` --- ### System Limitations -- The system is not capable of writing python, building forecasts, or doing "what-if" hypothetical analysis - - If the user requests something that is not supported by the system (see System Limitations section), include this as an item in the TODO list. - - Example: `Address inability to do forecasts` +- The system cannot do unsupported operations like writing python code, building forecasts, or running "what-if" hypothetical analysis. + - If the user asks for these, include a TODO item like `Address inability to do forecasts`. + - For non-analytics requests (e.g., greetings, exploratory questions, meta-questions), you should **not** default to "inability" responses. Instead, produce TODO items that reflect the conversational nature of the request. - Reports from previous messages should never be edited, instead new reports should be made with any changes. Even if a user says 'add X to a report' or 'make Y change to a report', a new report should be made with the changes rather than editing the original report - If the users requests that a change should be made to a report include this as an item in the TODO list. - Example: `Create a new report with the requested changes` diff --git a/packages/ai/src/tools/visualization-tools/reports/create-reports-tool/create-reports-tool-investigation-description.txt b/packages/ai/src/tools/visualization-tools/reports/create-reports-tool/create-reports-tool-investigation-description.txt index c9b3fc7c8..91ed195af 100644 --- a/packages/ai/src/tools/visualization-tools/reports/create-reports-tool/create-reports-tool-investigation-description.txt +++ b/packages/ai/src/tools/visualization-tools/reports/create-reports-tool/create-reports-tool-investigation-description.txt @@ -27,7 +27,7 @@ Creates a report file with markdown content. Reports are used to document findin ```markdown [Introduction/summary of key findings/key points, no header] -## Key finding +## [Key finding section, the title should be the key talking point of the section] [Brief, simple copy about the key finding followed by the section's supporting visualization] ...additional "key finding" sections + building of the narrative... diff --git a/packages/ai/src/tools/visualization-tools/reports/create-reports-tool/create-reports-tool-standard-description.txt b/packages/ai/src/tools/visualization-tools/reports/create-reports-tool/create-reports-tool-standard-description.txt index 2d9d80d65..31f81d181 100644 --- a/packages/ai/src/tools/visualization-tools/reports/create-reports-tool/create-reports-tool-standard-description.txt +++ b/packages/ai/src/tools/visualization-tools/reports/create-reports-tool/create-reports-tool-standard-description.txt @@ -31,7 +31,7 @@ Based on sales data from the last 6 months, **Linda Mitchell leads all sales rep ```markdown [Introduction/summary of key findings/key points, no header] -## Key finding +## [Key finding section, the title should be the key talking point of the section] [Content describing the key finding, followed by the section’s supporting visualization] ...as many key findings as needed to build the narrative... diff --git a/packages/database/drizzle/0110_third_ozymandias.sql b/packages/database/drizzle/0110_third_ozymandias.sql index fea0acfc7..30d49ca55 100644 --- a/packages/database/drizzle/0110_third_ozymandias.sql +++ b/packages/database/drizzle/0110_third_ozymandias.sql @@ -1,5 +1,5 @@ -- Update existing values in chats table to match asset_type_enum values -UPDATE public"chats" SET "most_recent_file_type" = 'metric_file' WHERE "most_recent_file_type" = 'metric';--> statement-breakpoint +UPDATE public."chats" SET "most_recent_file_type" = 'metric_file' WHERE "most_recent_file_type" = 'metric';--> statement-breakpoint UPDATE public."chats" SET "most_recent_file_type" = 'dashboard_file' WHERE "most_recent_file_type" = 'dashboard';--> statement-breakpoint UPDATE public."chats" SET "most_recent_file_type" = 'report_file' WHERE "most_recent_file_type" = 'report';--> statement-breakpoint ALTER TABLE "chats" ALTER COLUMN "most_recent_file_type" SET DATA TYPE "public"."asset_type_enum" USING "most_recent_file_type"::"public"."asset_type_enum";--> statement-breakpoint diff --git a/packages/server-shared/src/metrics/charts/chatConfig.defaults.ts b/packages/server-shared/src/metrics/charts/chatConfig.defaults.ts index 701ed4139..0d7568eed 100644 --- a/packages/server-shared/src/metrics/charts/chatConfig.defaults.ts +++ b/packages/server-shared/src/metrics/charts/chatConfig.defaults.ts @@ -7,7 +7,7 @@ export const MIN_DONUT_WIDTH = 15; export const DEFAULT_DAY_OF_WEEK_FORMAT = 'ddd'; export const DEFAULT_DATE_FORMAT_DAY_OF_WEEK = 'dddd'; export const DEFAULT_DATE_FORMAT_MONTH_OF_YEAR = 'MMMM'; -export const DEFAULT_DATE_FORMAT_QUARTER = 'YYYY [Q]Q'; +export const DEFAULT_DATE_FORMAT_QUARTER = '[Q]Q'; export const ENABLED_DOTS_ON_LINE_SIZE = 4; export const DEFAULT_COLUMN_METADATA: ColumnMetaData[] = [];