LibreChat/.github/workflows
Marco Beretta fdd5f9ce65
🖼️ fix: Precache PWA Icons and Let Them Refresh (#15654)
* 🖼️ fix: Precache PWA Icons and Let Them Refresh

Production builds set `publicDir: false`, so `client/scripts/post-build.cjs`
copied `public/assets` into `dist/assets` only after `vite build` had finished.
vite-plugin-pwa globs `dist/` from its `closeBundle` hook, inside that build, so
the icon patterns in `workbox.globPatterns` matched zero files and the generated
`sw.js` shipped without a single icon, silently: workbox treats an empty glob as
a no-op. `build:ci`, used by the Playwright lanes, never ran the post-build step
at all and produced a `dist` with no icons or `robots.txt`.

Move the copy into a `copyPublicAssets()` build plugin that runs in
`writeBundle`, which completes for every plugin before `closeBundle`, and drop
the post-build script with its lone `fs-extra` dependency.

Ordering alone was not enough. The plugin defaults `dontCacheBustURLsMatching`
to `/^assets\//`, true only for hashed bundle output. The icons live in
`assets/` under stable filenames, so they entered the manifest with
`revision: null`, permanently immutable, meaning an installed PWA would never
pick up a rebranded icon: the other half of the report. Match Vite's
`[name].[hash].[ext]` shape instead so hashed chunks stay revision-free while
the icons carry content revisions.

Also drop `manifest.webmanifest` from `globPatterns`, since the plugin always
appends it as an additional manifest entry and globbing it duplicated the
precache entry.

A clean `npm run build` now yields 55 precache entries with all five icons
revisioned, against 0 icon entries before.

* 📝 docs: Describe the Full Copy Set in copyPublicAssets

* 🔒 chore: Drop fs-extra From bun.lock
2026-09-06 11:32:09 -04:00
..
a11y.yml 🚦 ci: Reduce GitHub Actions Runner Pressure (#14716) 2026-08-09 07:41:00 -04:00
agents-integration-tests.yml 🛰️ test: Prove Cross-Replica Subagent Delivery (#15064) 2026-08-21 03:36:11 -04:00
backend-review.yml 🎨 ci: Gate Frontend Jest on Codegraph Selection (Stage 1.5) (#15145) 2026-08-23 23:03:21 -04:00
build.yml ⚙️ ci: Bump GitHub Actions to Node.js 24 Runtimes (#14689) 2026-08-07 11:25:29 -04:00
cache-integration-tests.yml ✨ refactor: Presets, Skills Motion and Model Selector Polish (#14953) 2026-08-19 15:49:47 -04:00
client.yml ⚙️ ci: Bump GitHub Actions to Node.js 24 Runtimes (#14689) 2026-08-07 11:25:29 -04:00
codegraph-e2e-votes.yml 🖼️ fix: Precache PWA Icons and Let Them Refresh (#15654) 2026-09-06 11:32:09 -04:00
codegraph-select.yml 🎭 ci: Gate Playwright Lanes and Docker Smokes on Codegraph Selection (Stage 2) (#15136) 2026-08-23 14:58:45 -04:00
data-provider.yml ⚙️ ci: Bump GitHub Actions to Node.js 24 Runtimes (#14689) 2026-08-07 11:25:29 -04:00
data-schemas.yml ⚙️ ci: Bump GitHub Actions to Node.js 24 Runtimes (#14689) 2026-08-07 11:25:29 -04:00
deploy.yml ⚙️ ci: Bump GitHub Actions to Node.js 24 Runtimes (#14689) 2026-08-07 11:25:29 -04:00
dev-branch-images.yml 🫂 ci: Unify Docker Image Publishing Workflows (#15447) 2026-08-31 23:29:57 -04:00
dev-images.yml 🫂 ci: Unify Docker Image Publishing Workflows (#15447) 2026-08-31 23:29:57 -04:00
dev-staging-images.yml 🫂 ci: Unify Docker Image Publishing Workflows (#15447) 2026-08-31 23:29:57 -04:00
docker-publish.yml 🫂 ci: Unify Docker Image Publishing Workflows (#15447) 2026-08-31 23:29:57 -04:00
docker-smoke.yml 🎭 ci: Gate Playwright Lanes and Docker Smokes on Codegraph Selection (Stage 2) (#15136) 2026-08-23 14:58:45 -04:00
frontend-review.yml 🎨 ci: Gate Frontend Jest on Codegraph Selection (Stage 1.5) (#15145) 2026-08-23 23:03:21 -04:00
frontend-windows-nightly.yml 🧩 ci: Close Workflow Path-Filter Gaps (#14728) 2026-08-10 17:26:50 -04:00
helmcharts.yml ⚙️ ci: Bump GitHub Actions to Node.js 24 Runtimes (#14689) 2026-08-07 11:25:29 -04:00
langfuse-fanout.yml ⚙️ ci: Bump GitHub Actions to Node.js 24 Runtimes (#14689) 2026-08-07 11:25:29 -04:00
locize-i18n-sync.yml 📚 fix: Keep English Source Repository-Owned (#14920) 2026-08-17 02:29:34 -04:00
main-image-workflow.yml 🫂 ci: Unify Docker Image Publishing Workflows (#15447) 2026-08-31 23:29:57 -04:00
playwright-bombadil.yml 🖼️ fix: Precache PWA Icons and Let Them Refresh (#15654) 2026-09-06 11:32:09 -04:00
playwright-mock.yml 🖼️ fix: Precache PWA Icons and Let Them Refresh (#15654) 2026-09-06 11:32:09 -04:00
pr-retarget-dev.yml 🎯 ci: Retarget Pull Requests Opened Against main to dev (#15416) 2026-08-31 11:29:34 -04:00
retry-docker-builds.yml 🧱 ci: Retry Failed Docker Builds (#13935) 2026-06-24 10:09:36 -04:00
static-checks.yml 🪥 chore: Run CI's Static Checks on Each Commit's Diff (#15303) 2026-08-28 10:08:37 -04:00
sync-helm-chart-tags.yml 🧾 ci: Skip Workflows for Markdown-Only Changes (#14378) 2026-07-21 20:35:59 -04:00
tag-images.yml 🫂 ci: Unify Docker Image Publishing Workflows (#15447) 2026-08-31 23:29:57 -04:00