Skip to content

fix(FR-2608): disable vite-plugin-pwa auto-manifest to preserve existing manifest.json#6877

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-21-fix_fr-2608_disable_vite-plugin-pwa_auto-manifest_to_preserve_existing_manifest.json
Apr 30, 2026
Merged

fix(FR-2608): disable vite-plugin-pwa auto-manifest to preserve existing manifest.json#6877
graphite-app[bot] merged 1 commit intomainfrom
04-21-fix_fr-2608_disable_vite-plugin-pwa_auto-manifest_to_preserve_existing_manifest.json

Conversation

@nowgnuesLee
Copy link
Copy Markdown
Contributor

@nowgnuesLee nowgnuesLee commented Apr 22, 2026

Resolves #6811(FR-2608)

Summary

Follow-up fix for FR-2608. Discovered while verifying the end-to-end production build in FR-2611.

Bug: vite-plugin-pwa generates a manifest.webmanifest from react/package.json metadata and auto-injects <link rel="manifest" href="/manifest.webmanifest"> into index.html. That competes with the repo's own manifest.json (already copied into build/web/ by copyresource) — the auto one has:

  • wrong name: "backend-ai-webui-react" (react package name, not product)
  • wrong theme_color: "#42b883" (Vue green, pulled from some default)
  • no icons

Whichever manifest the browser picks first can leave PWA installs with bogus metadata.

Fix: one-line manifest: false option in the VitePWA plugin config. The plugin now only emits the service worker and leaves manifest handling to the existing copyresource pipeline.

Verification

  • pnpm run build produces only build/web/manifest.json (the real one); no manifest.webmanifest
  • Built index.html references only href="manifest.json"

Stack

Sits above FR-2611; logically resolves an issue introduced in FR-2608 but couldn't be amended there without invasive rebase.

Copy link
Copy Markdown
Contributor Author

nowgnuesLee commented Apr 22, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Disables vite-plugin-pwa’s auto-generated web manifest so the app continues to use the repo’s authoritative manifest.json (copied into build/web/ by the existing build pipeline), preventing conflicting PWA metadata in production builds.

Changes:

  • Disable PWA plugin manifest generation/injection by setting manifest: false.
  • Add inline documentation explaining why manifest generation must remain disabled.

@nowgnuesLee nowgnuesLee force-pushed the 04-21-fix_fr-2608_disable_vite-plugin-pwa_auto-manifest_to_preserve_existing_manifest.json branch from 78236e1 to b789f9e Compare April 28, 2026 05:02
@nowgnuesLee nowgnuesLee force-pushed the 04-21-feat_fr-2611_retire_craco_webpack_build_makefile_ci_all_on_vite_vitest branch 2 times, most recently from 560dea4 to 7372c48 Compare April 28, 2026 05:15
@nowgnuesLee nowgnuesLee force-pushed the 04-21-fix_fr-2608_disable_vite-plugin-pwa_auto-manifest_to_preserve_existing_manifest.json branch from b789f9e to 3aa344c Compare April 28, 2026 05:15
@nowgnuesLee nowgnuesLee force-pushed the 04-21-feat_fr-2611_retire_craco_webpack_build_makefile_ci_all_on_vite_vitest branch from 7372c48 to a68b158 Compare April 28, 2026 05:19
@nowgnuesLee nowgnuesLee force-pushed the 04-21-fix_fr-2608_disable_vite-plugin-pwa_auto-manifest_to_preserve_existing_manifest.json branch from 3aa344c to 9750f0b Compare April 28, 2026 05:19
@nowgnuesLee nowgnuesLee force-pushed the 04-21-feat_fr-2611_retire_craco_webpack_build_makefile_ci_all_on_vite_vitest branch from a68b158 to ff24662 Compare April 28, 2026 05:25
@nowgnuesLee nowgnuesLee force-pushed the 04-21-fix_fr-2608_disable_vite-plugin-pwa_auto-manifest_to_preserve_existing_manifest.json branch from 9750f0b to 4b6a570 Compare April 28, 2026 05:25
@nowgnuesLee nowgnuesLee force-pushed the 04-21-feat_fr-2611_retire_craco_webpack_build_makefile_ci_all_on_vite_vitest branch from ff24662 to ed450f5 Compare April 28, 2026 05:28
@nowgnuesLee nowgnuesLee force-pushed the 04-21-fix_fr-2608_disable_vite-plugin-pwa_auto-manifest_to_preserve_existing_manifest.json branch from 4b6a570 to 0bd7009 Compare April 28, 2026 05:28
@yomybaby yomybaby force-pushed the 04-21-fix_fr-2608_disable_vite-plugin-pwa_auto-manifest_to_preserve_existing_manifest.json branch from 0bd7009 to 7253345 Compare April 30, 2026 12:08
@yomybaby yomybaby force-pushed the 04-21-feat_fr-2611_retire_craco_webpack_build_makefile_ci_all_on_vite_vitest branch from ed450f5 to 07e96d8 Compare April 30, 2026 12:08
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 30, 2026

Merge activity

…ing manifest.json (#6877)

Resolves #6811(FR-2608)

## Summary

Follow-up fix for FR-2608. Discovered while verifying the end-to-end production build in FR-2611.

**Bug**: `vite-plugin-pwa` generates a `manifest.webmanifest` from `react/package.json` metadata and auto-injects `<link rel="manifest" href="/manifest.webmanifest">` into `index.html`. That competes with the repo's own `manifest.json` (already copied into `build/web/` by `copyresource`) — the auto one has:
- wrong `name`: `"backend-ai-webui-react"` (react package name, not product)
- wrong `theme_color`: `"#42b883"` (Vue green, pulled from some default)
- **no icons**

Whichever manifest the browser picks first can leave PWA installs with bogus metadata.

**Fix**: one-line `manifest: false` option in the VitePWA plugin config. The plugin now only emits the service worker and leaves manifest handling to the existing `copyresource` pipeline.

## Verification

- [x] `pnpm run build` produces only `build/web/manifest.json` (the real one); no `manifest.webmanifest`
- [x] Built `index.html` references only `href="manifest.json"`

## Stack

Sits above FR-2611; logically resolves an issue introduced in FR-2608 but couldn't be amended there without invasive rebase.
graphite-app Bot pushed a commit that referenced this pull request Apr 30, 2026
…ker (#6873)

Resolves #6811(FR-2608)

## Summary

Production build via Vite + `vite-plugin-pwa` service worker. This is the point where `vite build` produces a complete deployable `build/` directory.

**Build output** (new layout):
- `build/index.html` — built from project-root `index.html` via the `transformIndexHtml` hook
- `build/assets/*.js` — hashed chunks (Vite default)
- `build/sw.js` — service worker generated by `vite-plugin-pwa` (generateSW strategy)
- `build/workbox-*.js` — workbox runtime

**PWA plugin options** mirror the craco-era `workbox-webpack-plugin` GenerateSW call (`craco.config.cjs:390-400`):
- `strategies: 'generateSW'` + `filename: 'sw.js'`
- `injectRegister: false` — the existing registration script in `index.html:126-131` stays in charge (preserves legacy behaviour; we do not opt into `registerType: 'autoUpdate'`).
- `skipWaiting: true`, `clientsClaim: true`
- `maximumFileSizeToCacheInBytes: 5 MiB`
- `globIgnores: ['**/*.map', '**/asset-manifest.json']`

## Test plan

- [x] `pnpm run vite:build` completes without errors
- [x] `build/sw.js` generated, precaches ~460 entries (~22 MB)
- [x] SW registration path in `index.html` still resolves

## Follow-up (PR #6877)

The plugin also emits `manifest.webmanifest` by default, which competes with the repo's own `manifest.json`. That's disabled in the follow-up `fix(FR-2608)` PR further up the stack.

## Stack

Builds on FR-2610.
@graphite-app graphite-app Bot force-pushed the 04-21-feat_fr-2611_retire_craco_webpack_build_makefile_ci_all_on_vite_vitest branch from 07e96d8 to eaec713 Compare April 30, 2026 12:16
@graphite-app graphite-app Bot force-pushed the 04-21-fix_fr-2608_disable_vite-plugin-pwa_auto-manifest_to_preserve_existing_manifest.json branch from 7253345 to 7b13055 Compare April 30, 2026 12:17
Base automatically changed from 04-21-feat_fr-2611_retire_craco_webpack_build_makefile_ci_all_on_vite_vitest to main April 30, 2026 12:31
@graphite-app graphite-app Bot merged commit 7b13055 into main Apr 30, 2026
4 checks passed
@graphite-app graphite-app Bot deleted the 04-21-fix_fr-2608_disable_vite-plugin-pwa_auto-manifest_to_preserve_existing_manifest.json branch April 30, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS ~10 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vite PoC Phase 2: production build + Workbox PWA (vite-plugin-pwa)

2 participants