Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| self.addEventListener('fetch', (event) => { | ||
| if (event.request.method !== 'GET') return; | ||
| event.respondWith( | ||
| fetch(event.request).catch(() => caches.match(event.request).then((response) => response || caches.match(OFFLINE_URL))) | ||
| fetch(event.request).catch(() => { | ||
| if (event.request.mode === 'navigate') { | ||
| return caches.match(OFFLINE_URL); | ||
| } | ||
| return caches.match(event.request); |
There was a problem hiding this comment.
[P1] Return a Response for cache misses in fetch handler
The new fetch handler now returns caches.match(event.request) for non‑navigation requests but does not provide a fallback when the resource is missing from the cache. If the network is offline and the request is not cached, the promise resolves to undefined, which causes event.respondWith to reject with "The provided promise did not resolve with a Response" and the request fails even when an offline page or empty response would suffice. A response object should always be returned on the catch path, e.g. fall back to the offline page or a new Response('', {status: 503}), to avoid service worker errors during offline use.
Useful? React with 👍 / 👎.
Summary
useTimerupdates clock timers and only auto-starts once for scheduled timersTesting
npm run buildnpm testnpx tsc --noEmithttps://chatgpt.com/codex/tasks/task_e_68b4731718b08328829ce5c6100201f4