[pull] main from xintaofei:main#89
Merged
Merged
Conversation
An unsent draft tab is device-local and never persisted, so quitting with only a draft open reopened to zero tabs: the chat area was blank and the New chat button, Mod+T, and context menu were all dead because each was gated on the now-null active folder. Hydration now synthesizes an active draft whenever no tabs are restored, targeting the last-active folder or chat mode via a localStorage hint, without writing any conversation or folder row before the first send. The sidebar New chat button falls back to chat mode instead of disabling when there is no active folder.
Each unsent chat draft eagerly creates a <data_dir>/chat-sessions/<date>/<uuid>/ scratch directory; quitting before the first send or deleting a chat conversation orphaned it forever. A startup sweep on both desktop and server now removes scratch directories that have no live is_chat folder row and are older than ten minutes, matching live directories by their (date, uuid) tail so a renamed or aliased data directory can never delete a live one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )