mirror of
https://github.com/actualbudget/actual.git
synced 2026-07-11 11:59:55 -05:00
[AI] Fix fatal error when launching PWA while offline (#7978)
* [AI] Fix fatal error when launching PWA while offline (#7886) The Vite migration in 26.5 changed how `data-file-index.txt` is generated. The previous shell-based `cp ... migrations/*` and `find * -type f` skipped dotfiles by default, but the new `fs.cp`/`fs.readdir` recursive calls include them. As a result the legacy `.force-copy-windows` marker file ended up in the index and the app fetched it on every startup. The workbox precache globs only match files with known extensions, so this dotfile is never cached; opening the PWA offline therefore failed the entire `populateDefaultFilesystem` step and rendered a fatal error. Skip dotfiles when generating the index (restoring the pre-26.5 behavior) and remove the stale marker file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Add release notes for PR #7978 * Delete upcoming-release-notes/7886.md --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ff70d2d5f8
commit
78f101b995
@@ -177,6 +177,10 @@ async function stagePublicData(): Promise<void> {
|
||||
.relative(publicDataDir, path.join(e.parentPath, e.name))
|
||||
.replaceAll(path.sep, '/'),
|
||||
)
|
||||
// Skip dotfiles (e.g. legacy `.force-copy-windows` marker). They have no
|
||||
// matching extension in the workbox precache globs, so a PWA opened
|
||||
// offline would fail to fetch them and break startup (issue #7886).
|
||||
.filter(file => !file.split('/').some(part => part.startsWith('.')))
|
||||
.sort();
|
||||
await writeFile(
|
||||
path.resolve(publicDir, 'data-file-index.txt'),
|
||||
|
||||
6
upcoming-release-notes/7978.md
Normal file
6
upcoming-release-notes/7978.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfixes
|
||||
authors: [MatissJanis]
|
||||
---
|
||||
|
||||
Fix fatal error preventing PWA launch when offline on iOS devices.
|
||||
Reference in New Issue
Block a user