Skip to content

Wip/modeling commons/tags and home cache - #54

Open
omargfh wants to merge 8 commits into
app/modeling-commonsfrom
wip/modeling-commons/tags-and-home-cache
Open

Wip/modeling commons/tags and home cache#54
omargfh wants to merge 8 commits into
app/modeling-commonsfrom
wip/modeling-commons/tags-and-home-cache

Conversation

@omargfh

@omargfh omargfh commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

The schema added ModelVersion.changeSummary but nothing in src ever
referenced it, so every hand-built ModelVersionEntity was missing a
required field and check-types failed across five files.
The tag search sent an `offset` query param, but the API only accepts
`limit` and `page`. Fastify dropped the unknown param and defaulted page
to 0, so every "load more" refetched the first 20 tags and the tag select
menu could never reach the rest.
Lists tags by popularity with their model-version counts, and switches to
prefix search while the search box has a value. Both listings page in on
scroll. Prefix search carries no counts, so TagCard now takes an optional
description.
The home page issued six per-request API calls, all of them public and
identical for every visitor. They now come from a single `/_data/home`
handler cached for ten minutes with stale-while-revalidate, so the page
costs one internal call and the backend sees one set of queries per TTL
rather than one per visit.

Nitro's cached handler strips every header but the declared `varies`
list, so the shared entry is built without a session and cannot leak one.
Recents went stale under the shared feed's 45 minute TTL. They now come
from their own `/_data/home-recent` handler cached for a minute, loaded
lazily so they never block the sections around them, and rendered with
skeletons until they land.

The Trending Tags sidebar was anchored to the section's array index,
which no longer holds once recents resolve on their own, so it keys off
the section instead. Recents are also kept out of the marquee, which
would otherwise reshuffle every column when they arrive.
@omargfh
omargfh marked this pull request as ready for review August 13, 2026 18:48
Which section loads separately was re-derived in three places by comparing
against the recent section's key, and the feed's section list was hand
maintained alongside the render order. A section now declares `deferred`,
the feed list is derived from it, and a test asserts every rendered
section has exactly one fetcher.
On a checkout with no .nuxt, `nuxt build` exits 0 but emits a
client.manifest chunk containing `default: default`, which is a syntax
error. Nitro loads that chunk lazily, so the server starts, /health and
every server route answer 200, and only page renders fail. `nuxt:generate`
already guarded against this; `nuxt:build` did not.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant