Skip to content

Expose MongooseStudioChartColors to dashboard evaluation and centralize palette#187

Merged
vkarpov15 merged 2 commits intomainfrom
codex/define-mongoosestudiochartcolors-in-dashboard
Mar 22, 2026
Merged

Expose MongooseStudioChartColors to dashboard evaluation and centralize palette#187
vkarpov15 merged 2 commits intomainfrom
codex/define-mongoosestudiochartcolors-in-dashboard

Conversation

@vkarpov15
Copy link
Copy Markdown
Member

Motivation

  • Centralize the chart color palette and ensure MongooseStudioChartColors is available in both the chat script sandbox and the dashboard evaluation VM so chart-producing scripts behave the same in both contexts.

Description

  • Add backend/constants/mongooseStudioChartColors.js which exports the shared array of palette hex codes.
  • Import and use the shared MongooseStudioChartColors in the chat script sandbox at backend/actions/ChatMessage/executeScript.js.
  • Expose MongooseStudioChartColors in the dashboard evaluation VM context in backend/db/dashboardSchema.js so dashboard code can reference it directly.
  • Add a test in test/Dashboard.evaluate.objectid.test.js that asserts MongooseStudioChartColors is present in the dashboard sandbox.

Testing

  • Ran npx eslint against the modified files which completed without lint errors.
  • Attempted npx mocha test/Dashboard.evaluate.objectid.test.js under a CI-like environment where mongodb-memory-server tried to download a MongoDB binary and the download returned HTTP 403, causing the test run to fail in this environment.
  • Running the tests locally in this environment without a reachable MongoDB instance resulted in ECONNREFUSED, so full test verification requires either network access for mongodb-memory-server or a local/available MongoDB binary.

Codex Task

Copilot AI review requested due to automatic review settings March 22, 2026 14:38
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
studio Ready Ready Preview, Comment Mar 22, 2026 2:44pm

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f5dff285b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend/constants/mongooseStudioChartColors.js Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 centralizes the chart color palette and makes MongooseStudioChartColors consistently available in both the chat script VM and the dashboard evaluation VM, so chart-producing scripts behave the same across execution contexts.

Changes:

  • Added a shared backend constant backend/constants/mongooseStudioChartColors.js for the palette.
  • Updated the chat script sandbox and dashboard evaluation VM to expose MongooseStudioChartColors.
  • Added a test asserting MongooseStudioChartColors is present in the dashboard evaluation sandbox.

Reviewed changes

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

File Description
backend/constants/mongooseStudioChartColors.js Introduces the centralized chart color palette constant.
backend/actions/ChatMessage/executeScript.js Replaces the inline palette with the centralized constant in the chat VM sandbox.
backend/db/dashboardSchema.js Injects MongooseStudioChartColors into the dashboard evaluation VM context.
test/Dashboard.evaluate.objectid.test.js Adds coverage that the dashboard sandbox exposes MongooseStudioChartColors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/constants/mongooseStudioChartColors.js Outdated
Comment thread backend/actions/ChatMessage/executeScript.js
Comment thread backend/db/dashboardSchema.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@vkarpov15 vkarpov15 merged commit 01c530b into main Mar 22, 2026
30 checks passed
@vkarpov15 vkarpov15 deleted the codex/define-mongoosestudiochartcolors-in-dashboard branch March 22, 2026 23:15
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