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): streamline account shell header
rcourtman1cfe73044eb0
diff --git a/internal/cloudcp/portal/dist/build_manifest.json b/internal/cloudcp/portal/dist/build_manifest.jsonindex dadb1bb7f9..ff84953354 100644--- a/internal/cloudcp/portal/dist/build_manifest.json+++ b/internal/cloudcp/portal/dist/build_manifest.json@@ -1,5 +1,5 @@{- "source_hash": "517df302389970a34b00bd0f8b1a9b60432958a8efd5ce497d64524763740606",+ "source_hash": "996dadeb60c6431ff1727d055ab5f027bd17984b6567b32abb73fa3200117a70","build_inputs": ["package.json","tsconfig.json",diff --git a/internal/cloudcp/portal/dist/portal_app.css b/internal/cloudcp/portal/dist/portal_app.cssindex d1a4e9efcb..254ccf4992 100644--- a/internal/cloudcp/portal/dist/portal_app.css+++ b/internal/cloudcp/portal/dist/portal_app.css@@ -394,53 +394,47 @@ header .logout-btn:hover,.portal-shell-main > .portal-content-panel {display: none !important;}-.portal-account-bar {- display: grid;- grid-template-columns: minmax(0, 1fr) auto;- gap: 18px;- align-items: center;- padding: 16px 24px 14px;+.portal-account-context {+ padding: 14px 24px 12px;border-bottom: 1px solid var(--line);- background: rgba(255, 255, 255, 0.98);+ background: rgba(250, 252, 253, 0.98);}-.portal-account-bar-copy {+.portal-account-context-copy {display: flex;flex-direction: column;- gap: 8px;+ gap: 6px;}-.portal-account-bar-meta {+.portal-account-context-meta {display: flex;align-items: center;gap: 8px;flex-wrap: wrap;}-.portal-account-bar-separator,-.portal-account-bar-access {+.portal-account-context-separator,+.portal-account-context-access {font-size: 12px;font-weight: 700;color: var(--ink-muted);}-.portal-account-bar-row {+.portal-account-context-row {display: flex;align-items: center;- justify-content: space-between;- gap: 16px;+ gap: 14px;flex-wrap: wrap;}-.portal-account-bar-row h2 {+.portal-account-context-row h2 {margin: 0;- font-size: 32px;- line-height: 0.96;- letter-spacing: -0.06em;+ font-size: 30px;+ line-height: 0.98;+ letter-spacing: -0.05em;}-.portal-account-bar-copy p {+.portal-account-context-copy p {margin: 0;font-size: 13px;line-height: 1.5;color: var(--ink-soft);}-.portal-account-bar-chips,-.portal-account-bar-actions {+.portal-account-context-chips {display: flex;align-items: center;gap: 10px;@@ -897,6 +891,21 @@ header .logout-btn:hover,border-bottom: none;margin-bottom: 0;}+.account-stage-header-row {+ display: flex;+ align-items: flex-start;+ justify-content: space-between;+ gap: 18px;+}+.account-stage-header-actions {+ display: flex;+ align-items: center;+ gap: 10px;+ flex-wrap: wrap;+ justify-content: flex-end;+ flex: 0 0 auto;+ padding-top: 2px;+}.account-stage-header h3 {margin: 8px 0 0;font-size: 24px;@@ -2026,12 +2035,10 @@ header .logout-btn:hover,.portal-shell-head-row {grid-template-columns: 1fr;}- .portal-account-bar {- grid-template-columns: 1fr;- align-items: start;- }- .portal-account-bar-row {+ .portal-account-context-row,+ .account-stage-header-row {align-items: start;+ flex-direction: column;}.workspace-row {grid-template-columns: 1fr;@@ -2060,12 +2067,11 @@ header .logout-btn:hover,padding: 18px;}.portal-shell-head,- .portal-account-bar,+ .portal-account-context,.portal-content-panel {padding-left: 16px;padding-right: 16px;}- .portal-account-bar-row,.workspace-management-header,.team-management-header,.service-header,diff --git a/internal/cloudcp/portal/dist/portal_app.js b/internal/cloudcp/portal/dist/portal_app.jsindex e1725da590..ee078f146d 100644--- a/internal/cloudcp/portal/dist/portal_app.js+++ b/internal/cloudcp/portal/dist/portal_app.js@@ -1772,19 +1772,9 @@}).join("");return '<div class="overview-side-card"><div class="account-panel-kicker">Attention</div><h4>Needs review</h4><p>These workspaces should be checked before you treat the hosted fleet as fully healthy.</p><div class="overview-alert-list">' + items + "</div></div>";}- function renderPrimaryAccountBar(account) {+ function renderAccountContextStrip(account) {var workspaceLabel = workspaceCountLabel((account.workspaces || []).length);- var actionHTML = "";- if (account.kind === "msp" && account.can_manage) {- actionHTML += '<button type="button" class="btn-secondary btn-compact" data-action="toggle-add-workspace" data-account-id="' + escapeAttr(account.id) + '" data-shell-target="workspaces">Add workspace</button>';- }- if (account.has_billing && account.can_manage) {- actionHTML += '<button type="button" class="btn-secondary btn-compact" data-action="open-billing" data-account-id="' + escapeAttr(account.id) + '">Manage billing</button>';- }- if (account.can_manage) {- actionHTML += '<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>';- }- return '<section class="portal-account-bar"><div class="portal-account-bar-copy"><div class="portal-account-bar-meta"><span class="account-eyebrow">' + escapeHTML(accountKindLabel(account)) + '</span><span class="portal-account-bar-separator">/</span><span class="portal-account-bar-access">' + escapeHTML(titleCase(account.role)) + ' access</span></div><div class="portal-account-bar-row"><h2>' + escapeHTML(account.name) + '</h2><div class="portal-account-bar-chips"><span class="account-context-chip">' + escapeHTML(account.kind_label) + '</span><span class="account-context-chip">' + escapeHTML(titleCase(account.role)) + '</span><span class="account-context-chip">' + escapeHTML(workspaceLabel) + "</span></div></div><p>" + escapeHTML(account.kind === "msp" ? "Operator workspace account" : "Hosted account operations") + '</p></div><div class="portal-account-bar-actions">' + actionHTML + "</div></section>";+ return '<section class="portal-account-context"><div class="portal-account-context-copy"><div class="portal-account-context-meta"><span class="account-eyebrow">' + escapeHTML(accountKindLabel(account)) + '</span><span class="portal-account-context-separator">/</span><span class="portal-account-context-access">' + escapeHTML(titleCase(account.role)) + ' access</span></div><div class="portal-account-context-row"><h2>' + escapeHTML(account.name) + '</h2><div class="portal-account-context-chips"><span class="account-context-chip">' + escapeHTML(account.kind_label) + '</span><span class="account-context-chip">' + escapeHTML(titleCase(account.role)) + '</span><span class="account-context-chip">' + escapeHTML(workspaceLabel) + "</span></div></div><p>" + escapeHTML(account.kind === "msp" ? "Operator workspace account" : "Hosted account operations") + "</p></div></section>";}function shellSectionButton(section, activeSection, title, copy) {return '<button class="portal-shell-nav-link' + (activeSection === section ? " active" : "") + '" type="button" data-shell-action="activate-section" data-shell-section="' + section + '"><span class="portal-shell-nav-label">' + title + '</span><span class="portal-shell-nav-copy">' + copy + "</span></button>";@@ -1841,7 +1831,15 @@var unhealthyCount = countWorkspacesByHealth(workspaces, "unhealthy");var workspaceManagement = "";var addWorkspaceForm = "";+ var workspaceHeaderActions = "";if (account.can_manage) {+ if (account.kind === "msp") {+ workspaceHeaderActions += '<button type="button" class="btn-secondary btn-compact" data-action="toggle-add-workspace" data-account-id="' + escapeAttr(account.id) + '">Add workspace</button>';+ }+ if (account.has_billing) {+ workspaceHeaderActions += '<button type="button" class="btn-secondary btn-compact" data-action="open-billing" data-account-id="' + escapeAttr(account.id) + '">Manage billing</button>';+ }+ workspaceHeaderActions += '<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>';var workspaceDeskActions = "";if (account.kind === "msp") {workspaceDeskActions += '<button type="button" class="btn-secondary btn-compact" data-action="toggle-add-workspace" data-account-id="' + escapeAttr(account.id) + '">Add workspace</button>';@@ -1856,7 +1854,7 @@var workspaceHTML = workspaces.length ? '<div class="workspace-list-wrap"><div class="workspace-list-toolbar"><div class="workspace-list-summary">Review the hosted fleet, open a workspace, and keep lifecycle actions explicit.</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(healthyCount) + '</strong> healthy</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></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><div class="account-panel-kicker">Workspace fleet</div><h3>Hosted fleet</h3><p>Use the fleet view to open workspaces, watch health posture, and keep management actions explicit.</p></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>Use the fleet view to open workspaces, watch health posture, and keep management 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>";}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>';@@ -1880,7 +1878,7 @@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 ? renderPrimaryAccountBar(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">Commercial actions</div><h3>Billing, licenses, refunds, and privacy</h3><p>Keep self-hosted commercial work here. Hosted workspace operations stay in Workspaces and Team.</p></div><div class="service-action-list">' + renderServiceActionRow("open-manage-service", "Billing", "Manage subscriptions", "Open billing", "Open Stripe billing access for existing self-hosted subscriptions without leaving the Pulse Account shell.", "manage-service-panel", "manage-inline-email", ["Invoices and plan changes", "Subscription self-service"]) + renderServiceActionRow("open-retrieve-service", "Licenses", "Retrieve licenses", "Open license recovery", "Recover the latest active self-hosted license and invoice link for a commercial email address.", "retrieve-service-panel", "retrieve-inline-email", ["Latest active license", "Invoice lookup"]) + renderServiceActionRow("open-refund-service", "Refunds", "Refund requests", "Open refunds", "Request an immediate self-serve refund for eligible self-hosted purchases with explicit revocation confirmation.", "refund-service-panel", "refund-inline-email", ["Eligibility check", "Explicit revocation"]) + renderServiceActionRow("open-data-service", "Privacy", "Data and privacy", "Open privacy tools", "Request commercial data export or deletion without leaving the account shell.", "data-service-panel", "data-export-email", ["Export or deletion", "Support escalation path"]) + '</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">Task desk</div><h3>Choose the next commercial action</h3><p>Open a billing, license, refund, or privacy flow from the service navigator. The active request stays here so this area behaves like one commercial operating desk.</p><div class="service-empty-command-grid"><div class="service-empty-command-card"><div class="service-empty-column-title">Start here</div><div class="service-empty-points service-empty-points-stack"><div class="service-empty-point"><strong>Verify first</strong><span>Each flow confirms the commercial email before opening sensitive actions.</span></div><div class="service-empty-point"><strong>One task at a time</strong><span>Keep the active request in this desk until you finish or switch tools.</span></div></div></div><div class="service-empty-command-card service-empty-command-card-wide"><div class="service-empty-column-title">Available flows</div><div class="service-empty-flow-list"><div class="service-empty-flow"><strong>Billing</strong><span>Stripe customer portal access after verification.</span></div><div class="service-empty-flow"><strong>Licenses</strong><span>Recover the latest active self-hosted license and invoice link.</span></div><div class="service-empty-flow"><strong>Refunds</strong><span>Confirm eligibility before revoking active commercial access.</span></div><div class="service-empty-flow"><strong>Privacy</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">Support</div><div class="service-empty-checklist"><div class="service-empty-check"><strong>Escalate quickly</strong><span>If billing, licenses, refunds, or privacy behave unexpectedly, escalate from this surface.</span></div></div><div class="service-empty-support">Need help with billing, refund, privacy, or license actions? <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></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">Commercial actions</div><h3>Billing, licenses, refunds, and privacy</h3><p>Keep self-hosted commercial work here. Hosted workspace operations stay in Workspaces and Team.</p></div><div class="service-action-list">' + renderServiceActionRow("open-manage-service", "Billing", "Manage subscriptions", "Open billing", "Open Stripe billing access for existing self-hosted subscriptions without leaving the Pulse Account shell.", "manage-service-panel", "manage-inline-email", ["Invoices and plan changes", "Subscription self-service"]) + renderServiceActionRow("open-retrieve-service", "Licenses", "Retrieve licenses", "Open license recovery", "Recover the latest active self-hosted license and invoice link for a commercial email address.", "retrieve-service-panel", "retrieve-inline-email", ["Latest active license", "Invoice lookup"]) + renderServiceActionRow("open-refund-service", "Refunds", "Refund requests", "Open refunds", "Request an immediate self-serve refund for eligible self-hosted purchases with explicit revocation confirmation.", "refund-service-panel", "refund-inline-email", ["Eligibility check", "Explicit revocation"]) + renderServiceActionRow("open-data-service", "Privacy", "Data and privacy", "Open privacy tools", "Request commercial data export or deletion without leaving the account shell.", "data-service-panel", "data-export-email", ["Export or deletion", "Support escalation path"]) + '</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">Task desk</div><h3>Choose the next commercial action</h3><p>Open a billing, license, refund, or privacy flow from the service navigator. The active request stays here so this area behaves like one commercial operating desk.</p><div class="service-empty-command-grid"><div class="service-empty-command-card"><div class="service-empty-column-title">Start here</div><div class="service-empty-points service-empty-points-stack"><div class="service-empty-point"><strong>Verify first</strong><span>Each flow confirms the commercial email before opening sensitive actions.</span></div><div class="service-empty-point"><strong>One task at a time</strong><span>Keep the active request in this desk until you finish or switch tools.</span></div></div></div><div class="service-empty-command-card service-empty-command-card-wide"><div class="service-empty-column-title">Available flows</div><div class="service-empty-flow-list"><div class="service-empty-flow"><strong>Billing</strong><span>Stripe customer portal access after verification.</span></div><div class="service-empty-flow"><strong>Licenses</strong><span>Recover the latest active self-hosted license and invoice link.</span></div><div class="service-empty-flow"><strong>Refunds</strong><span>Confirm eligibility before revoking active commercial access.</span></div><div class="service-empty-flow"><strong>Privacy</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">Support</div><div class="service-empty-checklist"><div class="service-empty-check"><strong>Escalate quickly</strong><span>If billing, licenses, refunds, or privacy behave unexpectedly, escalate from this surface.</span></div></div><div class="service-empty-support">Need help with billing, refund, privacy, or license actions? <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 bb86d7f2c2..6424152481 100644--- a/internal/cloudcp/portal/frontend/src/shell_view.test.ts+++ b/internal/cloudcp/portal/frontend/src/shell_view.test.ts@@ -132,7 +132,7 @@ describe('shell view', function() {expect(html).toContain('Support');expect(html).toContain('id="account-services-section"');expect(html).toContain('Self-hosted licenses and billing');- expect(html).toContain('portal-account-bar');+ expect(html).toContain('portal-account-context');expect(html).toContain('Owner access');expect(html).toContain('id="accounts-root"');expect(html).toContain('MSP account');@@ -153,6 +153,7 @@ describe('shell view', function() {expect(html).toContain('Review team access');expect(html).toContain('Needs review');expect(html).toContain('Workspace fleet');+ expect(html).toContain('account-stage-header-actions');expect(html).toContain('Alpha Workspace');expect(html).toContain('Beta Workspace');expect(html).toContain('Gamma Workspace');diff --git a/internal/cloudcp/portal/frontend/src/shell_view.ts b/internal/cloudcp/portal/frontend/src/shell_view.tsindex d291956f03..77ac9da5ec 100644--- a/internal/cloudcp/portal/frontend/src/shell_view.ts+++ b/internal/cloudcp/portal/frontend/src/shell_view.ts@@ -199,40 +199,20 @@ function renderAttentionPanel(workspaces: PortalWorkspaceSummary[]): string {);}-function renderPrimaryAccountBar(account: PortalAccountSummary): string {+function renderAccountContextStrip(account: PortalAccountSummary): string {var workspaceLabel = workspaceCountLabel((account.workspaces || []).length);- var actionHTML = '';-- if (account.kind === 'msp' && account.can_manage) {- actionHTML +=- '<button type="button" class="btn-secondary btn-compact" data-action="toggle-add-workspace" data-account-id="' +- escapeAttr(account.id) +- '" data-shell-target="workspaces">Add workspace</button>';- }- if (account.has_billing && account.can_manage) {- actionHTML +=- '<button type="button" class="btn-secondary btn-compact" data-action="open-billing" data-account-id="' +- escapeAttr(account.id) +- '">Manage billing</button>';- }- if (account.can_manage) {- actionHTML +=- '<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>';- }return (- '<section class="portal-account-bar">' +- '<div class="portal-account-bar-copy">' +- '<div class="portal-account-bar-meta">' ++ '<section class="portal-account-context">' ++ '<div class="portal-account-context-copy">' ++ '<div class="portal-account-context-meta">' +'<span class="account-eyebrow">' + escapeHTML(accountKindLabel(account)) + '</span>' +- '<span class="portal-account-bar-separator">/</span>' +- '<span class="portal-account-bar-access">' + escapeHTML(titleCase(account.role)) + ' access</span>' ++ '<span class="portal-account-context-separator">/</span>' ++ '<span class="portal-account-context-access">' + escapeHTML(titleCase(account.role)) + ' access</span>' +'</div>' +- '<div class="portal-account-bar-row">' ++ '<div class="portal-account-context-row">' +'<h2>' + escapeHTML(account.name) + '</h2>' +- '<div class="portal-account-bar-chips">' ++ '<div class="portal-account-context-chips">' +'<span class="account-context-chip">' + escapeHTML(account.kind_label) + '</span>' +'<span class="account-context-chip">' + escapeHTML(titleCase(account.role)) + '</span>' +'<span class="account-context-chip">' + escapeHTML(workspaceLabel) + '</span>' +@@ -240,7 +220,6 @@ function renderPrimaryAccountBar(account: PortalAccountSummary): string {'</div>' +'<p>' + escapeHTML(account.kind === 'msp' ? 'Operator workspace account' : 'Hosted account operations') + '</p>' +'</div>' +- '<div class="portal-account-bar-actions">' + actionHTML + '</div>' +'</section>');}@@ -449,7 +428,25 @@ function renderAccountWorkspaceSection(account: PortalAccountSummary, accountAPIvar unhealthyCount = countWorkspacesByHealth(workspaces, 'unhealthy');var workspaceManagement = '';var addWorkspaceForm = '';+ var workspaceHeaderActions = '';if (account.can_manage) {+ if (account.kind === 'msp') {+ workspaceHeaderActions +=+ '<button type="button" class="btn-secondary btn-compact" data-action="toggle-add-workspace" data-account-id="' ++ escapeAttr(account.id) ++ '">Add workspace</button>';+ }+ if (account.has_billing) {+ workspaceHeaderActions +=+ '<button type="button" class="btn-secondary btn-compact" data-action="open-billing" data-account-id="' ++ escapeAttr(account.id) ++ '">Manage billing</button>';+ }+ workspaceHeaderActions +=+ '<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>';+var workspaceDeskActions = '';if (account.kind === 'msp') {workspaceDeskActions +=@@ -595,10 +592,13 @@ function renderAccountWorkspaceSection(account: PortalAccountSummary, accountAPIreturn ('<section class="account-content-panel account-content-panel-workspaces">' +'<div class="account-stage-header">' +- '<div>' +- '<div class="account-panel-kicker">Workspace fleet</div>' +- '<h3>Hosted fleet</h3>' +- '<p>Use the fleet view to open workspaces, watch health posture, and keep management actions explicit.</p>' ++ '<div class="account-stage-header-row">' ++ '<div>' ++ '<div class="account-panel-kicker">Workspace fleet</div>' ++ '<h3>Hosted fleet</h3>' ++ '<p>Use the fleet view to open workspaces, watch health posture, and keep management actions explicit.</p>' ++ '</div>' ++ '<div class="account-stage-header-actions">' + workspaceHeaderActions + '</div>' +'</div>' +'</div>' +'<div class="workspace-operations-shell">' +@@ -776,7 +776,7 @@ export function renderAuthenticatedPortalHTML(context: ShellViewContext): string'<div class="portal-shell-layout">' +renderShellNavigation(accounts, context.bootstrap.support_email || '', activeSection) +'<div class="portal-shell-main">' +- (accounts.length === 1 ? renderPrimaryAccountBar(accounts[0]) : '') ++ (accounts.length === 1 ? renderAccountContextStrip(accounts[0]) : '') +'<section class="portal-content-panel portal-content-panel-overview">' +'<div id="accounts-root">' + hostedContent + '</div>' +'</section>' +diff --git a/internal/cloudcp/portal/frontend/src/styles.css b/internal/cloudcp/portal/frontend/src/styles.cssindex c5d593afcd..2c56080d10 100644--- a/internal/cloudcp/portal/frontend/src/styles.css+++ b/internal/cloudcp/portal/frontend/src/styles.css@@ -414,60 +414,54 @@ header .logout-btn:hover,display: none !important;}-.portal-account-bar {- display: grid;- grid-template-columns: minmax(0, 1fr) auto;- gap: 18px;- align-items: center;- padding: 16px 24px 14px;+.portal-account-context {+ padding: 14px 24px 12px;border-bottom: 1px solid var(--line);- background: rgba(255, 255, 255, 0.98);+ background: rgba(250, 252, 253, 0.98);}-.portal-account-bar-copy {+.portal-account-context-copy {display: flex;flex-direction: column;- gap: 8px;+ gap: 6px;}-.portal-account-bar-meta {+.portal-account-context-meta {display: flex;align-items: center;gap: 8px;flex-wrap: wrap;}-.portal-account-bar-separator,-.portal-account-bar-access {+.portal-account-context-separator,+.portal-account-context-access {font-size: 12px;font-weight: 700;color: var(--ink-muted);}-.portal-account-bar-row {+.portal-account-context-row {display: flex;align-items: center;- justify-content: space-between;- gap: 16px;+ gap: 14px;flex-wrap: wrap;}-.portal-account-bar-row h2 {+.portal-account-context-row h2 {margin: 0;- font-size: 32px;- line-height: 0.96;- letter-spacing: -0.06em;+ font-size: 30px;+ line-height: 0.98;+ letter-spacing: -0.05em;}-.portal-account-bar-copy p {+.portal-account-context-copy p {margin: 0;font-size: 13px;line-height: 1.5;color: var(--ink-soft);}-.portal-account-bar-chips,-.portal-account-bar-actions {+.portal-account-context-chips {display: flex;align-items: center;gap: 10px;@@ -990,6 +984,23 @@ header .logout-btn:hover,margin-bottom: 0;}+.account-stage-header-row {+ display: flex;+ align-items: flex-start;+ justify-content: space-between;+ gap: 18px;+}++.account-stage-header-actions {+ display: flex;+ align-items: center;+ gap: 10px;+ flex-wrap: wrap;+ justify-content: flex-end;+ flex: 0 0 auto;+ padding-top: 2px;+}+.account-stage-header h3 {margin: 8px 0 0;font-size: 24px;@@ -2294,13 +2305,10 @@ header .logout-btn:hover,grid-template-columns: 1fr;}- .portal-account-bar {- grid-template-columns: 1fr;- align-items: start;- }-- .portal-account-bar-row {+ .portal-account-context-row,+ .account-stage-header-row {align-items: start;+ flex-direction: column;}.workspace-row {@@ -2336,13 +2344,12 @@ header .logout-btn:hover,}.portal-shell-head,- .portal-account-bar,+ .portal-account-context,.portal-content-panel {padding-left: 16px;padding-right: 16px;}- .portal-account-bar-row,.workspace-management-header,.team-management-header,.service-header,