diff --git a/web/public/cloud/app.js b/web/public/cloud/app.js index 15f32ded..6ce3b691 100644 --- a/web/public/cloud/app.js +++ b/web/public/cloud/app.js @@ -1,4 +1,4 @@ -import { initializeTaskCenter } from './task-center.js?v=2026102305'; +import { initializeTaskCenter } from './task-center.js?v=2026102306'; const pageModules = Object.freeze({ instances: '/cloud/instances.js', diff --git a/web/public/cloud/client.css b/web/public/cloud/client.css index 01cf3b41..5186ffc8 100644 --- a/web/public/cloud/client.css +++ b/web/public/cloud/client.css @@ -112,7 +112,8 @@ html.panel-task-open .panel-sidebar { transform: translate3d(0, calc(0px - var(- .panel-task-drawer.is-drawer-visible::backdrop, .panel-account-drawer.is-drawer-visible::backdrop { background: rgba(16,29,44,.46); } .panel-announcements-drawer, -.panel-task-drawer { position: fixed; inset: 0 0 0 auto; width: min(540px, 100%); max-width: 100%; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #fff; color: #25384e; box-shadow: -12px 0 48px rgba(19,42,65,.16); overflow: hidden; } +.panel-task-drawer { position: fixed; inset: 0 0 0 auto; z-index: 1200; isolation: isolate; width: min(540px, 100%); max-width: 100%; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #fff; color: #25384e; box-shadow: -12px 0 48px rgba(19,42,65,.16); overflow: hidden; } +.panel-task-drawer:not([open]) { display: none; } .panel-announcements-drawer[open], .panel-task-drawer[open] { display: flex; flex-direction: column; } .panel-task-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 22px 24px 18px; border-bottom: 1px solid #e5edf2; } diff --git a/web/resources/views/venix/cloud/page.tpl b/web/resources/views/venix/cloud/page.tpl index daf5aaa4..d2414abc 100644 --- a/web/resources/views/venix/cloud/page.tpl +++ b/web/resources/views/venix/cloud/page.tpl @@ -41,6 +41,9 @@ +{if empty($smarty.get.drawer)} +{include file='user/task_center_drawer.tpl'} +{/if} {if $cloud_page == 'detail'}{include file='cloud/console.tpl'}{/if}
diff --git a/web/resources/views/venix/layout_assets.tpl b/web/resources/views/venix/layout_assets.tpl index 3cfc8bad..ad6f700c 100644 --- a/web/resources/views/venix/layout_assets.tpl +++ b/web/resources/views/venix/layout_assets.tpl @@ -1,2 +1,2 @@ {* Shared Venix CSS/JS cache key. Increment whenever a shared browser asset changes. *} -{assign var=venix_asset_version value='2026102305' scope='global'} +{assign var=venix_asset_version value='2026102306' scope='global'} diff --git a/web/resources/views/venix/user/panel_topbar.tpl b/web/resources/views/venix/user/panel_topbar.tpl index 13e1396b..b9adc3c9 100644 --- a/web/resources/views/venix/user/panel_topbar.tpl +++ b/web/resources/views/venix/user/panel_topbar.tpl @@ -29,7 +29,6 @@ {if empty($smarty.get.drawer)} -{if $panel_cloud_mode}{include file='user/task_center_drawer.tpl'}{/if} {include file='user/announcement_drawer.tpl'} {include file='user/account_drawer.tpl'} {/if} diff --git a/web/tests/VirtualizationAssetsTest.php b/web/tests/VirtualizationAssetsTest.php index 0b29d47d..ab840b5a 100644 --- a/web/tests/VirtualizationAssetsTest.php +++ b/web/tests/VirtualizationAssetsTest.php @@ -87,6 +87,17 @@ $assert(str_contains($cloudShell, "file='user/panel_sidebar.tpl'") && str_contains($userLayout, "file='user/panel_sidebar.tpl'"), 'Cloud and account pages must share one sidebar partial'); $assert(str_contains($cloudShell, "file='user/panel_topbar.tpl'") && str_contains($userLayout, "file='user/panel_topbar.tpl'"), 'Cloud and account pages must share one topbar partial'); +$taskDrawerInclude = "{include file='user/task_center_drawer.tpl'}"; +$assert(!str_contains($sharedTopbar, $taskDrawerInclude) + && substr_count($cloudShell, $taskDrawerInclude) === 1 + && strpos($cloudShell, $taskDrawerInclude) > strpos($cloudShell, '\n'), + 'The task center drawer must be a body-level cloud shell sibling, never nested in the scrolling main area'); +$assert(preg_match('/\.panel-task-drawer:not\(\[open\]\)\s*\{[^}]*display:\s*none[^}]*\}/s', + $clientStyles) === 1, + 'The task center drawer must remain hidden without relying on browser dialog defaults'); +$assert(preg_match('/\.panel-task-drawer\s*\{(?=[^}]*isolation:\s*isolate)(?=[^}]*z-index:\s*[1-9][0-9]*)[^}]*\}/s', + $clientStyles) === 1, + 'The task center drawer fallback must own an isolated layer above the user page'); $assert(preg_match('/\.panel-topbar\s*\{(?=[^}]*position:\s*sticky)(?=[^}]*top:\s*0)(?=[^}]*z-index:\s*[1-9][0-9]*)[^}]*\}/s', $clientStyles) === 1, 'The shared user topbar must remain visible while the page content scrolls');