feat(nextjs): attribute Next.js server-side data to its page (7.2, C9)#63
Merged
officialCodeWork merged 1 commit intoJul 17, 2026
Merged
Conversation
Server-side data fetching feeds a page even when the fetch isn't in the component body. - RSC async server components already worked (inline await fetch is caught by the body walk) — locked with a test. - Pages-router getServerSideProps/getStaticProps/getStaticPaths are top-level exported functions, not components/hooks, so their fetches were never scanned. The main loop now collects those functions per file and runs data-source extraction on their bodies attributed to the file's default-export page component (fetches-from). - New fixture c9-nextjs-server-data (async RSC + getServerSideProps + getStaticProps); 4 unit tests. eval 341/0/0/0, determinism 1.000, all metrics 1.000; parser-react 168 tests, typecheck + lint clean. Server actions deferred. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Phase 7.2 — Next.js server data (failure mode C9)
Server-side data fetching feeds a page even when the fetch isn't in the component body. This attributes it to the page so the page's lineage shows the data it renders.
Changes
await fetch(...)is caught by the body walk. Locked with a test.getServerSideProps/getStaticProps/getStaticPaths) are top-level exported functions, not components/hooks, so their fetches were never scanned. The main loop now collects those functions per file and runs data-source extraction on their bodies attributed to the file's default-export page component (fetches-from).Fixture & tests
c9-nextjs-server-data: an async RSC page, agetServerSidePropspage, and agetStaticPropspage → each attributes its server-side endpoint; the data functions produce no component/hook nodes.Verification
pnpm eval→ 341 pass · determinism 1.000 · all metrics 1.000Server actions deferred (
"use server"mutations bound to<form action>— a mutation/event surface, fuzzier than the data-in path). Tracker updated: all frontend-side Phase 7 steps (7.1–7.3) now landed; backend parsers (7.4–7.6) remain, best held for 0.5.0 tester feedback.🤖 Generated with Claude Code