Repository navigation
Studio: stop New chat from requesting a thread row that does not exist yet - #12539
Conversation
…thread-read # Conflicts: # studio/frontend/src/features/chat/utils/chat-history-storage.ts
|
Reached Codex review convergence at oobabooga#327. |
|
Review record for #12539, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#335. Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found. Round 1: reviewed mirror
|
…t yet (unslothai#12539) Co-authored-by: Daniel Han <[email protected]>
Opening or refreshing New chat sends requests for a chat thread that does not yet exist in storage. The requests come from looking up the chat's project and counting tokens for context usage, and produce unnecessary 404s in the browser console.
The storage layer now returns an absent thread or an empty message list without making these requests while the chat is still new:
newThreadId. The__LOCALID_prefix is insufficient because saved chats keep that prefix.newThreadId.Validation
Live A/B on Linux in headless Chromium, comparing main and this branch with
unsloth/gemma-3-270m-it-GGUFQ8_0:On both builds, normal chats and chats within projects preserved their user and assistant messages after reopening, sending a follow-up, and reloading. Project assignments remained correct. Compare view opened successfully, and neither build raised JavaScript exceptions.
codex-learned-capabilities-survive-sync.test.ts, is intermittent and does not import chat storage.Remaining limitations