Skip to content

Fix published-page revalidation and database peek routing - #176

Open
LuuSir wants to merge 1 commit into
classmethod:masterfrom
LuuSir:fix/mobile-public-page-revalidation
Open

LuuSir wants to merge 1 commit into
classmethod:masterfrom
LuuSir:fix/mobile-public-page-revalidation

Conversation

@LuuSir

@LuuSir LuuSir commented Oct 16, 2026

Copy link
Copy Markdown

A published database item can render initially and then switch to Notion's page-not-found state when the client revalidates it. The generated Worker does not restore omitted spaceDomain/published-domain context, can add a container blockId despite an existing pageId, and ignores the database peek's ?p= target when inferring a page.

This keeps requests in the configured published-site context, preserves explicit page IDs, and prefers a valid peek page over the Referer's container path or pretty slug. Existing scoped domain rewriting and Notion routing-header forwarding are preserved.

Validation:

  • Added 11 tests that execute the generated Worker with mocked upstream responses; 5 fail on unmodified master and all 11 pass with the fix.
  • Coverage includes omitted site context, explicit pageId/blockId, compact and dashed peek IDs, invalid peeks, slug/root fallback, routing headers and unchanged note content.
  • npm run build passes; the regression suite is also wired into CI.

The regression tests are deterministic request/response checks; they do not claim a live mobile-browser test.

Copilot AI balanced review requested due to automatic review settings October 16, 2026 08:33

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

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.

2 participants