fix: move ssr:false dynamic imports into client wrapper components - #144
Merged
Conversation
PR #133 added next/dynamic with ssr:false directly in the home and document-viewer Server Components, which this Next version rejects. That broke next build (Failed to compile) and poisoned every fresh dev server: once the home page compiled, all routes returned 500, which is what collapsed the Playwright run mid-suite. Move the ssr:false dynamics into "use client" wrapper components (ClinicalDashboardLazy, DocumentViewerLazy) so the pages stay server components and the lazy client-only loading behavior is preserved. Verified: next build now passes the compile phase (remaining build failure is the known PR #131 typecheck debt), dev server serves home/identity/setup-status 200, full 3-browser e2e run in progress. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
BigSimmo
commented
Jul 2, 2026
OwnerAuthor
@copilot resolve the merge conflicts in this pull request |
Contributor
Resolved in |
BigSimmo
enabled auto-merge
July 2, 2026 10:44
Uh oh!
There was an error while loading. Please reload this page.
Copilot stopped work on behalf of BigSimmo due to an error
July 2, 2026 10:49
BigSimmo added a commit
that referenced
this pull request
Jul 2, 2026
…ndering) (#178) * test: stabilize release-browser-matrix under client-only rendering The dashboard/viewer became client-only via dynamic(ssr:false) (#144/#147), so "page loaded" no longer implies "app mounted". Firefox/WebKit paint the client chunk later than Chromium, so three release-browser-matrix specs raced and failed on main while Chromium stayed green. All three are test-timing gaps, not product regressions. - ui-overlap: wait for the mounted header#search instead of networkidle; every failure was "header#search not found" (count 0), never a real overlap. - ui-tools (forms detail search): the shell re-syncs query from the URL on mount via requestAnimationFrame, which on FF/WebKit lands just after a programmatic fill and wipes it / drops the submit. Drive fill->submit->route as one toPass unit until the search navigates. - ui-stress (desktop evidence panel): assert the <summary> is focused before pressing Enter so the <details> reliably toggles open in WebKit. Validated locally in Firefox + WebKit (ui-overlap all widths, ui-stress both viewports, ui-tools:264 repeated x2 per browser). No product code changed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * test: make forms-search retry idempotent after late navigation Address Codex P2: if the click navigates just after the inner 2s URL wait times out, the toPass retry would re-run on the results page where the detail-page input no longer exists and fail a genuinely-successful nav. Short-circuit the retry to success once the URL has already routed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
BigSimmo pushed a commit
that referenced
this pull request
Jul 30, 2026
Resolves the docs/outstanding-issues.md conflict with PR #1453. That file deliberately carries no merge driver (#133), so overlapping appends conflict loudly rather than being silently concatenated. Resolved as the issues skill requires: rebuilt the file from origin/main and re-applied only the two rows this branch owns (the #86 in-place update and the new #145), so none of #1453's rows were dropped. Verified #140-#144 all still present and #144's cell content byte-identical to main. Re-checked that #145 was still free on main before reusing the id — main's next-id marker was untouched at 145, so there was no id collision to reallocate around. docs/branch-review-ledger.md auto-resolved through its merge=ledger driver. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GGEBHp4Seoh1jK1vGTNtYS
BigSimmo pushed a commit
that referenced
this pull request
Jul 30, 2026
The merge of origin into this branch hit exactly the damage #133/#140 describe: merge=union concatenated both sides of the ledger rather than merging it. Two collisions, both repaired without dropping either side's rows: - Another agent had already allocated #141-#144 on main for different items while this branch used #141-#143. The incoming rows renumber, per the ledger rule, so the capture becomes #145 (adopt a consolidated answer-home notice block), #146 (answer mode ships no verify-before-use caveat) and #147 (verify:pr-local exits 0 when its build step refuses to run). Their cross-references were updated to match, and the two duplicated next-id markers collapse to one at 148. - #140 appeared in both tables: it was closed on main as a duplicate of #133 (PR #1444) while this branch still carried it open. The resolution is honoured — the stale open row goes, the archive row stays. check:outstanding-issues: 145 rows (72 open, 73 archived), unique ids, next-id=148 above the highest, no merge driver. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NPyFcMfn1jMmphr6AqiWBg
BigSimmo pushed a commit
that referenced
this pull request
Jul 30, 2026
The three captured rows are dropped from docs/outstanding-issues.md, leaving it byte-identical to origin/main. They will be re-landed as their own single-file change once this PR merges. AGENTS.md recommends bundling append-only ledger rows because they are normally zero-risk, but that assumes a quiet file. Right now it is the hottest file in the repo: bundling them here cost three ID collisions and three full CI restarts in about thirty minutes (main took #141-#144, then #145, then #146, while this branch needed #145-#149 in turn). #133 already records that this file conflicts on nearly every main advance. The mockups diff itself touches four uncontended files and has not conflicted once today, so removing the ledger rows takes this PR out of a race it has no reason to be in. No content is lost: the row text is preserved verbatim and re-applied against a fresh main with clean ids. check:outstanding-issues: 144 rows (70 open, 74 archived), unique ids, next-id=147 above the highest, no merge driver. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NPyFcMfn1jMmphr6AqiWBg
BigSimmo added a commit
that referenced
this pull request
Jul 30, 2026
…ocs content The three conflicts were all the squash-merge ancestry break: this branch was stacked on the pre-merge #1436 head, so its copies of docs/codebase-index.md, docs/scripts-index.md and docs/outstanding-issues.md collided with main's squashed version. Resolutions: kept this branch's corrected scripts-index counts (191/206 against main's stale 188/203) and its three new root-directory rows; took main's outstanding-issues wholesale because main renumbered the rows on merge (#135 became #144, next-id 145) and its ids are authoritative, then re-applied the #143 correction on top. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Jul 30, 2026
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 freeto 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.
Summary
next/dynamic(..., { ssr: false })directly in two Server Components (src/app/page.tsx,src/app/documents/[id]/page.tsx). This Next version rejects that, which brokenext build(Failed to compile) and, worse, poisoned every fresh dev server at runtime: as soon as the home page compiled, every route returned 500 — this is what collapsed the release-gate Playwright run mid-suite (149 tests aborted) and makes any newly-synced worktree dead on arrival.ssr: falsedynamics into dedicated"use client"wrappers (ClinicalDashboardLazy,DocumentViewerLazy). The pages remain Server Components; perf: lazy-load heavy components, memoize SourceImage, optimize lucide-react #133's intended lazy client-only loading is preserved.Verification
next buildnow passes the compile phase (✓ Compiled successfully). The remaining build failure is the type-check phase hitting the pre-existing PR Tighten TypeScript: generated DB types, typed Supabase client, strict env #131 typecheck debt (95 errors, fix in flight oncodex/fix-main-typecheck), unrelated to this change./,/api/local-project-id,/api/setup-statusall 200 (previously 500 after home-page compile).test:e2ere-run in progress on this branch; result will be reported in the session.🤖 Generated with Claude Code