Skip to content

[ISSUE #2475] fix(ai): tolerate unavailable session storage - #2479

Open
yuluo-yx wants to merge 1 commit into
apache:rocketmq-studiofrom
yuluo-yx:0820-yuluo-yx/fix-20
Open

[ISSUE #2475] fix(ai): tolerate unavailable session storage#2479
yuluo-yx wants to merge 1 commit into
apache:rocketmq-studiofrom
yuluo-yx:0820-yuluo-yx/fix-20

Conversation

@yuluo-yx

Copy link
Copy Markdown
Member

Summary

  • degrade AI history hydration to empty storage when sessionStorage reads fail
  • ignore removal failures after clearing pending persistence
  • keep in-memory conversation behavior available under browser storage restrictions

Verification

  • aiChatHistoryStore.test.ts: 10 tests passed
  • targeted ESLint and Prettier checks passed
  • scope check: 157 changed lines

Fixes #2475

Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Adds defensive error handling for session storage failures (SecurityError) in the AI chat history store, ensuring the in-memory store remains usable even when persistence fails.

Strengths:

  • Graceful degradation when storage is unavailable
  • Comprehensive test coverage for error scenarios
  • Proper mock cleanup with restoreAllMocks()

LGTM — improves resilience of AI chat history feature.


Automated review by github-manager-bot

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.

2 participants