Repository navigation
fix: don't drop client references when the concatenated module id is 0 - #97936
Merged
marcoshernanz merged 2 commits intoAug 27, 2026
Merged
marcoshernanz merged 2 commits into
marcoshernanz merged 2 commits into
Conversation
jgruica
force-pushed
the
fix/client-reference-concatenated-module-id-zero
branch
from
August 26, 2026 13:44
f5dce43 to
3c2a7d2
Compare
Contributor
|
LGTM. Can you make the commits signed so we can merge it, pls? |
marcoshernanz
approved these changes
Aug 26, 2026
Member
|
Here is the documentation for how to create signed commits: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits |
jgruica
force-pushed
the
fix/client-reference-concatenated-module-id-zero
branch
from
August 26, 2026 19:48
43427c8 to
b8b65a0
Compare
Contributor
Tests PassedCommit: d8823ef |
Contributor
Stats from current PR🔴 1 regression, 1 improvement
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
Build Cache
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URLCommit: d8823ef |
Contributor
|
Thanks for your contribution! |
Latand
added a commit
to Latand/delegatus
that referenced
this pull request
Sep 2, 2026
…nt Manifest After the merge with main, `next build --webpack` failed at "Generating static pages" with `Could not find the module ".../src/components/Viewer.tsx#Viewer" in the React Client Manifest`. The PR's diff and main's new modules are both sound. The merged module graph happens to hand the concatenated module that carries Viewer.tsx the webpack module id 0, and Next 16.3.2's ClientReferenceManifestPlugin guards that fallback with `if (concatenatedModId)`, so id 0 is dropped and the client reference is never recorded. Upstream fixed the guard to `!== null` in vercel/next.js#97936 (commit 97c6aedf18), released in 16.4.0-canary.9; no stable release carries it yet (16.3.4 does not). This vendors that one-line change as a bun `patchedDependencies` patch for Next 16.3.2, covering both the CJS and the ESM copy of the plugin, and copies `patches/` into the image's deps stage so `bun install --frozen-lockfile` can apply it there as well. The patch file joins the package name and version with a hyphen rather than the usual `@`, because the privacy gate reads the `@` form as an email address. Verified: the same build command and env fail without the patch and exit 0 with it; the deps image stage builds and carries the patched plugin. The behaviour the review approved is untouched. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Latand
added a commit
to Latand/delegatus
that referenced
this pull request
Sep 2, 2026
…nders the stage prompt once (#1397 #1398) (#1420) * fix(feed): time the starting window from admission and render the stage prompt once (#1397 #1398) Two starting-window defects on a structured launch whose first message is still queued or reconciling. #1397 — "working…" showed no elapsed time. The footer timer and the header WORKING badge both anchored on the open transcript turn, which does not exist before the first record is journaled. A shared workingSince anchor now measures from the earliest durable instant of the pending work: the launch admission (a new admittedAt fact on the launch projection, kept across adoption), or the delivery receipt when that is all an adopted window carries, and the transcript turn once it exists. The window remembers the anchor it already counted from for as long as the same work is pending, so the switch to the later transcript anchor, and the launch chips retiring mid-turn, never run the counter backwards; a finished turn forgets it and the next turn counts from its own start. #1398 — the stage's INTERNAL prompt rendered twice. Codex 0.151 journals every user message as the persisted user item and, milliseconds later, an item_completed envelope carrying the same text as a UserMessage thread item. The parser rendered the envelope as a second relay card. The lifecycle echo now reconciles with the provisional row exactly like the legacy user_message event: before the pending rows are finalized, like for like, never a second row; a further echo of the same message folds into the same row. Regressions: the parser cases, the footer and badge anchors, the projection's admission fact, and a DOM test that drives a spawn through the reconciling window with the first message queued and asserts one INTERNAL prompt bubble and a monotonic running duration before and after the transcript record lands. Co-Authored-By: Claude Fable 5.1 <[email protected]> * fix(feed): keep the admission anchor through the first scanned row (#1397) Review round on #1420. The window carried the remembered admission anchor into the first transcript turn only while the launch facts still rode the row. The projection retires those facts the moment the agent's first visible reply lands, and in real rollouts that reply follows the first record inside the same board poll, so the first scanned row a window sees usually carries the transcript turn and no launch at all: the footer timer and the header WORKING badge dropped from the admission count to the record's own count at the flip (45s on the placeholder, then 52s where 1m was due). A memory bound to no transcript turn can only have come from a launch anchor, so the first turn to open after it is that launch's own first turn whether or not the launch still rides. The anchor now carries regardless; a finished turn already forgets the memory, so a later turn never inherits it. Regressions: the DOM, footer and badge tests now flip the placeholder to a scanned row with an open turn, assistant evidence and no launch facts in one render and assert the reading never decreases; the poll that still carries the chips stays covered as its own case, and the INTERNAL prompt stays one card once the agent's reply is in the tail. Co-Authored-By: Claude Fable 5.1 <[email protected]> * build(next): keep a client module with webpack id 0 in the React Client Manifest After the merge with main, `next build --webpack` failed at "Generating static pages" with `Could not find the module ".../src/components/Viewer.tsx#Viewer" in the React Client Manifest`. The PR's diff and main's new modules are both sound. The merged module graph happens to hand the concatenated module that carries Viewer.tsx the webpack module id 0, and Next 16.3.2's ClientReferenceManifestPlugin guards that fallback with `if (concatenatedModId)`, so id 0 is dropped and the client reference is never recorded. Upstream fixed the guard to `!== null` in vercel/next.js#97936 (commit 97c6aedf18), released in 16.4.0-canary.9; no stable release carries it yet (16.3.4 does not). This vendors that one-line change as a bun `patchedDependencies` patch for Next 16.3.2, covering both the CJS and the ESM copy of the plugin, and copies `patches/` into the image's deps stage so `bun install --frozen-lockfile` can apply it there as well. The patch file joins the package name and version with a hyphen rather than the usual `@`, because the privacy gate reads the `@` form as an email address. Verified: the same build command and env fail without the patch and exit 0 with it; the deps image stage builds and carries the patched plugin. The behaviour the review approved is untouched. Co-Authored-By: Claude Fable 5.1 <[email protected]> --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What?
getModuleId()returnsstring | number | null, and0is a valid id. TheConcatenatedModulefallback guards it with a truthiness check, so when the concatenated module gets id0the client entry is left out of the client reference manifest.Why?
The code right above it already checks
modId !== null. The two checks sit a few lines apart and disagree about whether0is a valid id, which looks like an oversight. When it happens the build fails withCould not find the module ... in the React Client Manifest, which doesn't point at the cause.Repro: https://github.com/jgruica/next-concat-modid-zero (needs
--webpackplusconcatenateModules: true, so it's rare in practice)How?
One line in
flight-manifest-plugin.ts:if (concatenatedModId)becomesif (concatenatedModId !== null).nullis still skipped, so nothing elsechanges.