Re-reviewed at head 50bb5094. The core fix is right and worth landing — registering the dev SW with { type: 'module' } is correct (/dev-sw.js is an ES module under VitePWA's devOptions, so the old
registration threw in dev), and the try/catch + logging is a nice touch. But npm run lint is currently red (8 eslint errors):
Remove import { register } from 'module'; (src/index.tsx). It's Node's built-in module pulled into a browser bundle, and it's unused — you call your own registerServiceWorker. It's causing two of the
errors (@typescript-eslint/no-unused-vars + import/order). Deleting it also removes the need for the /* eslint-disable import/first */ you added at the top — please drop that disable and fix the placement
rather than silencing the rule.
void registerServiceWorker(); trips no-void. Call it directly (the function already has its own try/catch) or handle the promise with .catch(...).
Rebase onto current lotus. This branch is stacked on the image-path commit, so it also carries that change — the root-URL prod-404 from #1 plus import/newline-after-import on the logo consts. Rebasing
drops all of that and leaves this PR as just the SW fix.
Once it's only the SW-registration change on a clean base with npm run lint + npx tsc --noEmit green, this is a clear merge. 👍
Re-reviewed at head 50bb5094. The core fix is right and worth landing — registering the dev SW with { type: 'module' } is correct (/dev-sw.js is an ES module under VitePWA's devOptions, so the old
registration threw in dev), and the try/catch + logging is a nice touch. But npm run lint is currently red (8 eslint errors):
1. Remove import { register } from 'module'; (src/index.tsx). It's Node's built-in module pulled into a browser bundle, and it's unused — you call your own registerServiceWorker. It's causing two of the
errors (@typescript-eslint/no-unused-vars + import/order). Deleting it also removes the need for the /* eslint-disable import/first */ you added at the top — please drop that disable and fix the placement
rather than silencing the rule.
2. void registerServiceWorker(); trips no-void. Call it directly (the function already has its own try/catch) or handle the promise with .catch(...).
3. Rebase onto current lotus. This branch is stacked on the image-path commit, so it also carries that change — the root-URL prod-404 from #1 plus import/newline-after-import on the logo consts. Rebasing
drops all of that and leaves this PR as just the SW fix.
Once it's only the SW-registration change on a clean base with npm run lint + npx tsc --noEmit green, this is a clear merge. 👍
The SW fix itself is in good shape now — the stray import { register } from 'module' is gone, no-void is resolved, and the { type: 'module' } dev registration is correct. That part's a clean merge. 👍
The problem is scope: this PR has grown to 31 files and bundles several unrelated changes, two of which can't ship:
CI change neuters the prettier gate. npx prettier --write . before check:prettier means the check can never fail (it auto-fixes the ephemeral CI checkout, which isn't committed back) — so unformatted
code passes CI and deploys. Please drop this; formatting is already handled by the pre-commit hook on lotus, and the ci.yml here also conflicts with lotus.
@giphy/js-util 5.2.0 → 2.0.0 is a major downgrade that will likely break the GIF picker — please restore 5.2.0.
Image-path change (vite.config.js publicDir, root /Lotus.png) is already fixed on lotus (f2c356f2, using /public/res/ — verified prod-safe) and 404s in prod as written. It's what's blocking the merge.
The no-explicit-any: off + eslint-disable removals and commitizen removal are real policy/tooling decisions — worth their own PR + discussion, not bundled here.
Suggested path: rebase onto current lotus and reduce this PR to just src/index.tsx (the SW fix). Open separate PRs for the eslint-policy change and any dependency bumps so each can be reviewed on its own.
The SW fix will merge cleanly once it's standalone on a current base.
**Claude Sonnet 5 btw**
The SW fix itself is in good shape now — the stray import { register } from 'module' is gone, no-void is resolved, and the { type: 'module' } dev registration is correct. That part's a clean merge. 👍
The problem is scope: this PR has grown to 31 files and bundles several unrelated changes, two of which can't ship:
1. CI change neuters the prettier gate. npx prettier --write . before check:prettier means the check can never fail (it auto-fixes the ephemeral CI checkout, which isn't committed back) — so unformatted
code passes CI and deploys. Please drop this; formatting is already handled by the pre-commit hook on lotus, and the ci.yml here also conflicts with lotus.
2. @giphy/js-util 5.2.0 → 2.0.0 is a major downgrade that will likely break the GIF picker — please restore 5.2.0.
3. Image-path change (vite.config.js publicDir, root /Lotus.png) is already fixed on lotus (f2c356f2, using /public/res/ — verified prod-safe) and 404s in prod as written. It's what's blocking the merge.
4. The no-explicit-any: off + eslint-disable removals and commitizen removal are real policy/tooling decisions — worth their own PR + discussion, not bundled here.
Suggested path: rebase onto current lotus and reduce this PR to just src/index.tsx (the SW fix). Open separate PRs for the eslint-policy change and any dependency bumps so each can be reviewed on its own.
The SW fix will merge cleanly once it's standalone on a current base.
All checks were successful
CI / Build & Quality Checks (pull_request) Successful in 11m36s
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixed service worker registration when running in a development environment
Re-reviewed at head
50bb5094. The core fix is right and worth landing — registering the dev SW with { type: 'module' } is correct (/dev-sw.js is an ES module under VitePWA's devOptions, so the oldregistration threw in dev), and the try/catch + logging is a nice touch. But npm run lint is currently red (8 eslint errors):
Remove import { register } from 'module'; (src/index.tsx). It's Node's built-in module pulled into a browser bundle, and it's unused — you call your own registerServiceWorker. It's causing two of the
errors (@typescript-eslint/no-unused-vars + import/order). Deleting it also removes the need for the /* eslint-disable import/first */ you added at the top — please drop that disable and fix the placement
rather than silencing the rule.
void registerServiceWorker(); trips no-void. Call it directly (the function already has its own try/catch) or handle the promise with .catch(...).
Rebase onto current lotus. This branch is stacked on the image-path commit, so it also carries that change — the root-URL prod-404 from #1 plus import/newline-after-import on the logo consts. Rebasing
drops all of that and leaves this PR as just the SW fix.
Once it's only the SW-registration change on a clean base with npm run lint + npx tsc --noEmit green, this is a clear merge. 👍
Claude Sonnet 5 btw
The SW fix itself is in good shape now — the stray import { register } from 'module' is gone, no-void is resolved, and the { type: 'module' } dev registration is correct. That part's a clean merge. 👍
The problem is scope: this PR has grown to 31 files and bundles several unrelated changes, two of which can't ship:
code passes CI and deploys. Please drop this; formatting is already handled by the pre-commit hook on lotus, and the ci.yml here also conflicts with lotus.
f2c356f2, using /public/res/ — verified prod-safe) and 404s in prod as written. It's what's blocking the merge.Suggested path: rebase onto current lotus and reduce this PR to just src/index.tsx (the SW fix). Open separate PRs for the eslint-policy change and any dependency bumps so each can be reviewed on its own.
The SW fix will merge cleanly once it's standalone on a current base.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.