feat(app-expo): replay brand splash on logout and route to login

After sign-out or data purge, clear session state reliably, remount the
splash overlay above navigation, and navigate to login instead of tabs so
users no longer briefly land on the chat home screen.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Kevin
2026-05-19 14:31:32 +08:00
parent 95856ca11a
commit b22f1cd4c4
14 changed files with 225 additions and 46 deletions

View File

@@ -226,6 +226,7 @@ describe('useLogout', () => {
test('reads refresh token first, calls API, then clears local state', async () => {
mockGetRefreshToken.mockResolvedValue('my-refresh');
mockLogout.mockResolvedValue({ message: 'ok' });
mockHasTokens.mockResolvedValue(false);
const wrapper = createWrapper();
@@ -251,6 +252,7 @@ describe('useLogout', () => {
test('clears local state even if server logout fails', async () => {
mockGetRefreshToken.mockResolvedValue('my-refresh');
mockLogout.mockRejectedValue(new Error('Network down'));
mockHasTokens.mockResolvedValue(false);
const wrapper = createWrapper();