Skip to content

[Bug]: Guard client localStorage access in restricted browser contexts #331

@Th-Shivam

Description

@Th-Shivam

Bug Description

Bug Description

The client assumes localStorage is always readable and writable in a few places during app startup and settings initialization.

In restricted browser contexts like private browsing, embedded webviews, or environments where storage access is blocked, these calls can throw and break the UI. The trackpad page is also vulnerable to malformed stored values, especially for rein_invert.

Steps to Reproduce

Steps to Reproduce

  1. Open the app in a browser context where localStorage access is restricted, or manually simulate malformed storage values.
  2. Visit /settings or /trackpad.
  3. Observe that the app may fail during initialization or use invalid stored state.

Expected Behavior

Expected Behavior

The app should safely fall back to defaults when client storage is unavailable or malformed.

Desktop Operating System

Linux (Wayland - GNOME)

Client OS and browser

Firefox

Rein Version

1.0.0

Console Logs / Error Messages (Optional)

Screenshots / Recordings (Optional)

No response

Checklist

  • I have searched for existing issues to avoid duplicates

Metadata

Metadata

Assignees

No one assigned

    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