Skip to content

Add validation to config loading with fallback to defaults for invalid localStorage data#7

Merged
bluesign merged 5 commits intomainfrom
copilot/make-config-loading-resistant
Dec 19, 2025
Merged

Add validation to config loading with fallback to defaults for invalid localStorage data#7
bluesign merged 5 commits intomainfrom
copilot/make-config-loading-resistant

Conversation

Copy link
Contributor

Copilot AI commented Dec 19, 2025

  • Understand current config loading implementation
  • Create validation functions for each config section (UI, editor, monaco, settings)
  • Add type guards to validate loaded config structure
  • Update loadConfig to use validation and fallback to defaults on invalid data
  • Create tests for config loading with invalid values (26 test cases)
  • Test with various invalid localStorage scenarios
  • Address code review feedback (extract panel validation, support partial configs, fix formatting)
  • Add documentation for validation functions
  • Run security checks (manual review completed)
  • Verify changes work correctly (build passes, all tests pass)
  • Fix CI failures (added .npmrc with legacy-peer-deps)
Original prompt

Make config loading resistant to invalid values ( fallback to default config if needed )


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits December 19, 2025 04:32
Co-authored-by: bluesign <1119338+bluesign@users.noreply.github.com>
…ation

Co-authored-by: bluesign <1119338+bluesign@users.noreply.github.com>
Co-authored-by: bluesign <1119338+bluesign@users.noreply.github.com>
@bluesign bluesign marked this pull request as ready for review December 19, 2025 04:40
Copilot AI changed the title [WIP] Add fallback to default config for invalid values Add validation to config loading with fallback to defaults for invalid localStorage data Dec 19, 2025
Copilot AI requested a review from bluesign December 19, 2025 04:41
@bluesign
Copy link
Owner

@copilot check CI failures

Co-authored-by: bluesign <1119338+bluesign@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 19, 2025

@copilot check CI failures

Fixed the CI failures. The issue was a peer dependency conflict between @types/react@19.2.7 and @fluentui/react@8.120.6 which requires @types/react <19.0.0.

Added .npmrc with legacy-peer-deps=true to resolve this during npm ci in CI. The workflow may require approval since it's triggered by a bot account. (commit c20144e)

@bluesign bluesign merged commit b381bb6 into main Dec 19, 2025
5 of 6 checks passed
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

Comments