Skip to content

trunk-merge/pr-87243/815d15c4-2f63-4013-b873-e3c3cc9bc344 - #91372

Closed
trunk-io[bot] wants to merge 5 commits into
masterfrom
trunk-merge/pr-87243/815d15c4-2f63-4013-b873-e3c3cc9bc344
Closed

trunk-merge/pr-87243/815d15c4-2f63-4013-b873-e3c3cc9bc344#91372
trunk-io[bot] wants to merge 5 commits into
masterfrom
trunk-merge/pr-87243/815d15c4-2f63-4013-b873-e3c3cc9bc344

Conversation

@trunk-io

@trunk-io trunk-io Bot commented Aug 30, 2026

Copy link
Copy Markdown
Trunk Merge Pull Request Banner

This pull request was created and is being managed by Trunk Merge.

This pull request is based on the master branch at SHA da93d8bbd71e23d49a8372ec43b4a4c7f75c1316.

See more details here.

When CI completes, this pull request will be closed automatically.

Pull Requests Being Tested

This pull request is testing the changes from pull request 87243.

k11kirky and others added 5 commits August 27, 2026 20:45
Canvas code can now import the PostHog bridge as a typed, versioned module in both tiers: the cloud builder inlines canvas-sdk.mjs at build time, and the preview sandbox rewrites the import to a blob module. The window.ph global stays, so existing canvases and published artifacts keep working; canvasSdkVersion bumps to 0.2.0 with a supportedSdkVersions list so 0.1.0 sources keep building.

Generated-By: PostHog Desktop
Task-Id: fafe1078-8f88-48c7-ad19-38c96a30d384
Generated-By: PostHog Desktop
Task-Id: 1ffdb6cb-dcc9-44fd-9dfc-f06736efeee8
The preview sandbox already has a mechanism for resolving bare specifiers, so
use it instead of a bespoke Babel pass. The sandbox CSP already allows `blob:`,
so the SDK module is minted as a blob and registered in the import map. That
drops the exported AST mutator, its three visitors, and its three unit tests.

Also:

- The whitelist's allowed specifiers now come from the platform contract rather
  than a hand-merged set, removing the SDK special case.
- The contract test reads the builder's manifest.json off disk and compares the
  fields the client actually reads, so vendored-copy drift fails instead of
  comparing two literals in one file.
- The version test is parameterized over admitted and rejected versions, and the
  `_project` helper builds against the current SDK version instead of pinning
  0.1.0, which is what made the legacy-version case look redundant.
- `canvas-sdk.d.ts` moves into the skill's references/ directory. Skills are
  copied standalone into the sandbox, so the repo path it was referenced by did
  not resolve for the authoring agent it was written for. Its `results` type no
  longer claims every insight kind returns the trends series shape, matching the
  schema the host validates against.
- The scaffold reference still told agents not to import `ph`, contradicting the
  guidance added alongside it.
- Dropped a dead `supportedSdkVersions` fallback, and trimmed comments that
  described the replaced mechanism.

Generated-By: PostHog Desktop
Task-Id: fa274704-6266-4baa-8379-7c4999e2d007
Admission and resolution used to be one list in the preview. Now the import check reads the platform manifest while the import map is still built from FREEFORM_WHITELIST, so admitting a specifier server-side passes validation and then fails to resolve in the iframe. Assert every admitted specifier has a map entry.

The preview also serves its own vendored copy of the SDK module, guarded only by a comment. Assert it matches the builder's canvas-sdk.mjs.

Generated-By: PostHog Desktop
Task-Id: 96b2ec13-6921-4991-be65-afbc04adb63e
@trunk-io

trunk-io Bot commented Aug 30, 2026

Copy link
Copy Markdown
Author

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@trunk-io trunk-io Bot closed this Aug 30, 2026
@trunk-io
trunk-io Bot deleted the trunk-merge/pr-87243/815d15c4-2f63-4013-b873-e3c3cc9bc344 branch August 30, 2026 12:35
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