Skip to content

Studio: Chat thread autosave persistence - #5256

Merged
rolandtannous merged 6 commits into
unslothai:mainfrom
Imagineer99:fix/chat-history-saving
May 3, 2026
Merged

rolandtannous merged 6 commits into
unslothai:mainfrom
Imagineer99:fix/chat-history-saving

Conversation

@Imagineer99

Copy link
Copy Markdown
Member

Summary

Fixes #5250

New chat threads not were appearing in Recents/export until a later mutation, such as deleting a message.

Changes

  • Make thread initialization idempotent.
  • Sync the visible assistant-ui thread into Dexie at run start/end.
  • Reuse the existing exported-message Dexie sync path.
  • Guard in-flight saves from restoring deleted threads.
  • Hide empty/orphaned threads from chat search.

@Imagineer99 Imagineer99 changed the title fix: chat thread autosave persistence Studio: Chat thread autosave persistence May 2, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: de78331344

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request implements an autosave mechanism for chat threads and introduces a tombstone system to prevent the accidental re-creation of deleted threads during asynchronous operations. Key additions include the ThreadDexieAutosave component, which synchronizes thread state to the local database on run events, and the ensureThreadRecord utility for idempotent thread initialization. Review feedback highlights a logic issue where an isLoading check prevents autosaving at the start of a run and identifies a redundant function call in the autosave logic.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cd8e296baf

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48fbeabbb5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@Imagineer99

Copy link
Copy Markdown
Member Author

manually tested and fix working as expected, ready for review @rolandtannous

@rolandtannous

Copy link
Copy Markdown
Contributor

tested and checked. works fine . merging.
Screenshot 2026-05-03 at 10 20 26 PM

new_chat_thread_shows_recent.mp4

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.

[Bug] Chat thread is not created in sidebar until deleting a message; export returns empty or stale chat data

2 participants