Skip to content

app props / host state adjustments & improvements - #26

Merged
petekp merged 11 commits into
mainfrom
pkp/workbench-live-channels
Mar 14, 2026
Merged

app props / host state adjustments & improvements#26
petekp merged 11 commits into
mainfrom
pkp/workbench-live-channels

Conversation

@petekp

@petekp petekp commented Mar 13, 2026

Copy link
Copy Markdown
Contributor
  • Makes App Props and Host State editing truly bidirectional without wiping invalid drafts
  • Clarifies that Host State is ChatGPT-specific, not standard MCP Apps persistence
  • Small follow-up: metadata-only tool results now sync into the preview, and deleting Host State actually clears it

@petekp
petekp marked this pull request as draft March 13, 2026 16:32
@petekp
petekp changed the base branch from app-preview-polish to main March 13, 2026 19:57
@petekp petekp changed the title Pkp/workbench live channels app props / host state adjustments & improvements Mar 14, 2026
@petekp
petekp force-pushed the pkp/workbench-live-channels branch from 52f09ef to d246b0f Compare March 14, 2026 00:47
@petekp
petekp marked this pull request as ready for review March 14, 2026 15:27
@assistant-ui assistant-ui deleted a comment from vercel Bot Mar 14, 2026
@petekp
petekp merged commit f1a0d93 into main Mar 14, 2026
3 of 4 checks passed
@petekp
petekp deleted the pkp/workbench-live-channels branch March 14, 2026 15:31

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

Reviewed commit: c47f651063

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

JSON.parse(toolResponseMetadataStr),
);

if (!toolResult) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Send a clear tool-result update when both channels are null

Returning early here prevents bridge.sendToolResult(...) from running when both toolOutput and toolResponseMetadata are cleared, so the iframe keeps the previous tool result state. This now causes stale preview data in the new metadata-only flow: if metadata is sent while toolOutput is null and then metadata is removed, no clearing message is emitted and the widget continues to see the old _meta.

Useful? React with 👍 / 👎.

Comment on lines +182 to +183
intrinsicHeight !== null
? Math.min(Math.max(intrinsicHeight, 0), maxHeight)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fallback to max height when intrinsic height is non-positive

This new clamp treats intrinsicHeight = 0 as a valid rendered height, which collapses the widget container to 0px. The previous behavior intentionally fell back to maxHeight for non-positive intrinsic heights, and 0 can occur transiently from host sizing callbacks before real measurement is available, causing the preview to disappear until another resize event arrives.

Useful? React with 👍 / 👎.

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