docs: when-to-use guide for webjs-frame + webjs-stream (Turbo lineage)#479
Merged
Conversation
added 2 commits
June 12, 2026 11:23
Document the two region primitives that solve cases a page/layout cannot, and surface their Hotwire lineage so AI agents transfer Turbo muscle memory. The data-fetching guide gets a deferred/self-refreshing <webjs-frame> section (with the <webjs-suspense> composition + the streamed-frame byte caveat), a surgical-update <webjs-stream> section, and the four-way decision boundary (async render vs webjs-suspense vs webjs-frame vs webjs-stream). <webjs-frame> is noted as webjs's take on Turbo Frames and <webjs-stream> on Turbo Streams across the data-fetching guide, the client-router doc page, agent-docs/advanced.md, and the scaffold AGENTS.md. Closes #475.
The webjs-frame section pointed at a nonexistent agent-docs/data-fetching.md; the decision-boundary content lives in the docs-site page. Point at it.
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.
Region-primitives when-to-use guide (originally #476, reopened against main after the #470 base branch was merged + deleted).
A single "which one when" guide for the four data / region primitives (async
render(),<webjs-suspense>,<webjs-frame>,<webjs-stream>), plus the Turbo lineage so agents can transfer Hotwire muscle memory.<webjs-frame>: a server-rendered, URL-addressable sub-region that loads / reloads INDEPENDENTLY of a full-page navigation and ships zero component JS (self-refreshing widgets, below-the-fold lazy regions, URL-addressable panels). Truly inspired by Turbo Frames.<webjs-frame>+<webjs-suspense>: a deferred frame whose route is itself slow wraps that data in<webjs-suspense>, so the frame defers the load and the slow data streams in behind a fallback inside the frame. Caveat documented: a streamed framed route skips the frame's byte-saving subtree extraction.<webjs-stream>: the only SURGICAL element-level update primitive (append / prepend / before / after / replace / update / remove) AND the live-channel applier (connectWS/broadcasttorenderStream). Truly inspired by Turbo Streams.Surfaces updated: the data-fetching doc page (decision boundary + the frame/stream sections), the client-router doc page,
agent-docs/advanced.md, and the scaffoldAGENTS.md. Docs only, no code changes. Fresh-context reviewed; fixed a deaddata-fetching.mdcross-reference found in review.