Repository navigation
perf(jobs): render the public listing's rows on the server (LCP 94s → 3s) - #783
Merged
Merged
Conversation
…the skeleton moving the page Part of #774 (the LCP half; the CLS half is #782). Co-Authored-By: Claude Fable 5.1 <[email protected]>
This was referenced Sep 17, 2026
This was referenced Sep 17, 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 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.
What
The public
/jobslisting now renders its rows on the server. Part of #774 — the LCP half. The CLS half turned out to be a different bug: #782./v1/jobs?status=publishedrequest the screen's hook makes with an empty search) and the external feed — and hands them toDiscoverJobsScreenas react-queryinitialData. One tree, not two: the server renders rows from the loader data, the first client render reads the same data throughuseLoaderData, and only after hydration does react-query own it.initialDatacounts as fresh for the 5-minutestaleTime, so the client does not refetch what it was just handed./jobs/<slug>has rendered this way since Indexed public job pages redirect anonymous visitors to /auth #734.minHeightreserved). It now only shows where there is no loader — native, and a non-empty search.SaveJobButton's follow-status lookup (one per card, 10 per load) and the right rail's soft-skills lookup are gated on a session, likeuseUserApplicationsalready was. An anonymous load of/jobsnow makes two API calls after hydration (filter options and — still — nothing else), down from thirteen.fetchPublicJobsno longer drops slug-less rows; the route filters withhasSlugwhere it builds the ItemList, since the cards link by id.Numbers
Local, production export (
expo export) served withexpo serve, Lighthouse 12.8 with Playwright's Chrome, three runs each, median. The mobile row is Lighthouse's default preset and what.lighthouserc.json/ the nightly measure; it reproduces the CI baseline in #774 to the millisecond.mainLCP is now the same paint as FCP: the rows are in the HTML. Server HTML for
/jobswent from 0 job cards and a skeleton to 11 cards and no skeleton (curl+grep 'data-testid="job-card"').The CLS is a different bug
CLS did not move on mobile, and the trace says why: the one 0.98 shift is at +744ms, and it is the whole list moving from y=109 to y=16 while the search header above it disappears. That is the server's desktop layout (
useResponsive's fixed 1280×900 server snapshot) being replaced by the mobile layout on hydration — on every SSR page, at every phone width, regardless of what the list does. It also means React regenerates the tree on every mobile load, which is the #681 symptom. On the desktop preset CLS is 0.002. Filed as #782 with the trace evidence; it needs@scaffald/uito accept a per-request server snapshot, so it is not this PR.The
.lighthouserc.jsonratchet (acceptance box 5) waits for that fix too — setting a mobile CLS budget of 0.98 would be recording the bug, not a budget.Verification
usePublishedJobs/useExternalJobsrender seeded rows on the first render and do not call the client while fresh; unseeded queries still fetch. Typecheck green forscf-coreandscaffald-app; lint clean;pnpm prepushgreen./jobs/external/filter-options, and/profiles/skills/softis gone); no hydration errors at desktop width.🤖 Generated with Claude Code