POC of "fake" PPR for data - #4450
Draft
conico974 wants to merge 35 commits into
Draft
Conversation
🦋 Changeset detectedLatest commit: 313e1b9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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
|
Summary of the deployments:
Test content
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎ Awaiting the start of a new Argos build… |
conico974
force-pushed
the
conico/ppr-experiment
branch
from
August 21, 2026 13:47
d59c7b6 to
19401a1
Compare
…refactor headers handling, and add new layout and page components
…mponents, and update utility functions for visitor tokens
…t handling, and streamline API token management
…ters, and enhance route handling
…: enhance caching logic and add API token handling
…ing and improve context management
…d cachedGenerateSitePageMetadata functions
… entries are partitioned from static ones
…ts to ensure independent revalidation and improve data fetching efficiency
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…RouteParams by removing unnecessary cache path variation
…ation for decoded PPR defaults
…stency in getPPRHeaderRouteParams
… requirement and update related handling in middleware, tests, and proxy scripts.
`mock.module` replaces a module for the whole bun test process, so mocking `@/lib/context` and `jwt-decode` wholesale in the PPR route params test broke every later test file that imported them. Spread the real context module and sign a real JWT instead. Also restore the `x-gitbook-route-site` debug header, commented out by mistake.
conico974
force-pushed
the
conico/ppr-experiment
branch
from
August 26, 2026 10:57
19401a1 to
683ed85
Compare
…ng revalidation tokens for scoped content API tokens, enhancing caching and claims management across components.
`SitePPRLayout` resolved a full site context, which fetches the published site (site-scoped token) and the space with its revision. Only the site part is needed to render the shell, and the shell is re-rendered on every request. Split `GitBookSiteContext` into a `GitBookSiteScopeContext` holding everything derived from the published site, and the space context it is merged with. The PPR layout now resolves only the site scope, under the header scope so it shares its site fetch, and delegates the announcement, header, table of contents, footer, admin toolbar and the page/tag icons to cached components that resolve the revision under their own scope. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e definitions for site context
conico974
had a problem deploying
to
2v-preview
September 2, 2026 19:17 — with
GitHub Actions
Failure
conico974
had a problem deploying
to
2c-preview
September 2, 2026 19:17 — with
GitHub Actions
Failure
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.
This is really an ISR route, but it is a POC of how we could use this to basically achieve 100% hit rate as long as we prerender some small portions of a website.
This will not be considered a cache hit at the CF/vercel level, but virtually every possible combinations will be covered by the component cache.
If we decide to go this route, we'll need to figure out a better way to pass token data around