Skip to content

fix(daily): revert RSC shell to fix React #412 on instant nav - #190

Open
mkayander wants to merge 5 commits into
mainfrom
cursor/daily-rsc-shell-b999
Open

mkayander wants to merge 5 commits into
mainfrom
cursor/daily-rsc-shell-b999

Conversation

@mkayander

@mkayander mkayander commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Problem

React error #412 ("Connection closed") on /daily during client-side navigation.

Solution

Revert daily page to client-only pattern (pre-RSC-split):

  • Page-level getDailyInitialData() with 10s timeout
  • ApolloHydrationProvider + DailyPageView

Revert privacy i18n helper extractiongetServerTranslationFunctions() caused privacy page to stall on Vercel preview (stuck loading skeleton, E2E failures on /privacy).

Kept

  • DailyPageSkeleton for loading.tsx
  • 10s cap on LeetCode server prefetch

Testing

  • Client nav to /daily: no #412, page loads
  • Privacy page: restored inline loadI18nForLocale for preview RSC compatibility
Open in Web Open in Cursor 

Split DailyPageView into server-rendered DailyPageContent (title, lead)
and client DailyPageInteractive (Apollo-driven widgets). Prefetch runs in
async DailyApolloIsland so the shell streams without blocking on LeetCode.

Add shared getServerTranslationFunctions and resolvePageLocale helpers;
refactor privacy page to use them. Remove unused SessionWidget.

Co-authored-by: maxim.kayander1 <maxim.kayander1@gmail.com>
@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dstruct Ready Ready Preview Sep 8, 2026 8:48pm UTC

cursoragent and others added 2 commits September 7, 2026 18:49
React error #412 ('Connection closed') occurs when client navigations
consume a partial RSC payload with an uncached async child. Match the
profile page pattern: sync page export with Suspense boundaries around
DailyPageWithShell and DailyApolloIsland.

Co-authored-by: maxim.kayander1 <maxim.kayander1@gmail.com>
Co-authored-by: maxim.kayander1 <maxim.kayander1@gmail.com>
The async server island + nested Suspense pattern is incompatible with
instant=true client navigations — RSC stream closes with pending rows
(React error #412). Restore the pre-refactor client DailyPageView with
server-side Apollo prefetch at the page level.

Keep getServerTranslationFunctions, resolvePageLocale (privacy), prefetch
timeout, and DailyPageSkeleton for loading.tsx.

Co-authored-by: maxim.kayander1 <maxim.kayander1@gmail.com>
@cursor cursor Bot changed the title feat(daily): RSC shell with streamed Apollo island fix(daily): revert RSC shell to fix React #412 on instant nav Sep 7, 2026
getServerTranslationFunctions() broke privacy page rendering on Vercel
preview (loading skeleton stuck, no h1/canonical). Revert to calling
loadI18nForLocale directly from the page component.

Co-authored-by: maxim.kayander1 <maxim.kayander1@gmail.com>
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