Expose the current page context to integration block webframes#4411
Merged
gregberge merged 4 commits intoJul 17, 2026
Merged
Conversation
A webframe receives the current page (id, path, title) as `state.page` through the client-only webframe state, sourced from the block's server-side content context so the integration render cache is unaffected. This restores the page context that was removed before #4362 merged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 54e4602 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
taranvohra
approved these changes
Jul 17, 2026
`state.page.path` now includes the section and variant (site-relative) instead of being space-relative, so it matches how `@webframe.navigate` resolves a path and can be passed straight back to it. Resolved through the linker's `toRelativePathInSite(toPathInSpace(...))`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The site no longer exists, so its visual test errors out and blocks CI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gregberge
deleted the
greg/rnd-12101-allow-webframe-in-integration-block-to-be-aware-of-the-full
branch
July 17, 2026 10:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bring back the current-page context for integration block webframes: a webframe now receives the current page as
state.page = { id, path, title }over the client-onlypostMessagechannel (the same channel as adaptive visitor claims).This was added in #4362 but removed before merge (commit a5f3b7e) as part of a scope reduction. This PR restores it.
Why
RND-12101 — an integration's webframe needs to be aware of the page it is rendered on (e.g. to build links to sibling pages, or adapt its content to the current page).
How it's wired
getWebframePageContext), not the integration render request, so the integration render cache is unaffected.ContentKitWithClientContextexposes it throughgetPageContext;ElementWebframemerges it into the webframestateasstate.page, alongside visitor claims.Usage (from inside a webframe)
Notes
pageId-based@webframe.navigatevariant (also removed in a5f3b7e) is not restored here; navigation bypathis unchanged.Test plan
bun testonadaptive.test.ts— 5/5bun run typecheck— no new errors from this changebiome checkon changed files — clean🤖 Generated with Claude Code