Skip to content

Bug: Runtime validation missing for saved editor format value #293

@Muawiya-contact

Description

@Muawiya-contact

Bug Details

Description

The app reads ioflux.schema.editor.format from sessionStorage without runtime validation.
If this value is invalid (for example xml), the app silently accepts it and continues in an inconsistent state instead of resetting to a supported format.

Steps to Reproduce

  1. Open the app in the browser.
  2. Open DevTools -> Application -> Session Storage.
  3. Set ioflux.schema.editor.format to xml.
  4. Keep ioflux.schema.editor.content as valid JSON schema content.
  5. Refresh the page.
  6. Observe that the invalid format value is still accepted silently (no correction/warning).
Image

Expected Behavior

The app should only accept supported formats (json / yaml).
If an invalid value is found (e.g., xml), it should:

  • auto-reset to json, and
  • optionally show a small one-time warning to the user.

Environment

  • OS: Windows 11
  • Browser: Chrome
  • Version: 0.6.0 (current branch state)

Additional Context

This may not always crash immediately, but it is still a reliability issue because invalid persisted state is trusted without validation.
This can cause confusing behavior now and increase risk of regressions as format-specific logic expands.

Good First Issue

  • I believe this issue is a good first issue for new contributors.

Contribution

  • I am willing to fix this bug.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions