Migrate LocalStorage to IndexedDB for large files#62
Migrate LocalStorage to IndexedDB for large files#62
Conversation
Replace localStorage with IndexedDB for persisting uploaded files and parsing configuration. This removes the 5MB size limit and simplifies the code by eliminating quota handling and large file workarounds. - Add new storage utility module (src/utils/storage.js) - Remove LARGE_FILE_THRESHOLD and related serialization logic - Add automatic migration from localStorage to IndexedDB - Add loading state while data loads from IndexedDB - Update tests to use fake-indexeddb
Simplify IndexedDB storage by removing automatic migration from localStorage. Users will start fresh with IndexedDB storage.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const [uploadedFiles, setUploadedFiles] = useState([]); | ||
| const [globalParsingConfig, setGlobalParsingConfig] = useState( | ||
| () => JSON.parse(JSON.stringify(DEFAULT_GLOBAL_PARSING_CONFIG)) | ||
| ); | ||
| const [isLoading, setIsLoading] = useState(true); |
There was a problem hiding this comment.
Migrate existing localStorage data to IndexedDB
The new persistence path initializes with empty state and only restores from IndexedDB, so any configuration or uploaded files previously saved in localStorage are now ignored and lost on upgrade. Returning users who had data persisted before this change will see an empty app unless they manually re-upload everything. Consider migrating existing localStorage entries into IndexedDB or falling back to localStorage when the IndexedDB stores are empty.
Useful? React with 👍 / 👎.
No description provided.