Skip to content

feat: add historySerialization with default behaviour - #214

Open
TiagoCerqueira wants to merge 4 commits into
theopenconversationkit:masterfrom
TiagoCerqueira:feat/BOTIV-9965-serialization-backend-message
Open

TiagoCerqueira wants to merge 4 commits into
theopenconversationkit:masterfrom
TiagoCerqueira:feat/BOTIV-9965-serialization-backend-message

Conversation

@TiagoCerqueira

Copy link
Copy Markdown

Resolves #213 by adding encryption support while allowing consumers to provide a custom encryption/decryption implementation, with the existing behaviour preserved by default.

@TiagoCerqueira
TiagoCerqueira force-pushed the feat/BOTIV-9965-serialization-backend-message branch from 75bf6c2 to 2bd3061 Compare September 3, 2026 14:11
Comment thread src/historySerialization.ts Resolved
Comment thread README.md Resolved
@TiagoCerqueira
TiagoCerqueira force-pushed the feat/BOTIV-9965-serialization-backend-message branch from 2bd3061 to 0f5f55e Compare September 8, 2026 14:11
Comment thread src/settings/TockSettings.tsx Resolved
Comment thread src/settings/TockSettings.tsx Resolved
@TiagoCerqueira
TiagoCerqueira force-pushed the feat/BOTIV-9965-serialization-backend-message branch from 0f5f55e to 85a7ba1 Compare September 9, 2026 13:41
// When the chat gets initialized for the first time, process optional referral|opening message
sseInitPromise.then(async () => {
const history = loadHistory();
const history = await loadHistory();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

On further testing, this change exacerbates a pre-existing race condition, where an established SSE connection can start receiving queued messages from the backend before the history loads, leading to some of the new messages appearing at the very top of the conversation (and thus being easily missed by the user).

suggested fix: switch to loading the history before establishing the SSE connection

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.

Encrypt conversation history stored in localStorage

2 participants