docs: correct web/README render model, asset pipeline, and structure#196
docs: correct web/README render model, asset pipeline, and structure#196Jose-Gael-Cruz-Lopez wants to merge 6 commits into
Conversation
…line `app/repo-assets/[...path]/route.ts` was removed by the fix for #43, but the README still described it in three places. A contributor following it went looking for a file that does not exist. Assets are copied by `scripts/copy-repo-assets.mjs` into `public/repo-assets/` and served statically. Both `predev` and `build` run that script, which is why it works without anyone invoking it — worth saying out loud, since the directory is generated and not committed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The README asserted the opposite of what the code does: that data is baked in at build time and "changes to those files require a new deploy/build to appear on the site". Every data-backed page has exported `revalidate = 3600` since the #47 fix, precisely so deadline-derived state recomputes without a rebuild. Replaces the flat "Static (prerendered)" row with what `next build` actually reports: five ISR routes at 1h, /resources prerendered with no revalidation because its content is compiled-in constants, and /auth dynamic. Also records *why* the hour exists, so the next person does not "simplify" it away — #47's rationale lived only in next.config.ts comments. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
/resources shipped in #154 and the README never mentioned it — not in the page list, the data-source table, or the tree. It is the one page backed by neither loader: its content is constants in lib/resources.ts. The nav notes were also a breakpoint behind. #154 moved the inline links from `sm` to `md` because adding RESOURCES made the pill wrap between 640 and 673px, so "inline links at sm and up" and "below 640px" both describe the old layout. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Same defect as the Render model section, one heading down: it told readers a rebuild is required for data changes. It is not — the pages revalidate hourly. Calls out /resources as the exception, since it has no revalidate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
package.json defines six scripts; the table listed four. `npm test` is the notable omission — it is the 94-test Vitest suite CI gates on, so a contributor reading only this file had no way to run it before pushing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Correcting my own over-correction earlier in this branch. The README used to claim every data change needs a rebuild; I replaced that with "a data change does not need a rebuild to appear", which is wrong in the other direction. next.config.ts bundles README.md, listings.json and geocodes.json into the deployment via outputFileTracingIncludes, so a revalidation re-reads the *deployed* copy. Editing those files still requires a new build and deploy. What the hour genuinely buys is what #47 asked for and what the page comments say: deadline-derived state — closing-soon flags and day counts, all computed from the current date — stays correct between deploys. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Pushed a correction to my own change on this branch — worth flagging rather than burying. The original README claimed every data change needs a rebuild. I replaced that with "a data change does not need a rebuild to appear", which is wrong in the opposite direction.
What the hour actually buys is what #47 asked for, and what the page comments say: deadline-derived state — closing-soon flags and day counts, computed from the current date — stays correct between deploys. The Render model section now splits this explicitly, and the Production build section says to rebuild. |
Closes #50
Summary
Picks up the four items left on #50 after criteria 1 and 2 were met, and adds drift that postdates the issue.
Every claim below was checked against the code, not assumed.
What was wrong
1. It documented a route that was deleted.
app/repo-assets/[...path]/route.tswas removed by the #43 fix, but the README described it in three places. Verified gone:Replaced with the real pipeline:
scripts/copy-repo-assets.mjs→public/repo-assets/→ static serving, run automatically bypredevandbuild.2. It asserted the opposite of the render model. The README said data is baked in at build time and "changes to those files require a new deploy/build to appear on the site". Every data-backed page has exported
revalidate = 3600since the #47 fix:The route table now matches what
next buildprints — five ISR routes at1h,/resourceswith no revalidation,/auth/[[...auth]]dynamic. The same false rebuild claim appeared again under Production build; fixed there too.3.
/resourceswas absent entirely. It shipped in #154 and appeared in none of the page list, data-source table, or tree. It is the one page backed by neither loader — its content is constants inlib/resources.ts.4. The nav notes were a breakpoint behind. #154 moved the inline links from
smtomd(adding RESOURCES made the pill wrap between 640–673px), so "inline links at sm and up" and "below 640px" both described the old layout.5. The scripts table listed four of six.
npm test— the 94-test suite CI gates on — was missing, so a contributor reading only this file had no way to run it before pushing.Verification
npm run buildvitest94/94 still passes; onlyweb/README.mdis touched, so nothing else can regressTest plan
next buildoutput — the three route rows should match/resourcesshould both come up🤖 Generated with Claude Code