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
+2 -2
View File
@@ -648,8 +648,8 @@ export const mockedRootStore = {
resolveName: jest.fn(),
serialize: jest.fn(),
hydrate: jest.fn(),
fetchStateUpdate: jest.fn(),
clearAll: jest.fn(),
updateSessionState: jest.fn(),
clearAllSessionState: jest.fn(),
session: mockedSessionStore,
nav: mockedNavigationStore,
shell: mockedShellStore,