Skip to content

Skip token writes to host local storage on dashboard origins #86exgqfpu#21

Merged
navidshad merged 4 commits into
mainfrom
dev
May 6, 2026
Merged

Skip token writes to host local storage on dashboard origins #86exgqfpu#21
navidshad merged 4 commits into
mainfrom
dev

Conversation

@navidshad
Copy link
Copy Markdown
Collaborator

@navidshad navidshad commented May 6, 2026

🏷️ PR Title:
Fix: Skip token writes to host local storage on dashboard origins

📋 Summary

This PR introduces a fix to prevent token writes to the host's local storage when operating on dashboard origins. It also includes routine release chore commits for versions 1.11.0-dev.3 and 1.11.0-dev.4.

🔗 Related Tasks

#86exgqfpu - Skip token writes to host local storage on dashboard origins

📝 Additional Details

The change improves security and data integrity by avoiding unnecessary token storage on certain origins, specifically dashboard-related domains.

📜 Commit List

838451e fix: #86exgqfpu skip token writes to host LS on dashboard origins
6a6cb72 chore(release): 1.11.0-dev.3 [skip ci]
335ecbd chore(release): 1.11.0-dev.4 [skip ci]
fd7372b Merge remote-tracking branch 'origin/HEAD' into dev

semantic-release-bot and others added 4 commits May 4, 2026 13:25
# [1.11.0-dev.3](v1.11.0-dev.2...v1.11.0-dev.3) (2026-05-04)

### Bug Fixes

* persist anonymous tokens and stop logout-cascade on anon sessions ([825db93](825db93))
The extension's content scripts (nibble, console-crane) inject @modular-rest/client into every page. Because content scripts share localStorage with the host, modular-rest's saveSession (and our explicit cache write) was overwriting the dashboard's own `token` localStorage key on subturtle.app and localhost:3000 — wiping the user's session and forcing them back to /auth/login on the next reload or new tab.

Patch Storage.prototype.setItem/removeItem at module load (before @modular-rest/client is imported) to no-op on `token` writes when the host is the dashboard. Extension auth still works via chrome.storage.sync; we only lose the per-page LS cache on dashboard origins (one extra /user/loginAnonymous call per content-script mount, which is negligible).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@navidshad
Copy link
Copy Markdown
Collaborator Author

@navidshad navidshad changed the title Dev Skip token writes to host local storage on dashboard origins #86exgqfpu May 6, 2026
@navidshad navidshad merged commit fad175c into main May 6, 2026
5 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

🎉 This PR is included in version 1.11.1-dev.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

🎉 This PR is included in version 1.11.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants