The avatar's alt text changed from "usericon" to "Account menu" as part of
the accessibility fixes, so the sign-out and offline-guide steps now look it
up by that name.
- 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
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.
Adds loadSharedPokedex unit tests and a share preview case for every badge, restoring the branch coverage gate. Gives the offline sync BDD poll 30s so a full Living Dex snapshot can finish caching on CI.
Several assertions could not fail:
- "the catch update remains saved" was `caught.isChecked() || notes.includes(...)`
shared by two scenarios, so either half satisfied both. Split into two steps
that each assert the outcome their own scenario is about.
- The token-refresh check read a global counter with `> 0` and asserted an upload
had happened `some(...)`, both already satisfied by the preceding scenario. It
now asserts exactly one refresh, ordered before the upload.
- The box step ignored its box argument and asserted on the first N entries on
the page; it now scopes to that box and checks its full contents.
- The filter step asserted on whichever entry was first after filtering; it now
records the caught entry beforehand and names it, and checks the filter did not
exclude everything.
- The empty-state precondition asserted emptiness instead of establishing it,
which a fresh user satisfies for free.
- Offline coverage was `caches.keys().length > 0`. It now checks the precache
contract: one workbox cache holding the shell and a revisioned web manifest,
with _app/immutable assets cached without a revision query. The scenario that
claimed to test a trailing slash did not; it is replaced with real offline
client-side navigation.
The mock provider kept recorded requests, its refresh counter and the
fail-uploads switch in one process-wide object that only one step reset, so
scenario order was load-bearing and the failing-upload scenario poisoned
everything after it. An auto fixture now resets it per scenario, and the mock no
longer records its own control-plane calls. That reset is why the suite stays on
a single worker, which is now documented.
Coverage was gated at 90% per file over an allowlist of exactly the five files
that had tests, so new code was invisible to it permanently. It now measures all
of src/lib with global thresholds at the measured baseline, and no longer runs
the unit tests twice.
Also: a global teardown removes the users each run creates, the Supabase wrapper
distinguishes a stopped stack from a broken CLI call and detects an unseeded
database, the sign-in rate limit is raised above what one serial run needs, and
the integration suite no longer falls back to a hard-coded anon key that would
mask a misconfigured run.
The password-reset scenarios are renamed to what they actually cover: following a
real recovery link bounces to /signin, because the browser client persists no
cookies and so cannot keep the session it parses out of the URL. The helper for
the real flow is left in place and the gap is documented.
Splits testing into five layers so a failure points at the responsible one:
- tests/unit isolated utility, repository and service tests
- tests/data validates the tracked Pokémon, game, region and dex files
- tests/integration schema, views, constraints, RLS and repositories
- tests/bdd executable Gherkin for user-visible behaviour
- tests/build service worker and manifest artifacts per build variant
Replaces the two Playwright specs in client-test/ and the two Vitest files in
test/. Adds a GitHub Actions workflow running the layers as separate jobs, a
mock OAuth provider server so the Drive and Dropbox scenarios never touch real
accounts, and a wrapper that reads the local Supabase keys from
`supabase status` rather than hard-coding them.
Extracts the pure formatting helpers out of PokedexExportService so they can be
unit tested, and makes the provider endpoints configurable so the mock server
can stand in for Google and Dropbox.