Service worker: show the update's size before asking for a reload

Aperta
#538 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
82/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
next.js, typescript
Ambito
devtools, frontend

Direzione di ricerca

Start with components/layout/pwa-register.tsx and trace how the update toast receives messages from scripts/service-worker-source.mjs, especially keptRoutes and rekeep. Then read tests/e2e/service-worker-update.spec.ts and run the update end-to-end test. Done means the toast shows the kept-studio count, preserves the old text when the count is zero, all four translations are updated, and docs/troubleshooting.md mentions the behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: ui difficulty: medium enhancement help wanted v2.0.0

Summary

The Update available toast says to reload, but a person on a slow connection or offline soon after wants to know what the update downloads and whether their kept studios will be ready. The worker knows how many studios it will download again.

Part of the 2.0.0 plan: fewer, better and fully tested studios, on a calmer and faster site.

Where to look

  • components/layout/pwa-register.tsx
  • scripts/service-worker-source.mjs (keptRoutes, rekeep)
  • tests/e2e/service-worker-update.spec.ts

Behaviour

  • Have the new worker count the kept studios before it takes over, and show that in the toast text.
  • Keep the reload button as it is and never block the update.
  • Translate the text in all four languages.

Acceptance criteria

  • The update end-to-end test sees the count in the toast.
  • A person with no kept studios sees the old text.
  • docs/troubleshooting.md mentions it.

Getting started: fork the repo, then pnpm install and pnpm dev (Node 22+, pnpm 11, no API keys). Before opening a PR, run pnpm typecheck && pnpm test && pnpm lint && pnpm format:check && pnpm check:dashes && pnpm build (CI fails on unformatted files, so pnpm format first). See CONTRIBUTING.md and the first contribution walkthrough.

Everything needed is in the repository. This doesn't need maintainer access, secrets or paid services. Comment below to claim it, and ask questions here any time.

Lingua principale
TypeScript
Stelle
11
Fork
3
Merge medio
6h 9m
PR unite (30g)
73

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di yakew7/DesignHub

Tutte le issue di yakew7/DesignHub

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.