Skip to content

fix(ai-chat): reset conversations loading state on failure - #9

Closed
AshSgDe29071999 wants to merge 1 commit into
HaveNiceDa:mainfrom
AshSgDe29071999:fix/ai-chat-conversations-loading-reset
Closed

fix(ai-chat): reset conversations loading state on failure#9
AshSgDe29071999 wants to merge 1 commit into
HaveNiceDa:mainfrom
AshSgDe29071999:fix/ai-chat-conversations-loading-reset

Conversation

@AshSgDe29071999

@AshSgDe29071999 AshSgDe29071999 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Wrap conversation list loading so isLoadingConversations always resets to false on success or failure.
  • Add a unit test asserting loading ends false when loadConversations rejects.

Closes #7

Test plan

  • pnpm exec vitest run src/components/ai-chat/refreshConversations.test.ts (from apps/web)
  • Open AI panel, force loadConversations failure, confirm list is not stuck loading

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

@AshSgDe29071999 is attempting to deploy a commit to the haveniceda's projects Team on Vercel.

A member of the Team first needs to authorize it.

Ensure refreshConversations clears isLoadingConversations via try/finally
when loadConversations rejects, and cover the failure path with a unit test.
@AshSgDe29071999
AshSgDe29071999 force-pushed the fix/ai-chat-conversations-loading-reset branch from 125f575 to c569ba3 Compare August 2, 2026 14:37
@AshSgDe29071999

Copy link
Copy Markdown
Contributor Author

Closing as duplicate of #8 (same fix for #7).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

会话列表加载失败时 loading 状态无法复位

1 participant