Remove auto-logout timer and connection tracking#306
Merged
Conversation
The business node sealed its database after the dashboard WebSocket had been gone for 5s. warpdroid talks to the node over libp2p, not that socket, and can't reopen the DB itself (only the owner's password can), so closing the browser tab logged the owner out from under a paired device and its next request failed with "db is not running". Drop the auto-logout entirely: the connection accounting, the grace timer, and the IsAuthenticated guard it relied on. Explicit dashboard logout and the same-origin WebSocket check are kept. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SgLQsdrATMmCAdk1vv9hsU
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the automatic logout functionality that was triggered when all dashboard connections were closed. This includes the grace period timer that allowed page reloads to reconnect without logging out.
Key changes:
logoutGracePeriodconstant and auto-logout timer mechanismactiveConns,logoutTimer,connMx) fromBridgeHandlerconnConnected()andconnDisconnected()methods that managed connection stateautoLogout()method that handled the grace period timeoutIsAuthenticated()method from theAuthenticatorinterfacesameOrigin()comment to reflect removal of auto-logout logicHandle()method by removing connection tracking callsThe node will no longer automatically log out the owner when the dashboard connection is closed.
https://claude.ai/code/session_01SgLQsdrATMmCAdk1vv9hsU