Commit Graph

20 Commits

Author SHA1 Message Date
Josh Creek ff29095c47 perf: fix slow page loads and gate performance in CI
- Ship one hashed Tailwind stylesheet instead of two (one render-blocking)
- Compress responses in-app (brotli/gzip, streaming-safe) and precompress
  the node build so local and CI measurements match production
- Validate the Supabase session once per request
- Render the homepage immediately and stream public stats
- Stream a Pokedex's entries with the page instead of fetching after
  hydration, running the rows and count queries in parallel
- Shrink the avatar and offline placeholder images, fix layout shift,
  contrast, link names and missing meta descriptions
- Add Lighthouse CI (mobile + desktop) with score and metric budgets,
  bundle-size budgets in the build tests, and signed-in speed scenarios
2026-09-14 20:53:53 +01:00
Josh Creek fb95b43b30 fix(backup): pause revoked backups and tell users to reconnect
Google answers a revoked or expired refresh token with invalid_grant.
Every save then retried the dead token, and reconnecting never cleared
the old error, so it kept showing on Backup Settings afterwards.

- The Google Drive and Dropbox OAuth callbacks clear lastError when a
  provider is reconnected.
- An invalid_grant, or a missing refresh token, now pauses the
  integration with a readable "reconnect" message instead of retrying
  it on every catch update. Other failures still retry as before.
- A banner on every page and an alert on the Pokédex page point to
  Backup Settings, which shows a "Reconnect needed" badge. The Pokédex
  page re-checks backup status after each export, because saving a
  catch record also exports on the server and may pause a provider
  first.
- Offline sync status and the "Save all artwork" link move from every
  page to a new /offline-guide page, linked from the user menu and the
  home and welcome pages. Only the offline read-only banner stays
  sitewide.
- Unit tests cover every export path and the backup status store. BDD
  covers revocation and reconnecting for both providers, and the
  offline guide. The mock provider can now reject token refreshes, and
  mock control calls fail loudly if a stale mock is reused. Coverage
  thresholds are raised to the new baseline.
2026-09-14 18:46:09 +01:00
Josh Creek 7240376e00 feat(pokedex): add shareable read-only dex links 2026-09-14 14:25:09 +01:00
Josh Creek 3a2c18bbeb fix: repair defects surfaced by gating CI on lint and typecheck
`npm run check` reported 15 errors and `npm run lint` 20, all pre-existing, so
neither gate could pass. Fixing them turned up three real bugs:

- SignOut destructured `{ error }` off `.then(() => {})`, which resolves to
  undefined, so every sign-out threw a TypeError - after the signed-out event had
  already been emitted. Sign-out also left the user on the protected page they
  were on, still showing its content; it now returns them to the home page and
  re-runs the server loads.

- SignUp passed `redirectTo`, which is not a signUp option and was silently
  ignored, so the confirmation link has always used Supabase's configured site
  URL. Documented rather than changed, since pointing it elsewhere needs an
  absolute allow-listed URL.

- The Pokédex page tracked totalRecordsCreated but never passed it to the box
  view, so the "Processed N entries so far" progress message never rendered.

The rest is typing and dead code: cookie callback parameters in hooks.server.ts
and +layout.ts, the untyped supabase props, a query-builder type that made
PostgREST rows untyped downstream, an unused session destructure, and
`while (true)` paging loops rewritten as `for (;;)`.
2026-09-13 17:38:42 +01:00
Josh Creek f17b350e4e fix(#64): Address PR comments 2026-01-10 18:27:01 +00:00
Josh Creek 68cc2a0712 fix(#64): Address PR comments 2026-01-10 17:06:52 +00:00
Josh Creek 7c68d121ce fix(#64): Address PR comments 2026-01-10 16:27:23 +00:00
Josh Creek adc96baa90 feat(#64): Improve the about page 2026-01-10 15:27:00 +00:00
Josh Creek 6a4c6d81b2 feat(#36): Style the landing page 2024-04-28 16:08:28 +01:00
Amber M ec6aa1a5cf Remove Join us 2024-04-28 13:22:52 +01:00
Amber M e6b4cc84bc Make profile page 2024-04-28 13:15:48 +01:00
Josh Creek 63de9c82a4 feat(*): Make the user object available and reactive in any component 2024-04-10 22:03:37 +01:00
Josh Creek 99ed144a34 feat(*): Move account functionality into header 2024-04-10 21:50:04 +01:00
Amber M d80da3e415 Create a header 2024-04-09 21:24:47 +01:00
Josh Creek 16a067cd5d fix(#16): Ensure DaisyUI styles apply to components
It turns out that tailwind excludes styles it hasn't found in use, so it needs to be explicitly told where to find the component files. This also therefore fixes the styles in the SignUp component.
2024-04-07 19:19:08 +01:00
Josh Creek 4ff4243125 fix(#13): Add hacky workaround for component styling 2024-04-07 15:28:15 +01:00
Josh Creek ee191aa7cf feat(#11): Add sprite component 2024-04-07 10:50:59 +01:00
Josh Creek 1475e06b8e feat(#9): Add sign in and sign out 2024-04-06 21:46:04 +01:00
Josh Creek 496cdb6666 feat(#9): Add sign up 2024-04-06 21:10:37 +01:00
Josh Creek e3420d6e02 chore(*): Add base sveltekit files 2024-03-09 21:28:07 +00:00