ActiveThreadSync was reacting to aui's mainThreadId === null on mount (aui hasn't booted yet) by calling setActiveThreadId(null), which wiped the just-restored persisted draft id from localStorage and emptied the doc panel for the user's thread. The previous fix only covered the 'aui minted a different LOCALID' branch; it missed the 'mainThreadId is null while aui boots' branch. Treat a null mainThreadId as a no-op for the sync. Explicit clears (new chat, sidebar delete) keep going through setActiveThreadId(null) directly, so this guard doesn't trap stale state — it just gives the persisted draft id a chance to survive until aui finishes booting. |
||
|---|---|---|
| .. | ||
| backend | ||
| frontend | ||
| src-tauri | ||
| __init__.py | ||
| install_llama_prebuilt.py | ||
| install_python_stack.py | ||
| LICENSE.AGPL-3.0 | ||
| package-lock.json | ||
| package.json | ||
| setup.bat | ||
| setup.ps1 | ||
| setup.sh | ||
| Unsloth_Studio_Colab.ipynb | ||