Skip to content

add support for mainComponentPath#243

Merged
seveibar merged 1 commit into
mainfrom
maincomppath
Oct 13, 2025
Merged

add support for mainComponentPath#243
seveibar merged 1 commit into
mainfrom
maincomppath

Conversation

@seveibar

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented Oct 13, 2025

Copy link
Copy Markdown

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

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Oct 13, 2025 10:42pm

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

Copy link
Copy Markdown

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.

ℹ️ 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

Comment on lines 173 to 181
png_width: "800",
png_height: "600",
fs_map: encodeURIComponent(encodedFsMap),
main_component_path: mainComponentPath
? encodeURIComponent(mainComponentPath)
: undefined,
project_base_url: encodeURIComponent(projectBaseUrl),
}
const queryString = Object.entries(params)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid sending undefined main_component_path parameter

When mainComponentPath is not provided, the new query params object still includes main_component_path with a value of undefined, because the subsequent Object.entries(params)/map logic stringifies the property instead of omitting it. Existing CircuitPreview usages that do not specify mainComponentPath will now request the 3D preview with main_component_path=undefined, which can cause the backend to look for a file literally named "undefined" rather than falling back to the default entrypoint. Filter out undefined values before building the query string so that the parameter is only sent when a path is supplied.

Useful? React with 👍 / 👎.

@seveibar seveibar merged commit a10da8c into main Oct 13, 2025
5 checks passed
@seveibar seveibar deleted the maincomppath branch October 13, 2025 23:15
jddark62 pushed a commit to jddark62/docs that referenced this pull request Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant