Skip to content

Conversation

@alishair7071
Copy link
Contributor

@alishair7071 alishair7071 commented Feb 12, 2026

Fixes #68

Summary

Client-side settings (localStorage) now persist only mouse sensitivity, invert scroll, and theme. The Server IP (for Remote) is no longer read from or written to localStorage.

Changes

  • settings.tsx: Removed localStorage.getItem('rein_ip') on load; IP is initialized from window.location.hostname only. Removed localStorage.setItem('rein_ip', ip) when IP changes. QR code still updates from current IP state; IP is simply not persisted across sessions.

Summary by CodeRabbit

  • Refactor
    • Updated IP address initialization logic in settings
    • Optimized QR code generation mechanism

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

The PR modifies IP initialization in settings to derive the IP from the default hostname on mount instead of reading from localStorage. The rein_ip field is no longer persisted. QR generation logic is simplified by removing localStorage writes and window guards.

Changes

Cohort / File(s) Summary
Settings IP Initialization and QR Generation
src/routes/settings.tsx
Changed IP initialization to derive from default hostname on mount instead of localStorage; removed client-side IP persistence; simplified QR generation logic by removing localStorage writes and redundant window guards.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • client-server-settings #66: Directly related modification to src/routes/settings.tsx involving removal of client-side persistence for fields like rein_ip and simplification of localStorage handling.

Poem

🐰 No more localStorage carrots to hoard and hide,
IP from hostname hops right by our side,
QR codes sparkle, clean and bright,
Settings refactored just right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly aligns with the main objective: removing IP from client-side storage and keeping only sensitivity, invert, and theme settings.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@alishair7071 alishair7071 changed the title fix: remove IP from client-side storage; only sensitivity, invert, th… fix: remove IP from client-side storage; store only sensitivity, invert, theme Feb 12, 2026
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.

Remove IP from client-side storage; store only sensitivity, invert scroll, and theme

1 participant