Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: stop "Go deeper" misattributing provider errors to missing documents (#2669)

[._.]/ Adam Eivya795dbd3917d
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index a1c638efa2..25f5647c1d 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -36,7 +36,8 @@
- **The Review Hub no longer files alerts for browser-extension errors.** Extensions (crypto wallets, password managers, ad blockers) inject scripts into the page, so anything they throw — "Failed to connect to MetaMask" and friends — used to surface as an actionable PortOS alert even though nothing in the app can fix it. Those errors are now identified by their provenance (the failing script lives at a `chrome-extension://` / `moz-extension://` / Safari-extension URL) and dropped both in the browser and on the server, with a narrow message check for wallet rejections that arrive with no stack at all. Any such alerts already sitting in your hub are dismissed once on upgrade, so you don't have to clear them by hand. This also stops extension noise from crowding out real errors: each end accepts at most one error per second, so an extension error used to silently swallow a genuine PortOS failure that happened a moment later.
- **Every toast crashed when PortOS was reached over plain HTTP.** Toast ids were minted with `crypto.randomUUID()`, which browsers only expose on secure origins — so over Tailscale on `http://`, any toast threw `crypto.randomUUID is not a function`, including the error toasts meant to tell you a request had failed. Ids now come from a shared `uuidv4()` helper that falls back to `crypto.getRandomValues` (available on insecure origins) and still yields a spec-valid v4. This is what produced the `crypto.randomUUID` alerts in the Review Hub — it was PortOS's own bug, not an extension, so it is deliberately still reported.
- [issue-2669] The LoRAs and Media Models screens no longer double-report a failure — the custom-catch callers now pass `{ silent: true }` so only their own message fires, not the shared `request()` helper's default toast too. Swept the LoRAs/media-models area: the Civitai suggestions refresh, LoRA delete, and the Civitai API-key save/clear now show a single toast, and the two list loads (LoRAs, Media Models) that already render a persistent inline error panel no longer also fire a toast saying the same thing. Threaded a backward-compatible `options` arg into the affected API wrappers (`listLorasFull`, `getCivitaiSuggestions`, `deleteLoraFull`, `setCivitaiAuth`, `clearCivitaiAuth`, `listCachedModels`).
-- [issue-2669] The Digital Twin screens no longer double-report a failure. A failed "Check for contradictions" on the Overview tab showed a toast *and* the same message inline in the results panel — it now reports once, inline. Resetting a Taste section that failed to reset no longer claims "Section reset" on top of the error toast; the success message is only shown when the reset actually succeeded.
+- [issue-2669] The Digital Twin screens no longer double-report a failure. A failed "Check for contradictions" on the Overview tab showed a toast *and* the same message inline in the results panel — it now reports once, inline. A failed Taste section reset no longer claims "Section reset" on top of the error. And "Go deeper" no longer blames incomplete identity documents when the real problem was an AI provider error — it now tells you the actual reason, and only suggests completing more documents when that is genuinely why it had nothing to ask.
+- Saving Digital Twin settings no longer leaves the Save button stuck on "Saving..." forever when the save fails — it re-enables so you can retry.
- [issue-2669] Sharing, Messages, and Calendar screens no longer show two stacked error toasts when a share/subscribe/export/save/sync action fails — the custom-catch callers now pass `{ silent: true }` so only their own toast fires, not the shared `request()` helper's default one too. Swept the Messages/calendar/sharing feature area (both ConfigTabs, InboxTab, ReviewTab, ShareToButton, and the Sharing page) and threaded a backward-compatible `options` arg into the affected API wrappers (`evaluateMessages`, `enableGmailApi`, `getGoogleAuthUrl`, `create/updateMessageAccount`, `create/updateCalendarAccount`, `updateSubcalendars`, `saveGoogleAuthCredentials`, `start/runGoogleAutoConfig`, `confirmDailyReviewEvent`).
- Creative Director projects that use the Antigravity provider no longer get stuck on "Planning." The agent now reliably receives its instructions instead of launching and sitting idle at an empty prompt (it waits for Antigravity's input box to be ready before sending, the same way the Claude provider does), so planning actually runs to completion.
- A Creative Director project no longer wedges in "Planning" when its agent is interrupted or crashes mid-run. The stuck run is now cleaned up as soon as the dead agent is detected, so the project can retry on its own instead of waiting for the next server restart.
diff --git a/client/src/components/digital-twin/tabs/OverviewTab.jsx b/client/src/components/digital-twin/tabs/OverviewTab.jsx
index d3da52ac3d..675e1cbc20 100644
--- a/client/src/components/digital-twin/tabs/OverviewTab.jsx
+++ b/client/src/components/digital-twin/tabs/OverviewTab.jsx
@@ -102,9 +102,13 @@ export default function OverviewTab({ status, settings, onRefresh }) {
const handleSaveSettings = async () => {
setSaving(true);
- await api.updateSoulSettings(settingsForm);
- toast.success('Settings updated');
+ // request() owns the failure toast, but the spinner must clear either way:
+ // an uncaught rejection here left `saving` true, stranding the button
+ // permanently disabled on "Saving..." with no way to retry.
+ const ok = await api.updateSoulSettings(settingsForm).then(() => true).catch(() => false);
setSaving(false);
+ if (!ok) return;
+ toast.success('Settings updated');
setShowSettings(false);
onRefresh();
};
diff --git a/client/src/components/digital-twin/tabs/TasteTab.jsx b/client/src/components/digital-twin/tabs/TasteTab.jsx
index ff142a6c93..11803acc10 100644
--- a/client/src/components/digital-twin/tabs/TasteTab.jsx
+++ b/client/src/components/digital-twin/tabs/TasteTab.jsx
@@ -161,11 +161,21 @@ export default function TasteTab({ onRefresh }) {
return;
}
setLoadingPersonalized(true);
+ // Sentinel: the endpoint 200s with a null body when it has nothing to ask
+ // (no identity context / no provider), but rejects on a real failure. Keep
+ // those apart — `undefined` means the request failed and request() already
+ // toasted the true reason, so the "try completing more identity documents"
+ // hint below would both double-toast and misattribute the cause.
const question = await api.getPersonalizedTasteQuestion(
activeSection,
selectedProvider.providerId,
selectedProvider.model
- ).catch(() => null);
+ ).catch(() => undefined);
+
+ if (question === undefined) {
+ setLoadingPersonalized(false);
+ return;
+ }
if (!question) {
toast('No personalized question available — try completing more identity documents', { icon: '⚠️' });