Show UDS login on shell.overlay so it is visible without an active session.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-08 03:39:58 +08:00
parent 8f569070a0
commit 705c6864ef

View file

@ -1,5 +1,5 @@
/** /**
* uds-auth browser half — conversation.session.header.utilities (left of log-download) + settings.section. * uds-auth browser half — shell.overlay (always visible, no session required) + settings.section.
* Auth: empNo cookie + token verified server-side via user-info. * Auth: empNo cookie + token verified server-side via user-info.
* Fallback: username/password when UAC/QR unavailable. * Fallback: username/password when UAC/QR unavailable.
*/ */
@ -19,7 +19,7 @@ window.__ModuleLoader__.load({
const PAGE_SIZE = 50 const PAGE_SIZE = 50
const CSS = [ const CSS = [
'.uds-auth-host{position:relative;display:inline-flex;align-items:center;height:32px;margin:0;flex-shrink:0;pointer-events:auto}', '.uds-auth-host{position:fixed;top:calc(8px + env(safe-area-inset-top,0px));right:12px;z-index:46;display:inline-flex;align-items:center;height:32px;margin:0;flex-shrink:0;pointer-events:auto}',
'.uds-auth-badge{display:inline-flex;align-items:center;justify-content:center;gap:4px;max-width:min(180px,30vw);min-width:auto;height:32px;padding:6px 12px;border-radius:18px;background:transparent;border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);font-size:13px;font-weight:400;line-height:20px;cursor:pointer;font-family:var(--dsw-font-family)}', '.uds-auth-badge{display:inline-flex;align-items:center;justify-content:center;gap:4px;max-width:min(180px,30vw);min-width:auto;height:32px;padding:6px 12px;border-radius:18px;background:transparent;border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);font-size:13px;font-weight:400;line-height:20px;cursor:pointer;font-family:var(--dsw-font-family)}',
'.uds-auth-badge:hover{background:var(--dsw-alias-interactive-bg-hover)}', '.uds-auth-badge:hover{background:var(--dsw-alias-interactive-bg-hover)}',
'.uds-auth-badge-unauth{color:var(--dsw-alias-label-tertiary,#8f959e)}', '.uds-auth-badge-unauth{color:var(--dsw-alias-label-tertiary,#8f959e)}',
@ -626,7 +626,7 @@ window.__ModuleLoader__.load({
return h('div', { return h('div', {
ref: rootRef, ref: rootRef,
className: 'uds-auth-host', className: 'uds-auth-host',
'data-uds-auth-host': 'header-utilities', 'data-uds-auth-host': 'shell-overlay',
}, },
open && anchor && h('section', { open && anchor && h('section', {
className: 'uds-auth-panel', className: 'uds-auth-panel',
@ -731,11 +731,11 @@ window.__ModuleLoader__.load({
return () => tag.remove() return () => tag.remove()
}, 'uds-auth: styles') }, 'uds-auth: styles')
// Same slot as @deepseek-ai/dsh-session-log-export (header.utilities); order -10 = left of it. // root-scoped: visible before any conversation/session exists (first deploy / empty home).
ctx.slots.inject('conversation.session.header.utilities', () => ctx.slots.register({ ctx.slots.inject('shell.overlay', () => ctx.slots.register({
name: 'conversation.session.header.utilities', name: 'shell.overlay',
id: 'uds-auth-login', id: 'uds-auth-login',
order: -10, order: 40,
label: 'UDS', label: 'UDS',
}, AuthBadge)) }, AuthBadge))