Repository navigation
Conversation
|
Thanks for the review, @cpojer. Just to make sure I rework it the way you mean: boundaries like
I'd lean towards 1. The default |
|
Yep, let's do 1. |
There was a problem hiding this comment.
Slop Review:
- The
voidpackage fails typechecking. The boundary options type is missingloadHeads, and a new test reads.headfrom a value typed asunknown. The base commit passes the same typecheck. [Boundary lookup](codex://review?pr=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fpull%2F965&path=packages%2Fvoid%2Fsrc%2Fpages%2Fprotocol.ts&line=557&side=right)- One root boundary makes generated router code grow quadratically. With 300 routes and one boundary companion, generated source grew from 217 KB to 5.86 MB before bundling. Every route embeds the full loader map. Emit the map once and share it. [Router generation](codex://review?pr=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fpull%2F965&path=packages%2Fvoid%2Fsrc%2Frouter%2Fcompile.ts&line=1081&side=right)
- A dev-only boundary can trigger production D1 provisioning. I reproduced this with a
void/dbimport in_error.dev.server.ts. The production route scan excludes the boundary, but binding inference still sees the import. [Companion discovery](codex://review?pr=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fpull%2F965&path=packages%2Fvoid%2Fsrc%2Fpages%2Fscan.ts&line=366&side=right)- A failure while resolving the returned title can turn a 404 into a 500. A throwing
titlegetter reproduced this. Resolve the returned metadata inside the same recovery guard ashead(). [Title resolution](codex://review?pr=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fpull%2F965&path=packages%2Fvoid%2Fsrc%2Fpages%2Fprotocol.ts&line=559&side=right)
- Type the boundary head loaders on the render options, and the test payload. - Emit the boundary head loader map once instead of inside every route. - Filter dev/prod boundary files and their .server companions in binding inference. - Resolve what head() returns inside the same recovery guard as the call. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…boundary names - Add boundary .server companions to the dev Worker dependency scan, like page companions. - pageFileEnvironment() treats only exact _error/_not-found files as boundaries, so ignored helpers such as _error.data.dev.server.ts keep their bindings. - Describe the companion head() in design doc 0093. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e can't render A head() that returns, say, a number meta content passed the payload check but failed later in the HTML head render, outside the guard, turning a 404 into a 500. Render the head inside the guard so such values fall back like other failures. Co-Authored-By: Claude Opus 5.5 <[email protected]>
9b5ab66 to
40c23cc
Compare
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Thanks for the follow-up commits, I went through them against the four points and they cover everything, so I'm not adding anything on top:
Happy with it as is. |
Closes the second half of #825
Summary
_not-foundand_errorcan now set their own page title (and any other head field) with ahead()exported from an optional.servercompanion. The first half of the issue (applyingtitleTemplateto the default titles) already shipped in #827.With
titleTemplate: '%s | My App':<title>Not Found | My App</title>becomes<title>Page not found | My App</title>.How it works
titleTemplatebehavior.head()with notitlekeeps the default title..dev/.prodboundary files and their companions are filtered by environment in binding inference, so a dev-only_error.dev.server.tsthat importsvoid/dbdoesn't make a production deploy create D1.Changes
packages/void/src/pages/scan.ts,types.ts.servercompanion; reject loader/action exports;pageFileEnvironmentreads boundary filespackages/void/src/pages/boundary-plans.tsserverPathout of the client boundary planspackages/void/src/router/compile.tspackages/void/src/runtime/routing/pages.tspackages/void/src/pages/protocol.tshead(), resolve and render-check its result inside one recovery guardpackages/void/src/application-analysis.tsdocs/guide/pages-routing/errors.md, design doc 0093Testing done
head, import failure,head()throws,titlegetter throws, values the HTML head can't render), in HTML and Pages-JSON responses._not-found.server.tstitle for all four adapters.plugin-vite-environment.test.ts).vp check,vp run test(189/189),vpr test:all, localcodex review.