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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: report a Go deeper provider failure directly when ai:status can't (#2733)
[._.]/ Adam Eivy5315ca0f941e
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 4dc816a57d..c6ba36ffbb 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -39,7 +39,7 @@- **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. A failed Taste section reset no longer claims "Section reset" on top of the error. And when "Go deeper" fails outright, it now reports the actual reason instead of also claiming you need to complete more identity documents — that hint is now reserved for when it genuinely had nothing to ask.-- [issue-2733] **Taste "Go deeper" now tells the truth when the AI provider is the thing that failed.** A provider timeout, a rejected API key, or a model that answered with nothing came back looking exactly like "there's nothing to ask you" — so you were told to go complete more identity documents, while the real reason flashed past in a second toast. The two outcomes are now distinguished at the source: a provider failure reports once, naming the actual reason, and the identity-documents hint is finally reserved for a genuine lack of context (completing what [issue-2669] started, which could only separate outright request failures). A missing AI provider or an unsupported section now say so in their own words instead of borrowing that hint, and an empty answer from a provider is treated as the failure it is rather than being reported as a completed call.+- [issue-2733] **Taste "Go deeper" now tells the truth when the AI provider is the thing that failed.** A provider timeout, a rejected API key, or a model that answered with nothing came back looking exactly like "there's nothing to ask you" — so you were told to go complete more identity documents, while the real reason flashed past in a second toast. The two outcomes are now distinguished at the source: a provider failure reports once, naming the actual reason, and the identity-documents hint is finally reserved for a genuine lack of context (completing what [issue-2669] started, which could only separate outright request failures). A missing AI provider or an unsupported section now say so in their own words instead of borrowing that hint, and an empty answer from a provider is treated as the failure it is rather than being reported as a completed call. If the live status channel happens to be disconnected, the reason is reported directly instead of going quiet.- 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.diff --git a/client/src/components/digital-twin/tabs/TasteTab.jsx b/client/src/components/digital-twin/tabs/TasteTab.jsxindex ef6f3f8a9a..fe4060e1bd 100644--- a/client/src/components/digital-twin/tabs/TasteTab.jsx+++ b/client/src/components/digital-twin/tabs/TasteTab.jsx@@ -22,6 +22,7 @@ import {Palette,Minus} from 'lucide-react';import BrailleSpinner from '../../BrailleSpinner';import * as api from '../../../services/api';+import socket from '../../../services/socket';import toast from '../../ui/Toast';import Banner from '../../ui/Banner';import MarkdownOutput from '../../cos/MarkdownOutput';@@ -70,10 +71,16 @@ export const noQuestionToast = (reason) => NO_QUESTION_TOAST[reason] || NO_QUEST* error toast with the provider's real reason, so that toast is the single voice for it —* the server also marks it warning-severity so the global `error:notified` channel stays* quiet. Everything else — validation, 500, network drop — has no other reporter (the- * request is sent `{ silent: true }`), so this component is its single voice. Exactly one- * layer speaks either way (#2733, #2669).+ * request is sent `{ silent: true }`), so this component is its single voice.+ *+ * `statusChannelLive` is what keeps "someone else is reporting this" from collapsing into+ * "nobody is". `ai:status` is an unbuffered Socket.IO event: with the socket down, HTTP+ * still delivers the 502 but the toast never arrives, so deferring would fail the click+ * in total silence. Deferring only while the channel is live keeps exactly one layer+ * speaking in both states (#2733, #2669).*/-export const shouldReportGoDeeperError = (err) => err?.code !== 'AI_PROVIDER_ERROR';+export const shouldReportGoDeeperError = (err, statusChannelLive) =>+ err?.code !== 'AI_PROVIDER_ERROR' || !statusChannelLive;export default function TasteTab({ onRefresh }) {const [profile, setProfile] = useState(null);@@ -195,7 +202,9 @@ export default function TasteTab({ onRefresh }) {selectedProvider.model,{ silent: true }).catch((err) => {- if (shouldReportGoDeeperError(err)) {+ // Read `connected` at catch time: by now the server has emitted its ai:status+ // error, so a live socket means that toast is landing and this layer defers.+ if (shouldReportGoDeeperError(err, socket.connected)) {toast.error(err?.message || 'Failed to generate a personalized question');}return undefined;diff --git a/client/src/components/digital-twin/tabs/TasteTab.test.jsx b/client/src/components/digital-twin/tabs/TasteTab.test.jsxindex 4e3f0809de..cd96c8e32d 100644--- a/client/src/components/digital-twin/tabs/TasteTab.test.jsx+++ b/client/src/components/digital-twin/tabs/TasteTab.test.jsx@@ -24,15 +24,24 @@ describe('TasteTab "Go deeper" reporting', () => {});describe('shouldReportGoDeeperError', () => {- it('stays silent for a provider failure, which ai:status already toasts', () => {+ const LIVE = true;+ const DOWN = false;++ it('stays silent for a provider failure while ai:status is live to toast it', () => {// Reporting here too would restore the double toast #2669 removed.- expect(shouldReportGoDeeperError({ code: 'AI_PROVIDER_ERROR', message: 'Provider returned 401' })).toBe(false);+ expect(shouldReportGoDeeperError({ code: 'AI_PROVIDER_ERROR', message: 'Provider returned 401' }, LIVE)).toBe(false);+ });++ it('reports a provider failure when the status channel is down and cannot', () => {+ // ai:status is unbuffered — deferring to a socket that is not connected would+ // fail the click in total silence, the sentinel trap this guard exists to avoid.+ expect(shouldReportGoDeeperError({ code: 'AI_PROVIDER_ERROR', message: 'Provider returned 401' }, DOWN)).toBe(true);});it('reports every other failure, which has no other voice once the request is silenced', () => {- expect(shouldReportGoDeeperError({ code: 'VALIDATION_ERROR', message: 'bad section' })).toBe(true);- expect(shouldReportGoDeeperError({ message: 'Server unreachable' })).toBe(true);- expect(shouldReportGoDeeperError(undefined)).toBe(true);+ expect(shouldReportGoDeeperError({ code: 'VALIDATION_ERROR', message: 'bad section' }, LIVE)).toBe(true);+ expect(shouldReportGoDeeperError({ message: 'Server unreachable' }, LIVE)).toBe(true);+ expect(shouldReportGoDeeperError(undefined, LIVE)).toBe(true);});});});