Skip to content

Handle timer scheduling edge cases and offline fallbacks#20

Merged
JustTryAI merged 1 commit intomainfrom
codex/review-comments-from-chatgpt-codex-connector
Aug 31, 2025
Merged

Handle timer scheduling edge cases and offline fallbacks#20
JustTryAI merged 1 commit intomainfrom
codex/review-comments-from-chatgpt-codex-connector

Conversation

@JustTryAI
Copy link
Owner

Summary

  • Ensure useTimer updates clock timers and only auto-starts once for scheduled timers
  • Strip undefined fields before saving timers and persist imported timers
  • Guard async listener cleanup, fix auth loading, and rename shadowed variables
  • Improve OBS overlay countdown and service worker offline handling

Testing

  • npm run build
  • npm test
  • npx tsc --noEmit

https://chatgpt.com/codex/tasks/task_e_68b4731718b08328829ce5c6100201f4

@JustTryAI JustTryAI merged commit 38284f0 into main Aug 31, 2025
3 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Comment on lines 10 to +17
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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant