From 130112c5bfa1e3c36cb8fe4a90437978831083ad Mon Sep 17 00:00:00 2001 From: matevip Date: Thu, 23 Jul 2026 14:59:08 +0800 Subject: [PATCH] fix(ui): read the correct localStorage key for USER-scope always-approve --- mateclaw-ui/src/views/ChatConsole.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mateclaw-ui/src/views/ChatConsole.vue b/mateclaw-ui/src/views/ChatConsole.vue index 8f65684c..cd8081a6 100644 --- a/mateclaw-ui/src/views/ChatConsole.vue +++ b/mateclaw-ui/src/views/ChatConsole.vue @@ -2103,7 +2103,10 @@ async function handleApproveAlways( } else if (payload.scope === 'AGENT') { scopeId = String(currentAgent.value?.id ?? '') } else if (payload.scope === 'USER') { - const me = localStorage.getItem('mc-user-id') + // Login persists the id under 'userId' (see Login.vue); the old 'mc-user-id' + // key was never written, so USER-scope always-approve silently failed to + // resolve a scopeId and fell back to a one-shot /approve without a grant. + const me = localStorage.getItem('userId') if (me) scopeId = me } if (!scopeId) {