From 7c23505d8cb7a11ced3d2c7318c324770b478c89 Mon Sep 17 00:00:00 2001 From: archipelago Date: Thu, 6 Aug 2026 18:25:51 -0400 Subject: [PATCH] fix(13-11): log per-scope permission denials instead of returning silently MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On-device, an empty films search looked like a broken fetch. The console said only "library: not permitted" — the content scopes returned null without a word, so an ungranted Media/File permission was indistinguishable from "this node genuinely has no films". That ambiguity cost real diagnosis time and sent me looking for a code fault that was not there. Each scope now names itself when denied. The permission was the whole cause; no content path was broken. Co-Authored-By: Claude Opus 5 (1M context) --- aiui/packages/app/src/composables/useArchy.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/aiui/packages/app/src/composables/useArchy.ts b/aiui/packages/app/src/composables/useArchy.ts index 22da47dd..647976b7 100644 --- a/aiui/packages/app/src/composables/useArchy.ts +++ b/aiui/packages/app/src/composables/useArchy.ts @@ -276,7 +276,19 @@ export function useArchy() { scopes.map((s) => archyBridge .requestArchyContent('all', s) - .then((res) => (res.permitted ? res : null)) + .then((res) => { + // Log the denial per scope. A silent null here is indistinguishable + // from "the node genuinely has no content", which is exactly the + // ambiguity that made an ungranted Media/File permission look like + // a broken films search on-device. + if (!res.permitted) { + console.warn( + `[AIUI Archy] content(${s}): not permitted — enable Media/File access in Archy Settings`, + ) + return null + } + return res + }) .catch((err) => { console.warn(`[AIUI Archy] content(${s}) failed:`, (err as Error)?.message ?? err) return null