Service worker: precache the shell and the visited studios, not 174 files
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- nextjs, typescript
- Domain
- frontend, performance
Research direction
Read scripts/generate-service-worker.mjs and components/layout/pwa-register.tsx, then inspect the offline flow in tests/e2e/flows.spec.ts. Measure current install bytes before changing the precache behavior. Done means the shell and previously visited studios work offline, install transfers under half the current bytes, and a two-build update replaces old caches cleanly.
Written by the indexing model from the issue text.
Description
Summary
On install the service worker precaches 174 resources, which is a heavy first visit on a slow connection. Precache the app shell and the visited studios' files as they are visited, with the offline e2e flow as the guard.
Part of the 2.0.0 plan: fewer, better and fully tested studios, on a calmer and faster site.
Where to look
scripts/generate-service-worker.mjsandpublic/sw.jscomponents/layout/pwa-register.tsxtests/e2e/flows.spec.ts: the offline flow
Behaviour
- Precache the shell (home, the layout chunks, fonts the UI uses) and cache each studio's route and chunks the first time it is opened, with a size cap.
- Keep versioned caches and the cleanup of old ones.
- A studio never opened online is not promised offline, and the app says so when it can't load.
Acceptance criteria
- The install transfers well under half of today's bytes (record before and after).
- The offline flow passes for a studio that was opened online.
- Updating to a new build still replaces the caches cleanly (test with two builds).
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.
- Dominant language
- TypeScript
- Stars
- 11
- Forks
- 3
- Avg merge
- 5h 22m
- Merged PRs (30d)
- 74
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yakew7/DesignHub
-
area: ui difficulty: easy enhancement help wanted testing v2.0.0
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
area: ui difficulty: medium enhancement help wanted v2.0.0
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
accessibility area: projects difficulty: easy enhancement good first issue help wanted v2.0.0
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area: projects difficulty: easy enhancement good first issue help wanted v2.0.0
Difficulty 3/5 1-2 days Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
area: projects difficulty: easy enhancement good first issue help wanted v2.0.0
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Maintainers usually reply within 1 day
All issues in yakew7/DesignHub
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
JuliusBrussee/caveman#1449 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
linagora/twake-calendar-frontend#1924 ·
Maintainers usually reply within 1 day
-
Add: Class TV ModaOpencheck:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
libnativeapi/nativeapi#21 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
GiganticMinecraft/seichi-playguide#183 ·
Maintainers usually reply within 1 day