Repository navigation
Studio: keep server chats visible when legacy IndexedDB stalls - #9446
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Deterministic UI evidence: stalled legacy IndexedDBRefs: merge base Two isolated exact-SHA Studio installs were built and photographed at the same 1366×768 viewport. In both browser contexts, the legacy IndexedDB After the same 3-second interval:
The merge base leaves Recents blank because it never starts the authoritative server read. The PR head reaches the server immediately, bounds the legacy wait, and renders Recovered server chat. Limitation: this is a deterministic browser-level pending-IDB fixture, not the reporter's byte-for-byte WebKitGTK profile. It directly exercises the real built sidebar and the stuck-open behavior the PR changes. |
…e check (unslothai#11763) * Pin the legacy store outcome in the failed-delete data settings check The failed-delete check asserted that the Clear chats confirmation closes when the backend refuses the clear. The app closes it only when the legacy IndexedDB clear succeeds: with both stores failed, clearStoredChats throws and the confirmation stays open, armed for a retry, by design since unslothai#7029. Which of the two happens is decided by the legacy store gate (unslothai#9446). Any legacy read slower than 1 s shuts it for the life of the page, after which a clear reports the legacy store as failed. Firefox on the Windows runner occasionally crosses that line, and the check then fails at line 216 with the confirmation still on screen. Seen on main at 288b1a3 and on unslothai#11730 and a87d180, with Chromium passing in the same job. The fixture now refuses legacy writes on request, so the check drives the outcome it asserts instead of inheriting whatever the gate did earlier: the clear settles, the confirmation is still open with its action and switch re-enabled, no chat is lost, and Cancel closes it with no further delete. It is pinned to the confirmation by its switch, not `.last`, which slides onto Settings once the confirmation goes. * Record the dialogs still mounted when the data settings check fails A Firefox run on the Windows runner failed in reset() with one hidden dialog left 5 s after closing Settings, and the only evidence was a blank screenshot. The report now lists every [role=dialog] still in the DOM with its data-state, display, opacity and running animations, so the next occurrence says whether an exit animation held the dialog or something else kept it mounted.
…e check (unslothai#11763) * Pin the legacy store outcome in the failed-delete data settings check The failed-delete check asserted that the Clear chats confirmation closes when the backend refuses the clear. The app closes it only when the legacy IndexedDB clear succeeds: with both stores failed, clearStoredChats throws and the confirmation stays open, armed for a retry, by design since unslothai#7029. Which of the two happens is decided by the legacy store gate (unslothai#9446). Any legacy read slower than 1 s shuts it for the life of the page, after which a clear reports the legacy store as failed. Firefox on the Windows runner occasionally crosses that line, and the check then fails at line 216 with the confirmation still on screen. Seen on main at 288b1a3 and on unslothai#11730 and a87d180, with Chromium passing in the same job. The fixture now refuses legacy writes on request, so the check drives the outcome it asserts instead of inheriting whatever the gate did earlier: the clear settles, the confirmation is still open with its action and switch re-enabled, no chat is lost, and Cancel closes it with no further delete. It is pinned to the confirmation by its switch, not `.last`, which slides onto Settings once the confirmation goes. * Record the dialogs still mounted when the data settings check fails A Firefox run on the Windows runner failed in reset() with one hidden dialog left 5 s after closing Settings, and the only evidence was a blank screenshot. The report now lists every [role=dialog] still in the DOM with its data-state, display, opacity and running animations, so the next occurrence says whether an exit animation held the dialog or something else kept it mounted.

Follow-up to #9113.
Problem
The complete Linux AppImage bundles WebKitGTK 2.50.4 but reuses Studio's existing WebView profile. A profile last written by WebKitGTK 2.52.3 can leave the legacy chat IndexedDB open permanently pending under the bundled runtime.
Current chats have lived in
studio.dbsince #5272, but Studio still consults IndexedDB for legacy migration and fallback. When that open stalls, the sidebar never displays the intact server-backed history.In the reproduced profile, the legacy database contained zero chat records. Moving it aside removed the stalled open and allowed the chats in
studio.dbto appear.Fix
Verification
studio.dbshowed its chats with a fresh profile.origin/maintimed out while the fix returned the server chat after the one-second bound.git diff --checkpassed.