Update task task-053
This commit is contained in:
parent
6e40934db3
commit
0dab90d6e6
|
|
@ -4,6 +4,7 @@ title: Fix user identity caching on logout/login
|
||||||
status: Done
|
status: Done
|
||||||
assignee: []
|
assignee: []
|
||||||
created_date: '2025-12-15 23:40'
|
created_date: '2025-12-15 23:40'
|
||||||
|
updated_date: '2025-12-15 23:40'
|
||||||
labels:
|
labels:
|
||||||
- bug-fix
|
- bug-fix
|
||||||
- auth
|
- auth
|
||||||
|
|
@ -20,9 +21,23 @@ Fixed issues with user identity state not being properly cleared/restored during
|
||||||
|
|
||||||
## Acceptance Criteria
|
## Acceptance Criteria
|
||||||
<!-- AC:BEGIN -->
|
<!-- AC:BEGIN -->
|
||||||
- [ ] #1 Crypto keys and tldraw user IDs persist across logout (account data)
|
- [x] #1 Crypto keys and tldraw user IDs persist across logout (account data)
|
||||||
- [ ] #2 Session-specific data cleared on logout (permissions, graph cache)
|
- [x] #2 Session-specific data cleared on logout (permissions, graph cache)
|
||||||
- [ ] #3 No duplicate cursors when logging out and back in
|
- [x] #3 No duplicate cursors when logging out and back in
|
||||||
- [ ] #4 Tools load properly after login from logged-out state
|
- [x] #4 Tools load properly after login from logged-out state
|
||||||
- [ ] #5 CryptIDDropdown and NetworkGraph reset state on logout
|
- [x] #5 CryptIDDropdown and NetworkGraph reset state on logout
|
||||||
<!-- AC:END -->
|
<!-- AC:END -->
|
||||||
|
|
||||||
|
## Implementation Notes
|
||||||
|
|
||||||
|
<!-- SECTION:NOTES:BEGIN -->
|
||||||
|
Implemented in commits df80a3f and related changes to Board.tsx.
|
||||||
|
|
||||||
|
Key changes:
|
||||||
|
- sessionPersistence.ts: Added session-logged-in and session-cleared events, preserve tldraw user IDs and crypto keys on logout
|
||||||
|
- Board.tsx: Check localStorage directly for auth in onMount, listen for session events
|
||||||
|
- CryptIDDropdown.tsx: Clear connections state on logout
|
||||||
|
- useNetworkGraph.ts: Clear graph cache on logout
|
||||||
|
|
||||||
|
The root cause was clearing tldraw-user-id-* keys on logout, which created new presence IDs on each login while old presence records persisted in Automerge.
|
||||||
|
<!-- SECTION:NOTES:END -->
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue