fix(bounties): stop the board skeleton reading its grid class across the client boundary - #2515
Open
jwalkingjew wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The constants now cross the server boundary safely while preserving existing client-facing imports.
Review effort: Balanced
Findings: None
What changed in this PR
Moves bounty layout constants into server-safe modules, fixing the server-rendered loading skeleton.
Changes:
- Extracts card heights and board layout constants.
- Preserves existing imports through re-exports.
- Removes resolved cases from the server/client boundary guard.
| File | Description |
|---|---|
client-values-in-server-boundaries.test.ts |
Removes fixed boundary violations. |
bounty-card.tsx |
Imports and re-exports extracted heights. |
bounty-card-layout.ts |
Defines server-safe card heights. |
bounty-board-skeleton.tsx |
Uses server-safe board constants. |
board-layout.ts |
Defines board grid and height constants. |
board-bounty-card.tsx |
Uses and re-exports extracted constants. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 21, 2026 19:56
e1636ba to
8ee383a
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 21, 2026 20:23
8ee383a to
3de0018
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 21, 2026 21:02
3de0018 to
cfe83c5
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 21, 2026 21:07
cfe83c5 to
6103822
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 21, 2026 21:29
6103822 to
b19851a
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 21, 2026 21:49
b19851a to
1775c04
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 21, 2026 22:54
1775c04 to
f52009f
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 21, 2026 23:20
f52009f to
31aa320
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 22, 2026 00:28
31aa320 to
14d8e1b
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 22, 2026 00:49
14d8e1b to
d4c3931
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 22, 2026 01:10
d4c3931 to
29f611d
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 22, 2026 01:46
29f611d to
0140a71
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 24, 2026 22:06
0140a71 to
3e2d19f
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 24, 2026 23:28
3e2d19f to
a90f52b
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 24, 2026 23:57
a90f52b to
e535896
Compare
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 25, 2026 00:48
e535896 to
ff5f178
Compare
…the boundary `app/bounties/loading.tsx` is a Server Component and `BountyBoardSkeleton` puts `BOARD_GRID_CLASS` straight into a `className`. It was declared in `board-bounty-card.tsx`, which is `'use client'`, and every export of a client module is a client reference on the server rather than the value it looks like — so the loading grid rendered with no grid at all until hydration replaced it. `BOARD_CARD_HEIGHT_PX` went the same way into a `style`. Both now live in `board-layout.ts`, which carries no directive. That needed the card heights to come along, because `BOARD_CARD_HEIGHT_PX` is `AVAILABLE_CARD_HEIGHT_PX` and that was declared in `bounty-card.tsx`, also a client module — so the three sibling heights move to `bounty-card-layout.ts` together rather than being split across two files. Both original modules re-export what they used to declare, so every existing importer is untouched. Found by the guard in #2478, which has the pair listed as known debt. They come off that list here, and its staleness check is what makes sure they had to.
jwalkingjew
force-pushed
the
preston/bounties-loading-client-reference
branch
from
September 25, 2026 01:22
ff5f178 to
de6d856
Compare
This branch was successfully deployed
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.
Stacked on #2478 — merge that first, then this. The diff against it is the bounties change alone.
The bug
app/bounties/loading.tsxis a Server Component.BountyBoardSkeletonputsBOARD_GRID_CLASSstraight into aclassName, and that constant was declared inboard-bounty-card.tsx, which is'use client'.Every export of a client module is a client reference on the server rather than the value it looks like — React writes it into the flight payload as an opaque placeholder. So the loading grid rendered with no grid classes at all, six placeholder blocks stacked in a column, until hydration replaced the whole loading state.
BOARD_CARD_HEIGHT_PXwent the same way into astyle.Found by the guard in #2478, where it was the one live case on the known-debt list.
The fix
Both constants move to
board-layout.ts, which carries no directive.That pulled the card heights along:
BOARD_CARD_HEIGHT_PXisAVAILABLE_CARD_HEIGHT_PX, declared inbounty-card.tsx— also a client module — so putting the board's constants somewhere server-safe while leaving their input behind would have fixed nothing. The three sibling heights (COMPLETED_/IN_PROGRESS_/AVAILABLE_) go tobounty-card-layout.tstogether, rather than splitting a set of three across two files for the next reader to puzzle over.Both original modules re-export what they used to declare, so every existing importer — and every test that mocks them — is untouched. The only import that actually changes is the skeleton's, which is the one that crossed the boundary.
Verification
partials/bounties,partials/community-taband the guard pass; lint and tsc clean.KNOWNlist, and that test's staleness check is what enforces they had to — a fix that left them listed would fail it.board-bounty-cardand it fails with exactly the pair again:What I did not check
I have not watched the bounties loading state render, before or after. The mechanism is confirmed by inspection and by the same flight-payload evidence that motivated #2478, but the visual symptom — a brief unstyled flash on a route behind a testnet gate and a feature flag — I am taking on reasoning. Worth ten seconds from someone who can open the board.