Repository navigation
KSN: search fix, infinite home grid, MangaDex proxy and cache - #46
Merged
Merged
Conversation
✅ Deploy Preview for kasane-guide ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
codebend3r
force-pushed
the
search-fix-plus
branch
from
November 8, 2026 15:00
a7fe24f to
8302559
Compare
codebend3r
force-pushed
the
search-fix-plus
branch
2 times, most recently
from
November 8, 2026 21:35
68f1556 to
cd79247
Compare
- search matches catalog titles locally, so mapped series ranked past AniList's first page still show; `searchWithCatalog` fetches the page and catalog matches in one request, skipping the catalog page with `@include` when there are no ids - add `matchCatalogTitles`, `catalogMediaIds`, `mergeSearchResults` in `src/data/catalogSearch.ts`; key `useSearch` on matched catalog ids - home: 10 columns at laptop width via `RELEASE_COLUMNS`; `LatestReleases` owns its feed through `useLatestAnime` (`useInfiniteQuery`), trimming to whole rows while paging; `useInfiniteScroll` owns the scroll geometry and hands back no props when disabled - home: one `HomeToolbar` puts the heading, `MappedOnlyToggle` and `GenreFilterButton` on one row; the screen owns its filter-panel state so it survives the move between search and grid; tagline removed - home: `useHomeChrome` owns immersive mode and its enter/exit hysteresis via `trackOffset`; `HeaderWordmark` goes compact, search, filters and headings hide, the `Footer` pins - series: remove the franchise column end to end (`FranchiseSeasons`, `useFranchise`, `getAnimeFranchise`, `AnimeFranchise`); collapse `SeriesMovies` by default behind an accessible count toggle - series: counts prefer AniList totals over MangaDex's hosted counts - proxy: `src/data/mangadexRoutes.ts` is the one source of the MangaDex hosts, the `/_mdx` and `/_mdx-covers` paths and the non-browser `User-Agent`; `webMangaDexClient`, `nativeMangaDexClient` and `scriptMangaDexClient` read from it - proxy: Netlify edge function `netlify/edge-functions/mangadex.ts` replaces the rewrite, which cannot override `User-Agent` - proxy: `scripts/mangadexProxy.ts` is the import-free Node handler that `metro.config.js` and `e2e/serve.ts` hand the routes to - cache: migration adds `mangadex_series`, public read-only under RLS, with `titles` and `covers` as jsonb so a refresh is one upsert - cache: `scripts/refresh-mangadex.ts` (`bun run mangadex:refresh`) fills it with the service role, skipping rows under 7 days old - cache: `useMangaDex` reads `fetchCachedMangaDex` first and falls back to `getMangaDexSnapshot` on a miss or error, then resolves covers with `snapshotToInfo` under the app client's covers base; `coverUrl` and the converters live in `data/mangadexSnapshot.ts` - data: `isRecord` lives once in `data/guards.ts`; staleness windows move from `queries/shared.ts` to `data/time.ts` - anilist: `getMediaByIds` batches at the page limit through `inPages`, shared with `getCoversByIds` - build: Node 24 on Netlify and in CI, since `metro.config.js` requires TypeScript modules; `engines.node` records it - e2e: `smoke` and `popular-search` specs paced under AniList's rate limit, cover decode through `/_mdx-covers` - test script also covers `scripts/`; ignore Supabase CLI state, `.netlify/` and `deno.lock`; `@scripts/*` alias for e2e and script tests only
codebend3r
force-pushed
the
search-fix-plus
branch
from
November 8, 2026 21:42
cd79247 to
e95fff6
Compare
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.
@includewhen nothing matches, so there is one query and no branchuseLatestAnimeand auseInfiniteScrollhook, oneHomeToolbarwith the heading, "Mapped only" and "Filter genres" on one row; the filter panel stays open when the toolbar moves between search and gridHeaderWordmark, hides search, filters and headings, pins theFooteraria-expanded/_mdx/*and/_mdx-covers/*served by a Netlify edge function with a non-browserUser-Agent, since MangaDex bot-challenges browser UAs and a rewrite cannot override the header.src/data/mangadexRoutes.tsis the one source of paths, hosts and UA; the client, the edge function, Metro ande2e/serve.tsall read it, and nothing insrc/imports fromscripts/mangadex_series(public read-only under RLS,titlesandcoversas jsonb);bun run mangadex:refreshfills it with the service role in one upsert per series;useMangaDexreads the cache first and falls back to the live lookupisRecorddefined once indata/guards.ts; staleness windows move todata/time.tsmetro.config.jsrequires TypeScript modules, which Node 20 cannot load; this is what broke the deploy preview)20261108120000_mangadex_cache.sqlto production, then runbun run mangadex:refreshwithSUPABASE_SERVICE_ROLE_KEYinscripts/.env.local/_mdx-covers