Repository navigation
Codex/standardize backup names errors - #27
Conversation
Why\n- Local JSON export and Google Drive backups used different filename conventions, which was confusing and made it harder to reason about backup lists.\n\nWhat\n- Add shared helper (entrypoints/shared/backup_filename.ts) defining the canonical backup filename format: nufftabs-backup-<ISO-with-dashes>-g<groupCount>.json\n - Example: nufftabs-backup-2026-02-23T02-20-49-747Z-g22.json\n- Update Drive backup filename creation (entrypoints/drive/types.ts createBackupFileName) to use the shared helper so uploads and local exports converge on the same naming.\n- Keep backward compatibility for listing/group-count extraction by continuing to parse the -g<digits>.json suffix regardless of prefix.\n\nDocs + tests\n- Update Drive backup docs/examples to reflect the new canonical prefix.\n- Add unit tests for the shared helper and update existing Drive utility tests to assert the new prefix.
What\n- Local list-page JSON export download name now matches the canonical backup filename format used by Drive backups: nufftabs-backup-<timestamp>-g<groupCount>.json.\n- The group count is derived from the exported saved-groups object so it remains O(nGroups) and avoids any extra storage reads.\n\nAlso\n- Standardize Import/Export user-facing error messages to a consistent, friendlier style (period-separated sentences instead of mixed colon formats).\n- Add IO-specific error wrapper so unexpected exceptions surface a clear snackbar message, while leaving other list-page actions unchanged.\n\nTests\n- Update integration assertions to match the new standardized OneTab/import-file messages.
TypeScript parsing failed because the updated assertion used escaped quotes (\"...\") instead of a normal string literal. This commit switches to a standard double-quoted string so pnpm compile passes.
Summary of ChangesHello @viseshrp, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on improving the robustness and user experience of backup and import functionalities. It standardizes backup file naming for better consistency and maintainability, centralizing the logic into a new utility module. Additionally, it significantly enhances user feedback by providing more descriptive and actionable error messages for various import and export scenarios, ensuring a smoother experience for users encountering issues. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
=======================================
- Coverage 94.9% 94.8% -0.1%
=======================================
Files 17 18 +1
Lines 2120 2132 +12
Branches 555 556 +1
=======================================
+ Hits 2012 2023 +11
- Misses 96 97 +1
Partials 12 12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This is a great pull request that successfully standardizes the backup filename format and improves user-facing error messages for import/export operations. The refactoring of filename logic into a new shared module backup_filename.ts with its own unit tests is a solid improvement for maintainability. The introduction of runIoTask and the more descriptive error messages significantly enhance the user experience. I have one suggestion to make the error handling for JSON imports even more robust.
No description provided.