-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Implement local service worker file serving #7884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Implement local service worker file serving #7884
Conversation
Cursor Agent can help with this pull request. Just |
console.log('[LocalFileIndexedDB] File stored successfully:', path); | ||
resolve(); | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add onabort?
* Useful for cleaning up old preview sessions. | ||
* @param pathPrefix - The path prefix to match (e.g., '/local_sw_preview/session-123/') | ||
*/ | ||
export const deleteFilesWithPrefix = async (pathPrefix: string): Promise<number> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo: actually use this.
Co-authored-by: florian <[email protected]>
91d4163
to
90cadac
Compare
@@ -0,0 +1,338 @@ | |||
// @flow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to BrowserSWIndexedDB
86d0d37
to
b6cad24
Compare
Implement local game previews using a Service Worker and IndexedDB.
This change enables local, offline game previews directly within the web-app, improving preview load times and reliability by storing and serving generated game files from IndexedDB via a Service Worker, rather than uploading to S3.