Skip to content

Conversation

@infoxicator
Copy link
Owner

this is what the new interface loos like

Copy link

@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.

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

@liady
Copy link

liady commented Oct 27, 2025

Initial pass looks good.
q - why do you prefer overriding iframeRenderData instead of adding to the merged object?

@infoxicator
Copy link
Owner Author

Initial pass looks good. q - why do you prefer overriding iframeRenderData instead of adding to the merged object?

no preference I guess we can merge, we should deprecate iframeRenderData at some point though?

@yannj-fr
Copy link

I think we have to be consistent with naming also of the event, like ui-lifecycle-iframe-render-data
I think people would expect the renderData to contain all data

@infoxicator
Copy link
Owner Author

@codex review

Copy link

@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.

ℹ️ 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 on lines 325 to +335
}

if (resource.mimeType === 'text/html+skybridge') {
const widgetStateKey = `openai-widget-state:${toolName}:`;
const widgetStateKey = `openai-widget-state:${toolName ?? ''}:`;
htmlContent = htmlContent.replace(
/<head([^>]*)>/i,
`<head$1>\n${apiScript(
`<head$1>\n${apiScript({
widgetStateKey,
toolInput,
initialRenderData,
toolResponseMetadata
)}\n`
toolOutput,
toolResponseMetadata,

Choose a reason for hiding this comment

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

P1 Badge Preserve iframe render data when injecting skybridge context

In processHTMLResource the value passed into the apiScript for toolOutput is computed as mcpContextProps?.toolOutput ?? initialRenderData. Because HTMLResourceRenderer already merges iframeRenderData/metadata with mcpContextProps.toolOutput, any time toolOutput is provided the merged render data is discarded and only the raw MCP tool output is embedded into the skybridge HTML (openaiAPI.toolOutput). This contradicts the docs that say the sandbox payload merges iframeRenderData with toolOutput and means HTML resources that depend on those extra fields won’t see them until a later postMessage. Consider merging the two sources before injection (e.g. spreading initialRenderData together with mcpContextProps?.toolOutput) so the initial HTML payload matches what is sent via postMessage.

Useful? React with 👍 / 👎.

@infoxicator infoxicator merged commit 385b662 into feature/skybridge-client Nov 2, 2025
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.

4 participants