Skip to content

fix(selector-prefs): validate persisted values - #612

Open
Usernames686 wants to merge 1 commit into
xintaofei:mainfrom
Usernames686:codex/fix-selector-prefs-validation
Open

fix(selector-prefs): validate persisted values#612
Usernames686 wants to merge 1 commit into
xintaofei:mainfrom
Usernames686:codex/fix-selector-prefs-validation

Conversation

@Usernames686

Copy link
Copy Markdown

Summary

  • validate persisted selector preferences before reading nested fields
  • recover safely when localStorage contains malformed JSON or values with an unexpected shape
  • preserve valid mode and string-valued configuration preferences while dropping invalid fields

Tests

  • pnpm vitest run src/lib/selector-prefs-storage.test.ts
  • pnpm lint
  • pnpm test -- --run
  • pnpm build

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.

1 participant