Refactor session management to use a new "Agent" API (#165)

* Add the atp-agent implementation (temporarily in this repo)

* Rewrite all session & API management to use the new atp-agent

* Update tests for the atp-agent refactor

* Refactor management of session-related state. Includes:
- More careful management of when state is cleared or fetched
- Debug logging to help trace future issues
- Clearer APIs overall

* Bubble session-expiration events to the user and display a toast to explain

* Switch to the new @atproto/api@0.1.0
This commit is contained in:
Paul Frazee
2023-02-07 16:04:08 -06:00
committed by GitHub
parent 0e160298c8
commit 759ec8011b
23 changed files with 464 additions and 471 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ describe('rootStore', () => {
})
it('should call the clearAll() resets state correctly', () => {
rootStore.clearAll()
rootStore.clearAllSessionState()
expect(rootStore.session.data).toEqual(null)
expect(rootStore.nav.tabs).toEqual([