Skip to content

feat(theme): implement theme persistence, JSON parser, and IndexedDB v6 (#126) - #150

Merged
Dyu20705 merged 1 commit into
devfrom
issue/126-theme-storage
Aug 30, 2026
Merged

feat(theme): implement theme persistence, JSON parser, and IndexedDB v6 (#126)#150
Dyu20705 merged 1 commit into
devfrom
issue/126-theme-storage

Conversation

@Dyu20705

Copy link
Copy Markdown
Owner

Summary

Implements Issue #126: Theme Import, Parser, and IndexedDB Persistence.

Changes

  1. IndexedDB v6 Migration: Upgrades DB_VERSION from 5 to 6 in core/storage.js with additive creation of userThemes (keyPath: 'id') and settings (keyPath: 'key') stores.
  2. Settings & User Theme Storage API: Implements getSettings, putSettings, saveUserThemeToDb, getUserThemeFromDb, listUserThemesFromDb, and deleteUserThemeFromDb in core/storage.js.
  3. Theme Storage Abstraction: Implements core/theme/themeStorage.js providing safe JSON theme import with 256KB length bounds and schema validation, JSON export, unified theme listing (merging built-ins with user themes), CRUD operations, and immutability protection for built-in themes.
  4. Database Snapshot Roundtrip: Updates exportDatabase and importDatabase in core/storage.js to guarantee 100% lossless backup/restore of custom themes and user settings.
  5. Test Coverage: Adds tests/integration/storage.theme.test.mjs and updates existing storage and E2E version assertions to v6.

Verification

  • npm run test:content: PASS (3 tests)
  • npm run lint: PASS (0 errors)
  • npm run test:unit: PASS (254 tests)
  • npm run test:integration: PASS (107 tests across 11 suites)
  • npm run test:perf: PASS (4 budget checks)
  • npm run test:e2e: PASS (118 Playwright tests)
  • git diff --check: Clean

Copilot AI lite review requested due to automatic review settings August 30, 2026 08:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Dyu20705
Dyu20705 merged commit bb1d340 into dev Aug 30, 2026
1 check passed
@Dyu20705
Dyu20705 deleted the issue/126-theme-storage branch August 30, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants