-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[chat]Persist chatbot state in local storage #10895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[chat]Persist chatbot state in local storage #10895
Conversation
Signed-off-by: Lin Wang <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #10895 +/- ##
=======================================
Coverage 60.76% 60.76%
=======================================
Files 4533 4533
Lines 122127 122162 +35
Branches 20459 20469 +10
=======================================
+ Hits 74207 74232 +25
- Misses 42687 42693 +6
- Partials 5233 5237 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
How are we handling invalidation if a user logs out and signs in to another user? Or are we thinking about these preferences as client preferences instead of user preferences? |
Yes. For now it's a client preferences. It won't be cleared after user logout. This is an existing feature in the dashboards assistant repo. I just sync back to the OSD chat plugin to keep the two chatbot have the same behavior. |
* Persist chatbot state in local storage Signed-off-by: Lin Wang <[email protected]> * Changeset file for PR opensearch-project#10895 created/updated --------- Signed-off-by: Lin Wang <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Description
This change introduces persistent state management for the chatbot window using browser localStorage. The implementation extends the ChatService to track comprehensive window state including open/closed status, layout mode (sidecar or fullscreen), and padding size, automatically persisting changes to localStorage and restoring the chatbot to its previous configuration on application start.
Changelog
Check List
yarn test:jestyarn test:jest_integration