Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
style(portal): move section context into headers
rcourtman4c4684d4462f
diff --git a/internal/cloudcp/portal/dist/build_manifest.json b/internal/cloudcp/portal/dist/build_manifest.jsonindex 1e2febe0b1..e48a7ea310 100644--- a/internal/cloudcp/portal/dist/build_manifest.json+++ b/internal/cloudcp/portal/dist/build_manifest.json@@ -1,5 +1,5 @@{- "source_hash": "ab4a854ccc739eaaffbbfa650fe3ce3bbfcac6c02318be5e56c52f0733bc60ef",+ "source_hash": "5b47e0e6bc3d415732986d172946239c90f4770278b376eac60332e2e43e6e23","build_inputs": ["package.json","tsconfig.json",diff --git a/internal/cloudcp/portal/dist/portal_app.css b/internal/cloudcp/portal/dist/portal_app.cssindex 70a5944542..9d85a22894 100644--- a/internal/cloudcp/portal/dist/portal_app.css+++ b/internal/cloudcp/portal/dist/portal_app.css@@ -886,6 +886,27 @@ header .logout-btn:hover,justify-content: space-between;gap: 18px;}+.section-context-strip {+ display: flex;+ align-items: center;+ gap: 8px;+ flex-wrap: wrap;+ margin-top: 10px;+}+.section-context-chip {+ display: inline-flex;+ align-items: center;+ min-height: 24px;+ padding: 0 9px;+ border: 1px solid var(--line);+ border-radius: 999px;+ background: #fff;+ color: var(--ink-muted);+ font-size: 10px;+ font-weight: 800;+ letter-spacing: 0.08em;+ text-transform: uppercase;+}.account-stage-header-actions {display: flex;align-items: center;@@ -924,9 +945,9 @@ header .logout-btn:hover,.workspace-list-toolbar {display: flex;align-items: center;- justify-content: space-between;+ justify-content: flex-start;gap: 16px;- padding: 0 2px 10px;+ padding: 0 2px 8px;border-bottom: 1px solid var(--line);}.workspace-list-summary {@@ -935,31 +956,6 @@ header .logout-btn:hover,color: var(--ink-soft);max-width: 620px;}-.workspace-list-stats {- display: flex;- align-items: center;- gap: 10px;- flex-wrap: wrap;-}-.workspace-list-stat {- display: inline-flex;- align-items: center;- min-height: 24px;- padding: 0 9px;- border: 1px solid var(--line);- border-radius: 7px;- background: #fff;- color: var(--ink-muted);- font-size: 11px;- font-weight: 700;-}-.workspace-list-stat strong {- margin-right: 5px;- color: var(--ink);-}-.workspace-list-stat-attention strong {- color: var(--danger);-}.workspace-list-head {display: grid;grid-template-columns: minmax(0, 2.25fr) 116px 116px 154px;diff --git a/internal/cloudcp/portal/dist/portal_app.js b/internal/cloudcp/portal/dist/portal_app.jsindex 83e98e15ac..327c404b06 100644--- a/internal/cloudcp/portal/dist/portal_app.js+++ b/internal/cloudcp/portal/dist/portal_app.js@@ -1768,6 +1768,12 @@var meta = highlights.join(" \u2022 ");return '<article class="service-action-row"><div class="service-action-main"><div class="service-action-tags"><span class="service-card-kicker">' + kicker + '</span></div><div class="service-action-copy"><h3>' + title + "</h3><p>" + description + '</p></div><div class="service-action-meta">' + escapeHTML(meta) + '</div></div><div class="service-action-cta"><button class="btn-secondary service-action-button" type="button" id="' + id + '" data-account-service-action="open-service-panel" data-account-service-panel="' + panelID + '" data-account-service-focus="' + focusID + '" data-shell-target="services">' + escapeHTML(actionLabel) + "</button></div></article>";}+ function renderSectionContextChips(chips) {+ if (!chips.length) return "";+ return '<div class="section-context-strip">' + chips.map(function(chip) {+ return '<span class="section-context-chip">' + escapeHTML(chip) + "</span>";+ }).join("") + "</div>";+ }function workspaceStatusCopy(workspace) {var status = workspaceHealthState(workspace);var state = String(workspace.state || "");@@ -1868,15 +1874,17 @@var nextStepCopy = unhealthyCount > 0 ? "One or more workspaces need review before you treat the hosted fleet as trustworthy." : checkingCount > 0 ? "The fleet is mostly healthy, but there are still workspaces waiting on a completed health check." : suspendedCount > 0 ? "Active hosted workspaces look stable. Resume a suspended workspace only when you are ready to bring it back into the operator path." : "Hosted posture looks stable. Move into team or account services only if you need to change access or billing.";var nextStepChecklist = unhealthyCount > 0 ? '<div class="overview-next-checklist"><div class="overview-next-check"><strong>1. Review attention items</strong><span>Open the fleet and inspect any workspace marked as checking or needs attention.</span></div><div class="overview-next-check"><strong>2. Resolve operator blockers</strong><span>Use Team if the right people are not already attached to the hosted account.</span></div><div class="overview-next-check"><strong>3. Escalate billing separately</strong><span>Keep account billing or self-hosted license work out of the workspace review flow.</span></div></div>' : checkingCount > 0 ? '<div class="overview-next-checklist"><div class="overview-next-check"><strong>1. Verify pending checks</strong><span>Open the workspaces still settling and confirm they are safe to operate.</span></div><div class="overview-next-check"><strong>2. Keep access deliberate</strong><span>Change Team only if a pending workspace needs a different operator mix.</span></div><div class="overview-next-check"><strong>3. Keep commercial work separate</strong><span>Use account services or billing only when the hosted fleet is already understood.</span></div></div>' : '<div class="overview-next-checklist"><div class="overview-next-check"><strong>1. Open a workspace for the next operational task</strong><span>Move into Workspaces when you are ready to do hosted work.</span></div><div class="overview-next-check"><strong>2. Change access in Team only</strong><span>Keep roster changes explicit instead of mixing them into routine workspace work.</span></div><div class="overview-next-check"><strong>3. Keep billing and privacy separate</strong><span>Licenses, refunds, privacy, and self-hosted billing stay in their own section.</span></div></div>';var nextStepActions = '<div class="overview-next-actions"><button class="btn-primary btn-compact" type="button" data-shell-action="activate-section" data-shell-section="workspaces">Open workspaces</button><button class="btn-secondary btn-compact" type="button" data-shell-action="activate-section" data-shell-section="' + (account.can_manage ? "team" : "services") + '">' + (account.can_manage ? "Review team access" : "Open account services") + "</button></div>";- return '<section class="account-content-panel account-content-panel-overview"><div class="account-stage-header account-stage-header-overview"><div><div class="account-panel-kicker">Overview</div><h3>Hosted posture</h3><p>Review hosted posture first, then move into the next operator desk.</p></div></div><div class="account-command-deck"><div class="account-overview-card"><div class="account-overview-lead"><div class="account-panel-kicker">Fleet posture</div><h3>' + escapeHTML(postureTitle) + "</h3><p>" + escapeHTML(postureCopy) + '</p><div class="account-overview-callout">' + escapeHTML(+ return '<section class="account-content-panel account-content-panel-overview"><div class="account-stage-header account-stage-header-overview"><div><div class="account-panel-kicker">Overview</div><h3>Hosted posture</h3><p>Review hosted posture first, then move into the next operator desk.</p>' + renderSectionContextChips([+ String(totalCount) + " total",+ String(readyCount) + " ready",+ suspendedCount > 0 ? String(suspendedCount) + " suspended" : "Active fleet"+ ]) + '</div></div><div class="account-command-deck"><div class="account-overview-card"><div class="account-overview-lead"><div class="account-panel-kicker">Fleet posture</div><h3>' + escapeHTML(postureTitle) + "</h3><p>" + escapeHTML(postureCopy) + '</p><div class="account-overview-callout">' + escapeHTML(account.kind === "msp" ? "Use this console to run client workspaces, account billing, and operator access from one place." : "Use this console to run hosted workspaces, account billing, and operator access from one place.") + '</div></div><div class="account-metric-strip"><div class="account-stat-card account-stat-card-inline"><span class="account-stat-label">Total</span><span class="account-stat-value">' + String(totalCount) + '</span></div><div class="account-stat-card account-stat-card-inline"><span class="account-stat-label">Ready now</span><span class="account-stat-value account-stat-healthy">' + String(readyCount) + '</span></div><div class="account-stat-card account-stat-card-inline"><span class="account-stat-label">Checking</span><span class="account-stat-value account-stat-checking">' + String(checkingCount) + '</span></div><div class="account-stat-card account-stat-card-inline"><span class="account-stat-label">Needs attention</span><span class="account-stat-value account-stat-unhealthy">' + String(unhealthyCount) + '</span></div><div class="account-stat-card account-stat-card-inline"><span class="account-stat-label">Suspended</span><span class="account-stat-value">' + String(suspendedCount) + '</span></div></div></div><div class="account-overview-secondary"><div class="overview-side-card overview-side-card-primary"><div class="account-panel-kicker">Next move</div><h4>' + escapeHTML(nextStepTitle) + "</h4><p>" + escapeHTML(nextStepCopy) + "</p>" + nextStepChecklist + nextStepActions + "</div>" + renderAttentionPanel(workspaces) + "</div></div></section>";}function renderAccountWorkspaceSection(account, accountAPIBasePath) {var workspaces = Array.isArray(account.workspaces) ? account.workspaces : [];var readyCount = countReadyWorkspaces(workspaces);- var checkingCount = countWorkspacesByHealth(workspaces, "checking");- var unhealthyCount = countWorkspacesByHealth(workspaces, "unhealthy");var suspendedCount = countWorkspacesByState(workspaces, "suspended");var workspaceManagement = "";var addWorkspaceForm = "";@@ -1900,14 +1908,22 @@workspaceDeskActions += '<button type="button" class="btn-secondary btn-compact" data-action="toggle-team" data-account-id="' + escapeAttr(account.id) + '" data-shell-target="team">Manage team</button>';workspaceManagement = '<section class="workspace-management-panel" id="workspace-management-' + escapeAttr(account.id) + '"><div class="workspace-management-header"><div><div class="account-panel-kicker">Workspace management</div><h3>Lifecycle desk</h3><p>Inspect one workspace at a time and keep account-level actions separate.</p></div><button type="button" class="btn-secondary btn-compact" id="workspace-management-close-' + escapeAttr(account.id) + '" data-action="clear-workspace-selection" data-account-id="' + escapeAttr(account.id) + '">Close desk</button></div><div class="workspace-management-empty" id="workspace-management-empty-' + escapeAttr(account.id) + '"><div class="workspace-management-empty-copy">Choose a workspace for lifecycle review, or use the account desk for hosted billing, team, and create actions.</div><div class="workspace-management-empty-grid"><div class="workspace-management-empty-card"><div class="account-panel-kicker">Account actions</div><h4>Account desk</h4><p>Create workspaces, manage billing, and change team access here instead of mixing them into row actions.</p><div class="workspace-management-empty-actions">' + workspaceDeskActions + "</div>" + addWorkspaceForm + '</div><div class="workspace-management-empty-card workspace-management-empty-card-muted"><div class="account-panel-kicker">Before you act</div><div class="workspace-management-empty-checklist"><div class="workspace-management-empty-check"><strong>Inspect posture</strong><span>Open the workspace first and confirm whether it is routine work, review work, or a parked suspended system.</span></div><div class="workspace-management-empty-check"><strong>Confirm lifecycle</strong><span>Check active, checking, failed, or suspended state before you take the next step.</span></div><div class="workspace-management-empty-check"><strong>Stay deliberate</strong><span>Use the desk for one workspace at a time instead of mixing fleet and account actions together.</span></div></div></div></div></div><div class="workspace-management-content" id="workspace-management-content-' + escapeAttr(account.id) + '" hidden><div class="workspace-management-meta" id="workspace-management-meta-' + escapeAttr(account.id) + '"></div><h4 id="workspace-management-title-' + escapeAttr(account.id) + '"></h4><p class="workspace-management-summary" id="workspace-management-summary-' + escapeAttr(account.id) + '"></p><div class="workspace-management-facts"><div class="workspace-management-fact"><span>Health</span><strong id="workspace-management-health-' + escapeAttr(account.id) + '"></strong></div><div class="workspace-management-fact"><span>Lifecycle</span><strong id="workspace-management-lifecycle-' + escapeAttr(account.id) + '"></strong></div><div class="workspace-management-fact"><span>Created</span><strong id="workspace-management-created-' + escapeAttr(account.id) + '"></strong></div></div><div class="workspace-management-guidance" id="workspace-management-guidance-' + escapeAttr(account.id) + '"></div><div class="workspace-management-actions"><button type="button" class="btn-danger" id="workspace-management-action-' + escapeAttr(account.id) + '" data-action="workspace-action" data-account-id="' + escapeAttr(account.id) + '">Manage workspace</button></div></div></section>';}- var workspaceHTML = workspaces.length ? '<div class="workspace-list-wrap"><div class="workspace-list-toolbar"><div class="workspace-list-summary">Open a workspace for operator work. Use the lifecycle desk only when you are reviewing state or making account-level changes.</div><div class="workspace-list-stats"><span class="workspace-list-stat"><strong>' + String(workspaces.length) + '</strong> total</span><span class="workspace-list-stat"><strong>' + String(readyCount) + '</strong> ready</span><span class="workspace-list-stat"><strong>' + String(checkingCount) + '</strong> checking</span><span class="workspace-list-stat workspace-list-stat-attention"><strong>' + String(unhealthyCount) + '</strong> needs attention</span><span class="workspace-list-stat"><strong>' + String(suspendedCount) + '</strong> suspended</span></div></div><div class="workspace-list-head"><span>Workspace</span><span>Health</span><span>Lifecycle</span><span>Actions</span></div><div class="workspace-list">' + workspaces.map(function(workspace) {+ var workspaceHTML = workspaces.length ? '<div class="workspace-list-wrap"><div class="workspace-list-toolbar"><div class="workspace-list-summary">Open a workspace for operator work. Use the lifecycle desk only when you are reviewing state or making account-level changes.</div></div><div class="workspace-list-head"><span>Workspace</span><span>Health</span><span>Lifecycle</span><span>Actions</span></div><div class="workspace-list">' + workspaces.map(function(workspace) {return renderWorkspaceCard(account, workspace, accountAPIBasePath);}).join("") + "</div></div>" : '<div class="empty-state"><p>No hosted workspaces yet. Create one to get started.</p></div>';- return '<section class="account-content-panel account-content-panel-workspaces"><div class="account-stage-header"><div class="account-stage-header-row"><div><div class="account-panel-kicker">Workspace fleet</div><h3>Hosted fleet</h3><p>Open workspaces, review posture, and keep lifecycle actions explicit.</p></div><div class="account-stage-header-actions">' + workspaceHeaderActions + '</div></div></div><div class="workspace-operations-shell"><div class="workspace-operations-main">' + workspaceHTML + '</div><div class="workspace-operations-detail">' + workspaceManagement + "</div></div></section>";+ return '<section class="account-content-panel account-content-panel-workspaces"><div class="account-stage-header"><div class="account-stage-header-row"><div><div class="account-panel-kicker">Workspace fleet</div><h3>Hosted fleet</h3><p>Open workspaces, review posture, and keep lifecycle actions explicit.</p>' + renderSectionContextChips([+ String(workspaces.length) + " total",+ String(readyCount) + " ready",+ String(suspendedCount) + " suspended"+ ]) + '</div><div class="account-stage-header-actions">' + workspaceHeaderActions + '</div></div></div><div class="workspace-operations-shell"><div class="workspace-operations-main">' + workspaceHTML + '</div><div class="workspace-operations-detail">' + workspaceManagement + "</div></div></section>";}function renderAccountTeamSection(account) {var accessPolicy = '<div class="team-policy-panel"><div class="team-panel-heading"><h4>Access model</h4><p>Assign the smallest role that still lets someone do the work they own on this account.</p></div><div class="team-policy-list"><div class="team-policy-row"><strong>Owner</strong><span>Billing, team access, and full hosted control.</span></div><div class="team-policy-row"><strong>Admin</strong><span>Hosted operations plus billing for the account.</span></div><div class="team-policy-row"><strong>Tech</strong><span>Workspace operations without billing ownership.</span></div><div class="team-policy-row"><strong>Read-only</strong><span>State review and verification without control-plane changes.</span></div></div></div>';- return '<section class="account-content-panel account-content-panel-team"><section class="team-management-panel team-section team-section-shell" id="team-section-' + escapeAttr(account.id) + '" data-actor-role="' + escapeAttr(account.role) + '"><div class="team-management-header"><div><div class="account-panel-kicker">Team management</div><h3>Control who can operate this account</h3><p>Owners manage billing and access. Admins and techs keep the hosted fleet running day to day.</p></div><button type="button" class="btn-secondary btn-compact" data-shell-action="activate-section" data-shell-section="workspaces">Close team desk</button></div><div class="team-management-stats" id="team-stats-' + escapeAttr(account.id) + '"></div><div class="team-management-grid"><div class="team-roster-column"><div class="team-roster"><div class="team-panel-heading"><h4>People on this account</h4><p>Keep the roster small and role assignment explicit. The people listed here are the ones who can operate the hosted fleet.</p></div><div class="team-roster-list" id="team-list-' + escapeAttr(account.id) + '"><div class="team-list-message">Loading\u2026</div></div></div><div class="team-review-desk"><div class="team-panel-heading team-panel-heading-tight"><div class="account-panel-kicker">Review desk</div><h4>Keep access disciplined</h4><p>Use the roster as a controlled operator surface, not a dumping ground for vague shared access.</p></div><div class="team-review-grid"><div class="team-review-card"><strong>Owners stay rare</strong><span>Reserve Owner for billing, team, and full hosted control. Default to Admin, Tech, or Read-only first.</span></div><div class="team-review-card"><strong>Keep operators narrow</strong><span>Use Tech for workspace operations and Read-only for verification instead of handing out broader access.</span></div><div class="team-review-card"><strong>Remove stale access fast</strong><span>If someone no longer owns the work, remove them instead of leaving dormant access attached to the account.</span></div></div></div></div><div class="team-side-column"><div class="team-operations-panel"><div class="team-panel-heading team-panel-heading-tight"><div class="account-panel-kicker">Access desk</div><h4>Invite and role policy</h4><p>Keep the roster deliberate. Invite the smallest role first, then tighten access as responsibilities become clearer.</p></div><div class="team-operations-grid"><div class="team-invite-panel"><div class="team-panel-heading"><h4>Invite someone new</h4><p>Add another operator with the minimum role they need for this account.</p></div><div class="team-invite"><div><label for="invite-email-' + escapeAttr(account.id) + '">Email</label><input type="email" id="invite-email-' + escapeAttr(account.id) + '" placeholder="[email protected]" autocomplete="off"></div><div><label for="invite-role-' + escapeAttr(account.id) + '">Role</label><select id="invite-role-' + escapeAttr(account.id) + '"><option value="admin">Admin</option><option value="tech">Tech</option><option value="read_only">Read-only</option></select></div><button type="button" class="btn-primary btn-compact" data-action="invite-member" data-account-id="' + escapeAttr(account.id) + '">Invite</button></div></div>' + accessPolicy + "</div></div></div></div></section></section>";+ return '<section class="account-content-panel account-content-panel-team"><section class="team-management-panel team-section team-section-shell" id="team-section-' + escapeAttr(account.id) + '" data-actor-role="' + escapeAttr(account.role) + '"><div class="team-management-header"><div><div class="account-panel-kicker">Team management</div><h3>Control who can operate this account</h3><p>Owners manage billing and access. Admins and techs keep the hosted fleet running day to day.</p>' + renderSectionContextChips([+ account.can_manage ? "Managed roster" : "View only",+ "Least privilege",+ "Hosted access"+ ]) + '</div><button type="button" class="btn-secondary btn-compact" data-shell-action="activate-section" data-shell-section="workspaces">Close team desk</button></div><div class="team-management-stats" id="team-stats-' + escapeAttr(account.id) + '"></div><div class="team-management-grid"><div class="team-roster-column"><div class="team-roster"><div class="team-panel-heading"><h4>People on this account</h4><p>Keep the roster small and role assignment explicit. The people listed here are the ones who can operate the hosted fleet.</p></div><div class="team-roster-list" id="team-list-' + escapeAttr(account.id) + '"><div class="team-list-message">Loading\u2026</div></div></div><div class="team-review-desk"><div class="team-panel-heading team-panel-heading-tight"><div class="account-panel-kicker">Review desk</div><h4>Keep access disciplined</h4><p>Use the roster as a controlled operator surface, not a dumping ground for vague shared access.</p></div><div class="team-review-grid"><div class="team-review-card"><strong>Owners stay rare</strong><span>Reserve Owner for billing, team, and full hosted control. Default to Admin, Tech, or Read-only first.</span></div><div class="team-review-card"><strong>Keep operators narrow</strong><span>Use Tech for workspace operations and Read-only for verification instead of handing out broader access.</span></div><div class="team-review-card"><strong>Remove stale access fast</strong><span>If someone no longer owns the work, remove them instead of leaving dormant access attached to the account.</span></div></div></div></div><div class="team-side-column"><div class="team-operations-panel"><div class="team-panel-heading team-panel-heading-tight"><div class="account-panel-kicker">Access desk</div><h4>Invite and role policy</h4><p>Keep the roster deliberate. Invite the smallest role first, then tighten access as responsibilities become clearer.</p></div><div class="team-operations-grid"><div class="team-invite-panel"><div class="team-panel-heading"><h4>Invite someone new</h4><p>Add another operator with the minimum role they need for this account.</p></div><div class="team-invite"><div><label for="invite-email-' + escapeAttr(account.id) + '">Email</label><input type="email" id="invite-email-' + escapeAttr(account.id) + '" placeholder="[email protected]" autocomplete="off"></div><div><label for="invite-role-' + escapeAttr(account.id) + '">Role</label><select id="invite-role-' + escapeAttr(account.id) + '"><option value="admin">Admin</option><option value="tech">Tech</option><option value="read_only">Read-only</option></select></div><button type="button" class="btn-primary btn-compact" data-action="invite-member" data-account-id="' + escapeAttr(account.id) + '">Invite</button></div></div>' + accessPolicy + "</div></div></div></div></section></section>";}function renderSupportSection(context) {return '<section class="portal-support-panel"><div class="account-panel-kicker">Support</div><h2>Support and escalation</h2><p>Use support when hosted access looks wrong, billing does not behave as expected, or you need help with commercial licensing and privacy actions.</p><div class="portal-support-card-grid"><div class="portal-support-card"><h3>Account support</h3><p>For access, tenant handoff, team, and billing issues, contact the hosted operations desk.</p><a class="portal-support-link" href="mailto:' + escapeAttr(context.bootstrap.support_email || "") + '">' + escapeHTML(context.bootstrap.support_email || "") + '</a></div><div class="portal-support-card"><h3>Commercial services</h3><p>Self-hosted subscriptions, license recovery, refunds, and privacy requests all route through the same account surface.</p><button type="button" class="btn-secondary" data-shell-action="activate-section" data-shell-section="services">Open account services</button></div></div></section>';@@ -1927,7 +1943,10 @@var hostedContent = accounts.map(function(account) {return '<section class="account-surface"><div class="account-surface-body">' + renderAccountOverviewSection(account) + renderAccountWorkspaceSection(account, context.accountAPIBasePath) + renderAccountTeamSection(account) + "</div></section>";}).join("");- return '<div class="portal-shell" data-shell-section="' + activeSection + '"><div class="portal-shell-layout">' + renderShellNavigation(accounts, context.bootstrap.support_email || "", activeSection) + '<div class="portal-shell-main">' + (accounts.length === 1 ? renderAccountContextStrip(accounts[0]) : "") + '<section class="portal-content-panel portal-content-panel-overview"><div id="accounts-root">' + hostedContent + '</div></section><section class="portal-content-panel portal-content-panel-services service-section" id="account-services-section"><div class="service-header"><div><div class="account-panel-kicker">Account services</div><h2>' + serviceHeading + '</h2></div><div class="service-note">' + serviceNote + '</div></div><div class="service-shell"><aside class="service-shell-sidebar"><div class="service-shell-sidebar-head"><div class="account-panel-kicker">Service navigator</div><h3>Commercial desks</h3><p>Choose one billing, license, refund, or privacy request and keep it contained here.</p></div><div class="service-action-list">' + renderServiceActionRow("open-manage-service", "Billing", "Manage subscriptions", "Billing desk", "Open Stripe for self-hosted plan, invoice, and payment changes.", "manage-service-panel", "manage-inline-email", ["Plan changes", "Invoices"]) + renderServiceActionRow("open-retrieve-service", "Licenses", "Retrieve licenses", "License desk", "Recover the latest active self-hosted license and invoice link.", "retrieve-service-panel", "retrieve-inline-email", ["Latest active license", "Invoice lookup"]) + renderServiceActionRow("open-refund-service", "Refunds", "Refund requests", "Refund desk", "Request a self-serve refund when the purchase is still eligible.", "refund-service-panel", "refund-inline-email", ["Eligibility check", "Revocation"]) + renderServiceActionRow("open-data-service", "Privacy", "Data and privacy", "Privacy desk", "Request export or deletion for commercial account data.", "data-service-panel", "data-export-email", ["Export", "Deletion"]) + '</div></aside><div class="service-shell-main"><div class="service-detail-shell"><div class="service-panel service-panel-empty visible" id="service-panel-empty"><div class="account-panel-kicker">Active service desk</div><h3>Choose a commercial desk</h3><p>Open one commercial request from the navigator and keep it in this desk until it is finished.</p><div class="service-empty-command-grid"><div class="service-empty-command-card"><div class="service-empty-column-title">Request rules</div><div class="service-empty-points service-empty-points-stack"><div class="service-empty-point"><strong>Verify first</strong><span>Each desk confirms the commercial email before opening sensitive actions.</span></div><div class="service-empty-point"><strong>Stay focused</strong><span>Keep one commercial request in flight instead of bouncing between desks.</span></div></div></div><div class="service-empty-command-card service-empty-command-card-wide"><div class="service-empty-column-title">Desk coverage</div><div class="service-empty-flow-list"><div class="service-empty-flow"><strong>Billing desk</strong><span>Stripe customer portal access for invoices, payment methods, and plan changes.</span></div><div class="service-empty-flow"><strong>License desk</strong><span>Recover the latest active self-hosted license and the matching invoice link.</span></div><div class="service-empty-flow"><strong>Refund desk</strong><span>Check eligibility before revoking active commercial access.</span></div><div class="service-empty-flow"><strong>Privacy desk</strong><span>Request export or deletion without leaving Pulse Account.</span></div></div></div><div class="service-empty-command-card service-empty-command-card-support"><div class="service-empty-column-title">Escalation</div><div class="service-empty-checklist"><div class="service-empty-check"><strong>Escalate quickly</strong><span>If billing, license, refund, or privacy work does not behave as expected, escalate from this desk.</span></div></div><div class="service-empty-support">Need help with billing, refund, privacy, or license requests? <a class="portal-support-link" href="mailto:' + escapeAttr(context.bootstrap.support_email || "") + '">' + escapeHTML(context.bootstrap.support_email || "") + '</a></div></div></div></div><div class="service-panel" id="manage-service-panel"><div id="manage-service-root"></div></div><div class="service-panel" id="retrieve-service-panel"><div id="retrieve-service-root"></div></div><div class="service-panel" id="refund-service-panel"><div id="refund-service-root"></div></div><div class="service-panel" id="data-service-panel"><h3>Data and privacy</h3><p>Request export or deletion of the commercial data tied to an email address. Payment data held directly by Stripe still requires support handling.</p><div class="subsection"><div id="data-export-root"></div></div><div class="subsection"><div id="data-delete-root"></div></div><div class="helper-text">Payment-card data stays with Stripe. For Stripe deletion support, contact <a href="mailto:' + escapeAttr(context.bootstrap.support_email || "") + '">' + escapeHTML(context.bootstrap.support_email || "") + '</a>.</div></div></div></div></div></section><section class="portal-content-panel portal-content-panel-support">' + renderSupportSection(context) + "</section></div></div></div>";+ return '<div class="portal-shell" data-shell-section="' + activeSection + '"><div class="portal-shell-layout">' + renderShellNavigation(accounts, context.bootstrap.support_email || "", activeSection) + '<div class="portal-shell-main">' + (accounts.length === 1 ? renderAccountContextStrip(accounts[0]) : "") + '<section class="portal-content-panel portal-content-panel-overview"><div id="accounts-root">' + hostedContent + '</div></section><section class="portal-content-panel portal-content-panel-services service-section" id="account-services-section"><div class="service-header"><div><div class="account-panel-kicker">Account services</div><h2>' + serviceHeading + "</h2>" + renderSectionContextChips([+ hosted ? "Self-hosted only" : "Commercial",+ "4 desks"+ ]) + '</div><div class="service-note">' + serviceNote + '</div></div><div class="service-shell"><aside class="service-shell-sidebar"><div class="service-shell-sidebar-head"><div class="account-panel-kicker">Service navigator</div><h3>Commercial desks</h3><p>Choose one billing, license, refund, or privacy request and keep it contained here.</p></div><div class="service-action-list">' + renderServiceActionRow("open-manage-service", "Billing", "Manage subscriptions", "Billing desk", "Open Stripe for self-hosted plan, invoice, and payment changes.", "manage-service-panel", "manage-inline-email", ["Plan changes", "Invoices"]) + renderServiceActionRow("open-retrieve-service", "Licenses", "Retrieve licenses", "License desk", "Recover the latest active self-hosted license and invoice link.", "retrieve-service-panel", "retrieve-inline-email", ["Latest active license", "Invoice lookup"]) + renderServiceActionRow("open-refund-service", "Refunds", "Refund requests", "Refund desk", "Request a self-serve refund when the purchase is still eligible.", "refund-service-panel", "refund-inline-email", ["Eligibility check", "Revocation"]) + renderServiceActionRow("open-data-service", "Privacy", "Data and privacy", "Privacy desk", "Request export or deletion for commercial account data.", "data-service-panel", "data-export-email", ["Export", "Deletion"]) + '</div></aside><div class="service-shell-main"><div class="service-detail-shell"><div class="service-panel service-panel-empty visible" id="service-panel-empty"><div class="account-panel-kicker">Active service desk</div><h3>Choose a commercial desk</h3><p>Open one commercial request from the navigator and keep it in this desk until it is finished.</p><div class="service-empty-command-grid"><div class="service-empty-command-card"><div class="service-empty-column-title">Request rules</div><div class="service-empty-points service-empty-points-stack"><div class="service-empty-point"><strong>Verify first</strong><span>Each desk confirms the commercial email before opening sensitive actions.</span></div><div class="service-empty-point"><strong>Stay focused</strong><span>Keep one commercial request in flight instead of bouncing between desks.</span></div></div></div><div class="service-empty-command-card service-empty-command-card-wide"><div class="service-empty-column-title">Desk coverage</div><div class="service-empty-flow-list"><div class="service-empty-flow"><strong>Billing desk</strong><span>Stripe customer portal access for invoices, payment methods, and plan changes.</span></div><div class="service-empty-flow"><strong>License desk</strong><span>Recover the latest active self-hosted license and the matching invoice link.</span></div><div class="service-empty-flow"><strong>Refund desk</strong><span>Check eligibility before revoking active commercial access.</span></div><div class="service-empty-flow"><strong>Privacy desk</strong><span>Request export or deletion without leaving Pulse Account.</span></div></div></div><div class="service-empty-command-card service-empty-command-card-support"><div class="service-empty-column-title">Escalation</div><div class="service-empty-checklist"><div class="service-empty-check"><strong>Escalate quickly</strong><span>If billing, license, refund, or privacy work does not behave as expected, escalate from this desk.</span></div></div><div class="service-empty-support">Need help with billing, refund, privacy, or license requests? <a class="portal-support-link" href="mailto:' + escapeAttr(context.bootstrap.support_email || "") + '">' + escapeHTML(context.bootstrap.support_email || "") + '</a></div></div></div></div><div class="service-panel" id="manage-service-panel"><div id="manage-service-root"></div></div><div class="service-panel" id="retrieve-service-panel"><div id="retrieve-service-root"></div></div><div class="service-panel" id="refund-service-panel"><div id="refund-service-root"></div></div><div class="service-panel" id="data-service-panel"><h3>Data and privacy</h3><p>Request export or deletion of the commercial data tied to an email address. Payment data held directly by Stripe still requires support handling.</p><div class="subsection"><div id="data-export-root"></div></div><div class="subsection"><div id="data-delete-root"></div></div><div class="helper-text">Payment-card data stays with Stripe. For Stripe deletion support, contact <a href="mailto:' + escapeAttr(context.bootstrap.support_email || "") + '">' + escapeHTML(context.bootstrap.support_email || "") + '</a>.</div></div></div></div></div></section><section class="portal-content-panel portal-content-panel-support">' + renderSupportSection(context) + "</section></div></div></div>";}function renderSignedOutPortalHTML(context) {var statusHTML = "";diff --git a/internal/cloudcp/portal/frontend/src/shell_view.test.ts b/internal/cloudcp/portal/frontend/src/shell_view.test.tsindex 08f7b140d9..a14af88ee0 100644--- a/internal/cloudcp/portal/frontend/src/shell_view.test.ts+++ b/internal/cloudcp/portal/frontend/src/shell_view.test.ts@@ -148,6 +148,7 @@ describe('shell view', function() {expect(html).toContain('Manage team');expect(html).toContain('Hosted posture');expect(html).toContain('Review hosted posture first');+ expect(html).toContain('section-context-strip');expect(html).toContain('Next move');expect(html).toContain('Start in workspaces');expect(html).toContain('Needs review');@@ -158,6 +159,7 @@ describe('shell view', function() {expect(html).toContain('Needs review');expect(html).toContain('Workspace fleet');expect(html).toContain('account-stage-header-actions');+ expect(html).toContain('0 suspended');expect(html).toContain('Alpha Workspace');expect(html).toContain('Beta Workspace');expect(html).toContain('Gamma Workspace');@@ -185,6 +187,8 @@ describe('shell view', function() {expect(html.indexOf('id="add-ws-form-acct_1"')).toBeGreaterThan(html.indexOf('Keep account-wide actions separate'));expect(html).toContain('data-action="clear-workspace-selection"');expect(html).toContain('Team management');+ expect(html).toContain('Least privilege');+ expect(html).toContain('Hosted access');expect(html).toContain('Invite someone new');expect(html).toContain('Access model');expect(html).toContain('Review desk');@@ -198,6 +202,7 @@ describe('shell view', function() {expect(html).toContain('id="service-panel-empty"');expect(html).toContain('Choose a commercial desk');expect(html).toContain('Active service desk');+ expect(html).toContain('Self-hosted only');expect(html).toContain('Desk coverage');expect(html).toContain('Escalate quickly');expect(html).toContain('id="open-retrieve-service"');diff --git a/internal/cloudcp/portal/frontend/src/shell_view.ts b/internal/cloudcp/portal/frontend/src/shell_view.tsindex 2deaa3bcc4..30e39c17ae 100644--- a/internal/cloudcp/portal/frontend/src/shell_view.ts+++ b/internal/cloudcp/portal/frontend/src/shell_view.ts@@ -153,6 +153,13 @@ function renderServiceActionRow();}+function renderSectionContextChips(chips: string[]): string {+ if (!chips.length) return '';+ return '<div class="section-context-strip">' + chips.map(function(chip) {+ return '<span class="section-context-chip">' + escapeHTML(chip) + '</span>';+ }).join('') + '</div>';+}+function workspaceStatusCopy(workspace: PortalWorkspaceSummary): string {var status = workspaceHealthState(workspace);var state = String(workspace.state || '');@@ -430,6 +437,11 @@ function renderAccountOverviewSection(account: PortalAccountSummary): string {'<div class="account-panel-kicker">Overview</div>' +'<h3>Hosted posture</h3>' +'<p>Review hosted posture first, then move into the next operator desk.</p>' ++ renderSectionContextChips([+ String(totalCount) + ' total',+ String(readyCount) + ' ready',+ suspendedCount > 0 ? String(suspendedCount) + ' suspended' : 'Active fleet',+ ]) +'</div>' +'</div>' +'<div class="account-command-deck">' +@@ -484,8 +496,6 @@ function renderAccountOverviewSection(account: PortalAccountSummary): string {function renderAccountWorkspaceSection(account: PortalAccountSummary, accountAPIBasePath: string): string {var workspaces = Array.isArray(account.workspaces) ? account.workspaces : [];var readyCount = countReadyWorkspaces(workspaces);- var checkingCount = countWorkspacesByHealth(workspaces, 'checking');- var unhealthyCount = countWorkspacesByHealth(workspaces, 'unhealthy');var suspendedCount = countWorkspacesByState(workspaces, 'suspended');var workspaceManagement = '';var addWorkspaceForm = '';@@ -631,13 +641,6 @@ function renderAccountWorkspaceSection(account: PortalAccountSummary, accountAPI? '<div class="workspace-list-wrap">' +'<div class="workspace-list-toolbar">' +'<div class="workspace-list-summary">Open a workspace for operator work. Use the lifecycle desk only when you are reviewing state or making account-level changes.</div>' +- '<div class="workspace-list-stats">' +- '<span class="workspace-list-stat"><strong>' + String(workspaces.length) + '</strong> total</span>' +- '<span class="workspace-list-stat"><strong>' + String(readyCount) + '</strong> ready</span>' +- '<span class="workspace-list-stat"><strong>' + String(checkingCount) + '</strong> checking</span>' +- '<span class="workspace-list-stat workspace-list-stat-attention"><strong>' + String(unhealthyCount) + '</strong> needs attention</span>' +- '<span class="workspace-list-stat"><strong>' + String(suspendedCount) + '</strong> suspended</span>' +- '</div>' +'</div>' +'<div class="workspace-list-head">' +'<span>Workspace</span>' +@@ -659,6 +662,11 @@ function renderAccountWorkspaceSection(account: PortalAccountSummary, accountAPI'<div class="account-panel-kicker">Workspace fleet</div>' +'<h3>Hosted fleet</h3>' +'<p>Open workspaces, review posture, and keep lifecycle actions explicit.</p>' ++ renderSectionContextChips([+ String(workspaces.length) + ' total',+ String(readyCount) + ' ready',+ String(suspendedCount) + ' suspended',+ ]) +'</div>' +'<div class="account-stage-header-actions">' + workspaceHeaderActions + '</div>' +'</div>' +@@ -702,6 +710,11 @@ function renderAccountTeamSection(account: PortalAccountSummary): string {'<div class="account-panel-kicker">Team management</div>' +'<h3>Control who can operate this account</h3>' +'<p>Owners manage billing and access. Admins and techs keep the hosted fleet running day to day.</p>' ++ renderSectionContextChips([+ account.can_manage ? 'Managed roster' : 'View only',+ 'Least privilege',+ 'Hosted access',+ ]) +'</div>' +'<button type="button" class="btn-secondary btn-compact" data-shell-action="activate-section" data-shell-section="workspaces">Close team desk</button>' +'</div>' +@@ -870,6 +883,10 @@ export function renderAuthenticatedPortalHTML(context: ShellViewContext): string'<div>' +'<div class="account-panel-kicker">Account services</div>' +'<h2>' + serviceHeading + '</h2>' ++ renderSectionContextChips([+ hosted ? 'Self-hosted only' : 'Commercial',+ '4 desks',+ ]) +'</div>' +'<div class="service-note">' + serviceNote + '</div>' +'</div>' +diff --git a/internal/cloudcp/portal/frontend/src/styles.css b/internal/cloudcp/portal/frontend/src/styles.cssindex 137369d470..ef54532384 100644--- a/internal/cloudcp/portal/frontend/src/styles.css+++ b/internal/cloudcp/portal/frontend/src/styles.css@@ -997,6 +997,29 @@ header .logout-btn:hover,gap: 18px;}+.section-context-strip {+ display: flex;+ align-items: center;+ gap: 8px;+ flex-wrap: wrap;+ margin-top: 10px;+}++.section-context-chip {+ display: inline-flex;+ align-items: center;+ min-height: 24px;+ padding: 0 9px;+ border: 1px solid var(--line);+ border-radius: 999px;+ background: #fff;+ color: var(--ink-muted);+ font-size: 10px;+ font-weight: 800;+ letter-spacing: 0.08em;+ text-transform: uppercase;+}+.account-stage-header-actions {display: flex;align-items: center;@@ -1040,9 +1063,9 @@ header .logout-btn:hover,.workspace-list-toolbar {display: flex;align-items: center;- justify-content: space-between;+ justify-content: flex-start;gap: 16px;- padding: 0 2px 10px;+ padding: 0 2px 8px;border-bottom: 1px solid var(--line);}@@ -1053,35 +1076,6 @@ header .logout-btn:hover,max-width: 620px;}-.workspace-list-stats {- display: flex;- align-items: center;- gap: 10px;- flex-wrap: wrap;-}--.workspace-list-stat {- display: inline-flex;- align-items: center;- min-height: 24px;- padding: 0 9px;- border: 1px solid var(--line);- border-radius: 7px;- background: #fff;- color: var(--ink-muted);- font-size: 11px;- font-weight: 700;-}--.workspace-list-stat strong {- margin-right: 5px;- color: var(--ink);-}--.workspace-list-stat-attention strong {- color: var(--danger);-}-.workspace-list-head {display: grid;grid-template-columns: minmax(0, 2.25fr) 116px 116px 154px;