Rescue Tool for Open WebUI chats that get stuck on the "Loading..." spinner.
If you use OpenWebUI, you may have encountered a bug where a specific chat refuses to open, displaying an infinite "Loading..." animation (or worse, hard-crashing back to the home page).
This usually happens because the chat's internal data structure ("tree") has broken links โ often due to network interruptions, API errors, or third-party tools. This tool repairs the JSON structure so you can import your chat history back into OpenWebUI.
Full usage instructions are built directly into the tool, just click "Don't know how to use?" on the page.
- Fixes the "Loading" Loop: Reconnects detached messages to the main history.
- Restores Access: Updates the file pointers so the chat opens immediately.
- Non-Destructive: Keeps your entire history, including alternate generation branches.
- Prune Mode: Removes unused regenerated responses (alternate branches), keeping only the active conversation path.
This tool resolves currentId pointers that reference non-existent nodes, prunes childrenIds arrays of invalid/dangling IDs, and (in Deep Clean mode) rebuilds the tree along a single linear path from root to the most recently timestamped leaf.
-
Upstream Discussion: View Comment
-
Stack: Pure vanilla JS. No NPM, no frameworks, no build step.
-
Test it yourself: Import
tests/bad-test-1.jsoninto OpenWebUI to reproduce the crash, then run it through the tool and re-import to confirm the fix.
License: GPL-3.0-or-later
Copyright ยฉ 2025-2026 @fractuscontext

