Wip/modeling commons/tags and home cache - #54
Open
omargfh wants to merge 8 commits into
Open
Conversation
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
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.
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.
No description provided.