@@ -41,7 +41,11 @@ import {
4141import { isMobileNavLayout , shouldMergeChatChrome } from "./mobile-nav-layout.ts" ;
4242import type { NativeHistoryState } from "./native-web-chrome.ts" ;
4343import { isNativeWebChromeHost } from "./native-web-chrome.ts" ;
44- import { navigationSurfaceIsHidden , renderFloatingUpdateCard } from "./navigation-surface.ts" ;
44+ import {
45+ floatingSidebarAttentionVisible ,
46+ navigationSurfaceIsHidden ,
47+ renderFloatingUpdateCard ,
48+ } from "./navigation-surface.ts" ;
4549import { readGatewayOperatorAccess } from "./operator-access.ts" ;
4650import {
4751 NAV_WIDTH_MAX ,
@@ -53,13 +57,10 @@ import {
5357import { createUpdateProgressWatcher } from "./update-overlay-helpers.ts" ;
5458
5559const EMPTY_SESSION_HAS_DRAFT = ( ) => false ;
56- const SCOPE_UPGRADE_SURFACE_ELEMENT = {
57- tagName : "openclaw-device-scope-upgrade-banner" ,
58- label : t ( "connection.scopeUpgrade.status" ) ,
59- loadModule : ( ) =>
60- import ( "./device-scope-upgrade.runtime.ts" ) . catch (
61- ( ) => import ( "./device-scope-upgrade-retry.runtime.ts" ) ,
62- ) ,
60+ const SIDEBAR_ATTENTION_ELEMENT = {
61+ tagName : "openclaw-sidebar-attention" ,
62+ label : t ( "attention.issues" ) ,
63+ loadModule : ( ) => import ( "../components/sidebar-attention.ts" ) ,
6364} satisfies OptionalCustomElement ;
6465
6566export interface ShellViewHost {
@@ -275,25 +276,6 @@ export function renderApplicationShell(host: ShellViewHost) {
275276 routeId : activeRoute ,
276277 onboarding,
277278 } ) ;
278- const showScopeUpgradeStatus =
279- gatewayConnected &&
280- gatewaySnapshot . hello ?. auth ?. scopes !== undefined &&
281- ! operatorAccess . canAdmin ;
282- if ( showScopeUpgradeStatus ) {
283- host . lazyCustomElements . preload ( SCOPE_UPGRADE_SURFACE_ELEMENT , { reportError : true } ) ;
284- }
285- const scopeUpgradeSurface = showScopeUpgradeStatus
286- ? html `< openclaw-device-scope-upgrade-banner
287- .props =${ {
288- snapshot : gatewaySnapshot ,
289- mobile : mobileNavLayout ,
290- // Device-less clients may not reach a session pane, so the shell
291- // retains the manual-repair entry until the header can own it.
292- showTrigger :
293- ! sessionRoute || onboarding || gatewaySnapshot . client ?. scopeUpgradeReady !== true ,
294- } }
295- > </ openclaw-device-scope-upgrade-banner > `
296- : null ;
297279 // Drawer navigation always opens expanded; the tab's desktop collapse state
298280 // stays in memory for when the viewport returns to the desktop layout.
299281 // The settings sidebar has a fixed width, so the collapse state pauses too.
@@ -308,6 +290,17 @@ export function renderApplicationShell(host: ShellViewHost) {
308290 navDrawerOpen,
309291 mobileNavLayout,
310292 } ) ;
293+ if (
294+ floatingSidebarAttentionVisible ( {
295+ navigationSurfaceHidden,
296+ mobileNavLayout,
297+ onboarding,
298+ settingsTakeover,
299+ compact : mergedChatChrome ,
300+ } )
301+ ) {
302+ host . lazyCustomElements . preload ( SIDEBAR_ATTENTION_ELEMENT , { reportError : true } ) ;
303+ }
311304 const shellWidth = Math . max ( globalThis . innerWidth || 0 , NAV_WIDTH_MAX ) ;
312305 // A route query is navigation input, not an owner record. Let it override the
313306 // live selection only after the roster proves that agent exists.
@@ -493,9 +486,6 @@ export function renderApplicationShell(host: ShellViewHost) {
493486 .resourceBasePath =${ context . resourceBasePath }
494487 .environment =${ config . environment }
495488 .navDrawerOpen=${ navDrawerOpen }
496- .trailingActions=${ mobileNavLayout && ! onboarding && ! mergedChatChrome
497- ? scopeUpgradeSurface
498- : nothing }
499489 .onOpenPalette=${ ( ) => host . openPalette ( ) }
500490 .onToggleDrawer=${ ( trigger : HTMLElement ) => host . toggleNavigationSurface ( trigger ) }
501491 > </ openclaw-app-topbar >
@@ -563,7 +553,6 @@ export function renderApplicationShell(host: ShellViewHost) {
563553 </ div >
564554 `
565555 : nothing }
566- ${ ! mobileNavLayout || onboarding || mergedChatChrome ? scopeUpgradeSurface : nothing }
567556 < div class ="shell-nav " ?inert =${ navigationSurfaceHidden } >
568557 ${ mobileNavLayout
569558 ? html `< openclaw-modal-dialog
@@ -604,6 +593,7 @@ export function renderApplicationShell(host: ShellViewHost) {
604593 navigationSurfaceHidden,
605594 mobileNavLayout,
606595 onboarding,
596+ settingsTakeover,
607597 compact : mergedChatChrome ,
608598 updateAvailable : overlaySnapshot . updateAvailable ,
609599 updateSchedule : overlaySnapshot . updateSchedule ,
0 commit comments