Skip to content

Commit e3c47a1

Browse files
antfuclaude
andcommitted
feat: close tab and force float mode on auth revocation
- When auth is revoked, close the current tab and panel in embedded mode - Force dock mode to 'float' when unauthorized (regardless of settings) - Standalone mode also clears selected entry on revocation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8306ccc commit e3c47a1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

packages/core/src/client/webcomponents/components/dock/Dock.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,15 @@ function onPointerDown(e: PointerEvent) {
7070
const isRpcTrusted = ref(context.rpc.isTrusted)
7171
context.rpc.events.on('rpc:is-trusted:updated', (isTrusted) => {
7272
isRpcTrusted.value = isTrusted
73-
if (isTrusted && context.docks.selected?.id === BUILTIN_ENTRY_CLIENT_AUTH_NOTICE.id)
73+
if (isTrusted && context.docks.selected?.id === BUILTIN_ENTRY_CLIENT_AUTH_NOTICE.id) {
7474
context.docks.switchEntry(null)
75+
}
76+
else if (!isTrusted) {
77+
// On revocation: close current tab and force float mode
78+
context.docks.switchEntry(null)
79+
context.panel.store.open = false
80+
context.panel.store.mode = 'float'
81+
}
7582
})
7683
7784
const groupedEntries = computed(() => context.docks.groupedEntries)

packages/core/src/client/webcomponents/components/dock/DockStandalone.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ const persistedDoms = markRaw(new PersistedDomViewsManager(viewsContainer))
2020
const isRpcTrusted = ref(context.rpc.isTrusted)
2121
context.rpc.events.on('rpc:is-trusted:updated', (isTrusted) => {
2222
isRpcTrusted.value = isTrusted
23+
if (!isTrusted) {
24+
context.docks.switchEntry(null)
25+
}
2326
})
2427
2528
watch(

0 commit comments

Comments
 (0)