Repository navigation
feat: paginate local and Drive backup history - #1271
Conversation
Add newest-first cursor pagination to GET /api/db-tools/backups and GET /api/settings/google-drive/backups, probe SQLite schema versions only for returned local backup page entries, and load local and Google Drive backup history in Settings -> Database with initial 5-item pages, independent 10-item Load more actions, and recoverable error states.
…d response payloads
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@greptileai review this at apex |
[Medium impact] The PR appears safe to merge; no new actionable issues were found.
|
…efresh Track request generations for local and Google Drive backup history so refreshing invalidates in-flight older-page requests and prevents skipped rows.
|
@greptileai review this at apex |
Fixes #1158
Intent
Resolve FreeOpenSourcePOS/FloCafe GitHub issue #1158 (
feat(backups): paginate local and Drive backup history). Keep local and Google Drive backup history inSettings -> Databaseresponsive as the number of backups grows: fetch the newest 5 local backups and newest 5 Drive backups separately on initial load, add independent "Load more" actions that fetch the next 10 older entries for that source via newest-first cursor pagination (GET /api/db-tools/backupsandGET /api/settings/google-drive/backups), show loading/completion/recoverable error states without losing already-rendered rows, and keep restore/download/delete actions and backup retention policies unchanged. Verify with backend tests, Playwright E2E tests, and screenshots, run through/no-mistakesto open the PR linked to#1158(Fixes #1158), and do not merge the PR.What Changed
limitandcursorquery parameters toGET /api/db-tools/backupsandGET /api/settings/google-drive/backups, returning newest-first pages with{ backups, nextCursor, hasMore }while returning 400 on invalid parameters and retaining unpaginated listings when omitted.Risk Assessment
✅ Low: The backup history pagination implementation for local and Google Drive backups is clean, robust, well-tested, and adheres strictly to all project invariants and intent requirements.
Testing
Exercised backend database tools and Google Drive pagination suites, Playwright E2E browser tests for backup history pagination and stale response guards, and a live end-to-end run driving the un-mocked running server and Chromium browser to paginate 16 real disk backups through Settings -> Database; all checks and scenarios passed and 7 screenshot artifacts were captured.Evidence: Live initial 5 local backup rows
Evidence: Live 15 local backup rows loaded
Evidence: Live all 16 local backup rows complete
Evidence: E2E initial 5 local and 5 Drive backup rows
Evidence: E2E 15 local rows loaded independently
Evidence: E2E Drive Load more error with preserved rows
Evidence: E2E Drive retry success and full list loaded
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
npm run test:database-tools-apinpm run test:google-drivecd frontend && BACKUP_PAGINATION_SCREENSHOT_DIR=~/.no-mistakes/evidence/01M5FWG9M1NBNKV62NPEFTQBEX npx playwright test --config=playwright.config.ts e2e/backup-history-pagination.spec.tscd frontend && npx playwright test --config=playwright.config.ts e2e/settings-request-budget.spec.ts -g "stale"node ~/.gemini/antigravity-cli/brain/b733dbf7-85ea-4727-bda8-f5d09bdad6ee/scratch/drive_live.cjs✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.