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): simplify account console overview
rcourtman8596d9de8a01
diff --git a/internal/cloudcp/portal/dist/build_manifest.json b/internal/cloudcp/portal/dist/build_manifest.jsonindex aab2dc64f2..2fa9f4fd34 100644--- a/internal/cloudcp/portal/dist/build_manifest.json+++ b/internal/cloudcp/portal/dist/build_manifest.json@@ -1,5 +1,5 @@{- "source_hash": "85ccadc015ace1a5ed37c100689292817f7c41de9b0d8547a6d26ca908c4d19f",+ "source_hash": "b4d41db9eab964bde794244e2c7d9d7e0aa77de1523520c2c448d1f08cfe969f","build_inputs": ["package.json","tsconfig.json",diff --git a/internal/cloudcp/portal/dist/portal_app.css b/internal/cloudcp/portal/dist/portal_app.cssindex a196e9fcef..b99d432e4d 100644--- a/internal/cloudcp/portal/dist/portal_app.css+++ b/internal/cloudcp/portal/dist/portal_app.css@@ -399,6 +399,46 @@ 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: end;+ padding: 16px 22px 18px;+ border-bottom: 1px solid var(--line);+ background: rgba(244, 247, 250, 0.92);+}+.portal-account-bar-copy {+ display: flex;+ flex-direction: column;+ gap: 6px;+}+.portal-account-bar-row {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 16px;+ flex-wrap: wrap;+}+.portal-account-bar-row h2 {+ margin: 0;+ font-size: 28px;+ line-height: 0.98;+ letter-spacing: -0.05em;+}+.portal-account-bar-copy p {+ margin: 0;+ font-size: 13px;+ line-height: 1.5;+ color: var(--ink-soft);+}+.portal-account-bar-chips,+.portal-account-bar-actions {+ display: flex;+ align-items: center;+ gap: 10px;+ flex-wrap: wrap;+}.portal-shell[data-shell-section=overview] .portal-content-panel-overview,.portal-shell[data-shell-section=services] .portal-content-panel-services,.portal-shell[data-shell-section=support] .portal-content-panel-support,@@ -470,29 +510,6 @@ header .logout-btn:hover,.account-surface + .account-surface {margin-top: 22px;}-.account-surface-header {- display: grid;- grid-template-columns: minmax(0, 1fr) auto;- align-items: end;- gap: 16px;- padding: 0 4px 12px;- border: none;- border-bottom: 1px solid var(--line);- border-radius: var(--radius-md);- background: transparent;- box-shadow: none;-}-.account-heading h2 {- margin: 2px 0 0;- font-size: 24px;- line-height: 1.02;- letter-spacing: -0.05em;-}-.account-summary {- margin-top: 5px;- font-size: 12px;- color: var(--ink-soft);-}.account-badges,.account-context-strip,.workspace-badges,@@ -536,7 +553,6 @@ header .logout-btn:hover,display: grid;grid-template-columns: 1fr;gap: 14px;- margin-top: 10px;}.account-content-panel {display: block;@@ -704,37 +720,12 @@ header .logout-btn:hover,.overview-side-card-primary {background: var(--panel-strong);}-.overview-quick-actions {- display: grid;- grid-template-columns: repeat(3, minmax(0, 1fr));+.overview-next-actions {+ display: flex;gap: 10px;+ flex-wrap: wrap;margin-top: 16px;}-.overview-quick-action {- display: flex;- flex-direction: column;- gap: 6px;- padding: 14px;- border: 1px solid var(--line);- border-radius: 10px;- background: #fff;- text-align: left;- cursor: pointer;-}-.overview-quick-action:hover {- border-color: var(--accent);- box-shadow: var(--shadow-sm);-}-.overview-quick-action-title {- font-size: 14px;- font-weight: 700;- color: var(--ink);-}-.overview-quick-action-copy {- font-size: 12px;- line-height: 1.5;- color: var(--ink-soft);-}.overview-alert-list {display: flex;flex-direction: column;@@ -1100,17 +1091,22 @@ header .logout-btn:hover,display: grid;grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.92fr);gap: 14px;+ align-items: start;}.team-side-column {display: flex;flex-direction: column;gap: 14px;+ align-self: start;}.team-roster,.team-invite-panel {background: #fff;border-color: var(--line);}+.team-roster {+ align-self: start;+}.team-policy-panel {padding: 16px;border: 1px solid var(--line);@@ -1695,9 +1691,6 @@ header .logout-btn:hover,.account-metric-strip {grid-template-columns: repeat(2, minmax(0, 1fr));}- .overview-quick-actions {- grid-template-columns: 1fr;- }.portal-shell-nav {position: static;}@@ -1712,6 +1705,13 @@ 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 {+ align-items: start;+ }.portal-shell-head-stats {flex-wrap: wrap;}@@ -1742,11 +1742,12 @@ header .logout-btn:hover,padding: 18px;}.portal-shell-head,+ .portal-account-bar,.portal-content-panel {padding-left: 16px;padding-right: 16px;}- .account-surface-header,+ .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 f03cc31613..ceb8c1d250 100644--- a/internal/cloudcp/portal/dist/portal_app.js+++ b/internal/cloudcp/portal/dist/portal_app.js@@ -1695,9 +1695,6 @@}).join("");return '<article class="service-action-row"><div class="service-action-main"><div class="service-action-tags"><span class="service-card-kicker">' + kicker + '</span><span class="service-action-tag">Self-hosted</span></div><div class="service-action-copy"><h3>' + title + "</h3><p>" + description + '</p></div><div class="service-action-highlights">' + highlightHTML + '</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">Open</button></div></article>';}- function renderOverviewQuickAction(section, title, copy) {- return '<button class="overview-quick-action" type="button" data-shell-action="activate-section" data-shell-section="' + section + '"><span class="overview-quick-action-title">' + title + '</span><span class="overview-quick-action-copy">' + copy + "</span></button>";- }function workspaceStatusCopy(workspace) {var status = workspaceHealthState(workspace);if (status === "healthy") return "Live updates and health checks are currently good.";@@ -1737,6 +1734,20 @@var summary = hosted ? "Hosted operations, operator access, and commercial account services." : "Billing, license recovery, refunds, and privacy actions until hosted access is attached.";return '<section class="portal-shell-head"><div class="portal-shell-head-main"><div class="portal-shell-head-kicker">Pulse Account</div><div class="portal-shell-head-row"><div class="portal-shell-head-copy"><div class="portal-shell-head-brand-row"><h1 class="portal-shell-head-title">' + (hosted ? "Operator console" : "Account console") + '</h1><span class="portal-shell-head-chip">' + (hosted ? "Operator ready" : "Self-hosted only") + "</span></div><p><strong>" + statusText + "</strong> " + summary + '</p></div><div class="portal-shell-head-stats"><div class="portal-shell-head-stat"><span class="portal-shell-head-stat-label">Hosted access</span><span class="portal-shell-head-stat-value">' + (hosted ? "Active" : "Not attached") + '</span></div><div class="portal-shell-head-stat"><span class="portal-shell-head-stat-label">Accounts</span><span class="portal-shell-head-stat-value">' + (accounts.length === 1 ? "1 account" : String(accounts.length) + " accounts") + '</span></div><div class="portal-shell-head-stat"><span class="portal-shell-head-stat-label">Workspace fleet</span><span class="portal-shell-head-stat-value">' + (workspaceTotal ? workspaceCountLabel(workspaceTotal) : "0 workspaces") + "</span></div></div></div></div></section>";}+ function renderPrimaryAccountBar(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="account-eyebrow">' + escapeHTML(accountKindLabel(account)) + '</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>";+ }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>";}@@ -1777,18 +1788,18 @@var activeCount = countWorkspacesByState(workspaces, "active");var postureTitle = unhealthyCount > 0 ? "Hosted posture needs review" : checkingCount > 0 ? "Hosted posture is still settling" : "Hosted posture is stable";var postureCopy = unhealthyCount > 0 ? "One or more workspaces still need attention before the hosted fleet is trustworthy." : checkingCount > 0 ? "The hosted fleet is mostly healthy, but some workspaces are still waiting on a completed health check." : "The hosted fleet is healthy and ready for routine operator work.";- var operationsCopy = account.kind === "msp" ? "Manage the client fleet from this account surface. Workspace creation, billing, and team actions belong here." : "Use this account surface to open hosted workspaces, manage billing, and control access for this hosted account.";- var actions = "";var addWorkspaceForm = "";+ var nextStepTitle = unhealthyCount > 0 ? "Start in Workspaces" : checkingCount > 0 ? "Review pending checks" : "Fleet is clear";+ 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." : "Hosted posture looks stable. Move into team or account services only if you need to change access or billing.";+ 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>";if (account.can_manage) {- actions = '<div class="account-action-strip"><div class="account-action-copy"><div class="account-panel-kicker">Account operations</div><p>' + escapeHTML(operationsCopy) + '</p></div><div class="account-actions">' + (account.kind === "msp" ? '<button type="button" class="btn-secondary" id="add-ws-btn-' + escapeAttr(account.id) + '" data-action="toggle-add-workspace" data-account-id="' + escapeAttr(account.id) + '" data-shell-target="workspaces">Add workspace</button>' : "") + (account.has_billing ? '<button type="button" class="btn-secondary" data-action="open-billing" data-account-id="' + escapeAttr(account.id) + '">Manage billing</button>' : "") + '<button type="button" class="btn-secondary" id="team-btn-' + escapeAttr(account.id) + '" data-action="toggle-team" data-account-id="' + escapeAttr(account.id) + '" data-shell-target="team">Manage team</button></div></div>';if (account.kind === "msp") {addWorkspaceForm = '<div class="add-workspace-form" id="add-ws-form-' + escapeAttr(account.id) + '"><label for="ws-name-' + escapeAttr(account.id) + '">Workspace name (for example, a client name)</label><input type="text" id="ws-name-' + escapeAttr(account.id) + '" placeholder="Acme Corp" maxlength="80" autocomplete="off"><div class="form-actions"><button type="button" class="btn-primary" data-action="create-workspace" data-account-id="' + escapeAttr(account.id) + '">Create workspace</button><button type="button" class="btn-secondary" data-action="toggle-add-workspace" data-account-id="' + escapeAttr(account.id) + '">Cancel</button><div class="spinner" id="ws-spinner-' + escapeAttr(account.id) + '" hidden></div></div></div>';}}return '<section class="account-content-panel account-content-panel-overview"><div class="account-command-deck"><div class="account-overview-card"><div class="account-overview-lead"><div class="account-panel-kicker">Hosted 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">Active workspaces</span><span class="account-stat-value">' + String(activeCount) + '</span></div><div class="account-stat-card account-stat-card-inline"><span class="account-stat-label">Healthy</span><span class="account-stat-value account-stat-healthy">' + String(healthyCount) + '</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></div>" + actions + addWorkspaceForm + '<div class="account-overview-secondary"><div class="overview-side-card overview-side-card-primary"><div class="account-panel-kicker">Operator overview</div><h4>Start from the next action, not the whole account</h4><p>Use the overview for posture, then move into workspaces, team, or account services depending on what needs attention.</p><div class="overview-quick-actions">' + renderOverviewQuickAction("workspaces", "Open workspaces", "Review the hosted fleet and move into a workspace") + renderOverviewQuickAction("team", "Review team access", "Check who can operate billing and hosted workspaces") + renderOverviewQuickAction("services", "Open account services", "Handle billing, licenses, refunds, and privacy actions") + "</div></div>" + renderAttentionPanel(workspaces) + "</div></div></section>";+ ) + '</div></div><div class="account-metric-strip"><div class="account-stat-card account-stat-card-inline"><span class="account-stat-label">Active workspaces</span><span class="account-stat-value">' + String(activeCount) + '</span></div><div class="account-stat-card account-stat-card-inline"><span class="account-stat-label">Healthy</span><span class="account-stat-value account-stat-healthy">' + String(healthyCount) + '</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></div>" + addWorkspaceForm + '<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>" + nextStepActions + "</div>" + renderAttentionPanel(workspaces) + "</div></div></section>";}function renderAccountWorkspaceSection(account, accountAPIBasePath) {var workspaces = Array.isArray(account.workspaces) ? account.workspaces : [];@@ -1832,10 +1843,9 @@var serviceHeading = hosted ? "Self-hosted licenses and billing" : "Account services";var serviceNote = hosted ? "Hosted operations live above. Use these commercial tools for self-hosted licenses, billing, refunds, and privacy actions." : "Use these account tools for self-hosted licenses, billing, refunds, and privacy actions.";var hostedContent = accounts.map(function(account) {- var workspaceLabel = workspaceCountLabel((account.workspaces || []).length);- return '<section class="account-surface"><div class="account-surface-header"><div class="account-heading"><div class="account-eyebrow">' + escapeHTML(accountKindLabel(account)) + "</div><h2>" + escapeHTML(account.name) + '</h2><div class="account-summary">' + escapeHTML(account.kind === "msp" ? "Operator workspace account" : "Hosted account operations") + '</div></div><div class="account-context-strip"><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><div class="account-surface-body">' + renderAccountOverviewSection(account) + renderAccountWorkspaceSection(account, context.accountAPIBasePath) + renderAccountTeamSection(account) + "</div></section>";+ 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">' + renderOverviewBand(accounts) + '<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-list-intro"><div class="account-panel-kicker">Commercial actions</div><p>Use these tools for self-hosted billing, license recovery, refunds, and privacy. Hosted workspace operations stay in Workspaces and Team.</p></div><div class="service-action-list">' + renderServiceActionRow("open-manage-service", "Billing", "Manage subscriptions", "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", "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", "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", "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">Select a service</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 the account-services area behaves like one operating desk instead of a list of disconnected tools.</p><div class="service-empty-columns"><div class="service-empty-column"><div class="service-empty-column-title">Start here</div><div class="service-empty-points"><div class="service-empty-point"><strong>Billing</strong><span>Open Stripe customer portal access after verification.</span></div><div class="service-empty-point"><strong>Licenses</strong><span>Recover the latest active self-hosted license and invoice link.</span></div><div class="service-empty-point"><strong>Refunds</strong><span>Confirm eligibility before revoking active commercial access.</span></div><div class="service-empty-point"><strong>Privacy</strong><span>Request export or deletion without leaving Pulse Account.</span></div></div></div><div class="service-empty-column"><div class="service-empty-column-title">What to expect</div><div class="service-empty-checklist"><div class="service-empty-check"><strong>Verification first</strong><span>Each flow confirms the commercial email before opening sensitive account actions.</span></div><div class="service-empty-check"><strong>One task at a time</strong><span>The active commercial request stays in this panel until you finish or switch tools.</span></div><div class="service-empty-check"><strong>Support stays close</strong><span>If billing, licenses, refunds, or privacy behave unexpectedly, escalate from this surface.</span></div></div></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 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 class="service-inline-support"><div class="account-panel-kicker">Support</div><p>Use support if a billing, refund, privacy, or license flow does not behave as expected for this account.</p><a class="portal-support-link" href="mailto:' + escapeAttr(context.bootstrap.support_email || "") + '">' + escapeHTML(context.bootstrap.support_email || "") + '</a></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">' + renderOverviewBand(accounts) + (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-list-intro"><div class="account-panel-kicker">Commercial actions</div><p>Use these tools for self-hosted billing, license recovery, refunds, and privacy. Hosted workspace operations stay in Workspaces and Team.</p></div><div class="service-action-list">' + renderServiceActionRow("open-manage-service", "Billing", "Manage subscriptions", "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", "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", "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", "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">Select a service</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 the account-services area behaves like one operating desk instead of a list of disconnected tools.</p><div class="service-empty-columns"><div class="service-empty-column"><div class="service-empty-column-title">Start here</div><div class="service-empty-points"><div class="service-empty-point"><strong>Billing</strong><span>Open Stripe customer portal access after verification.</span></div><div class="service-empty-point"><strong>Licenses</strong><span>Recover the latest active self-hosted license and invoice link.</span></div><div class="service-empty-point"><strong>Refunds</strong><span>Confirm eligibility before revoking active commercial access.</span></div><div class="service-empty-point"><strong>Privacy</strong><span>Request export or deletion without leaving Pulse Account.</span></div></div></div><div class="service-empty-column"><div class="service-empty-column-title">What to expect</div><div class="service-empty-checklist"><div class="service-empty-check"><strong>Verification first</strong><span>Each flow confirms the commercial email before opening sensitive account actions.</span></div><div class="service-empty-check"><strong>One task at a time</strong><span>The active commercial request stays in this panel until you finish or switch tools.</span></div><div class="service-empty-check"><strong>Support stays close</strong><span>If billing, licenses, refunds, or privacy behave unexpectedly, escalate from this surface.</span></div></div></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 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 class="service-inline-support"><div class="account-panel-kicker">Support</div><p>Use support if a billing, refund, privacy, or license flow does not behave as expected for this account.</p><a class="portal-support-link" href="mailto:' + escapeAttr(context.bootstrap.support_email || "") + '">' + escapeHTML(context.bootstrap.support_email || "") + '</a></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 2ffa30d7c9..68e68fe401 100644--- a/internal/cloudcp/portal/frontend/src/shell_view.test.ts+++ b/internal/cloudcp/portal/frontend/src/shell_view.test.ts@@ -135,15 +135,17 @@ 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('id="accounts-root"');expect(html).toContain('MSP account');expect(html).toContain('Acme MSP');expect(html).toContain('Operator workspace account');expect(html).toContain('3 workspaces');- expect(html).toContain('Account operations');- expect(html).toContain('Manage the client fleet from this account surface.');- expect(html).toContain('Operator overview');- expect(html).toContain('Start from the next action, not the whole account');+ expect(html).toContain('Add workspace');+ expect(html).toContain('Manage billing');+ expect(html).toContain('Manage team');+ expect(html).toContain('Next move');+ expect(html).toContain('Start in Workspaces');expect(html).toContain('Hosted posture needs review');expect(html).toContain('Use this console to run client workspaces, account billing, and operator access from one place.');expect(html).toContain('Open workspaces');diff --git a/internal/cloudcp/portal/frontend/src/shell_view.ts b/internal/cloudcp/portal/frontend/src/shell_view.tsindex 81836a8785..c1234441f7 100644--- a/internal/cloudcp/portal/frontend/src/shell_view.ts+++ b/internal/cloudcp/portal/frontend/src/shell_view.ts@@ -134,15 +134,6 @@ function renderServiceActionRow();}-function renderOverviewQuickAction(section: PortalShellSection, title: string, copy: string): string {- return (- '<button class="overview-quick-action" type="button" data-shell-action="activate-section" data-shell-section="' + section + '">' +- '<span class="overview-quick-action-title">' + title + '</span>' +- '<span class="overview-quick-action-copy">' + copy + '</span>' +- '</button>'- );-}-function workspaceStatusCopy(workspace: PortalWorkspaceSummary): string {var status = workspaceHealthState(workspace);if (status === 'healthy') return 'Live updates and health checks are currently good.';@@ -242,6 +233,48 @@ function renderOverviewBand(accounts: PortalAccountSummary[]): string {);}+function renderPrimaryAccountBar(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="account-eyebrow">' + escapeHTML(accountKindLabel(account)) + '</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>'+ );+}+function shellSectionButton(section: PortalShellSection, activeSection: PortalShellSection, title: string, copy: string): string {return ('<button class="portal-shell-nav-link' + (activeSection === section ? ' active' : '') + '" type="button" data-shell-action="activate-section" data-shell-section="' + section + '">' +@@ -350,40 +383,24 @@ function renderAccountOverviewSection(account: PortalAccountSummary): string {: checkingCount > 0? 'The hosted fleet is mostly healthy, but some workspaces are still waiting on a completed health check.': 'The hosted fleet is healthy and ready for routine operator work.';- var operationsCopy = account.kind === 'msp'- ? 'Manage the client fleet from this account surface. Workspace creation, billing, and team actions belong here.'- : 'Use this account surface to open hosted workspaces, manage billing, and control access for this hosted account.';-- var actions = '';var addWorkspaceForm = '';- if (account.can_manage) {- actions =- '<div class="account-action-strip">' +- '<div class="account-action-copy">' +- '<div class="account-panel-kicker">Account operations</div>' +- '<p>' + escapeHTML(operationsCopy) + '</p>' +- '</div>' +- '<div class="account-actions">' +- (account.kind === 'msp'- ? '<button type="button" class="btn-secondary" id="add-ws-btn-' +- escapeAttr(account.id) +- '" data-action="toggle-add-workspace" data-account-id="' +- escapeAttr(account.id) +- '" data-shell-target="workspaces">Add workspace</button>'- : '') +- (account.has_billing- ? '<button type="button" class="btn-secondary" data-action="open-billing" data-account-id="' +- escapeAttr(account.id) +- '">Manage billing</button>'- : '') +- '<button type="button" class="btn-secondary" id="team-btn-' +- escapeAttr(account.id) +- '" data-action="toggle-team" data-account-id="' +- escapeAttr(account.id) +- '" data-shell-target="team">Manage team</button>' +- '</div>' +- '</div>';+ var nextStepTitle = unhealthyCount > 0+ ? 'Start in Workspaces'+ : checkingCount > 0+ ? 'Review pending checks'+ : 'Fleet is clear';+ 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.'+ : 'Hosted posture looks stable. Move into team or account services only if you need to change access or billing.';+ 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>';+ if (account.can_manage) {if (account.kind === 'msp') {addWorkspaceForm ='<div class="add-workspace-form" id="add-ws-form-' +@@ -442,18 +459,13 @@ function renderAccountOverviewSection(account: PortalAccountSummary): string {'</div>' +'</div>' +'</div>' +- actions +addWorkspaceForm +'<div class="account-overview-secondary">' +'<div class="overview-side-card overview-side-card-primary">' +- '<div class="account-panel-kicker">Operator overview</div>' +- '<h4>Start from the next action, not the whole account</h4>' +- '<p>Use the overview for posture, then move into workspaces, team, or account services depending on what needs attention.</p>' +- '<div class="overview-quick-actions">' +- renderOverviewQuickAction('workspaces', 'Open workspaces', 'Review the hosted fleet and move into a workspace') +- renderOverviewQuickAction('team', 'Review team access', 'Check who can operate billing and hosted workspaces') +- renderOverviewQuickAction('services', 'Open account services', 'Handle billing, licenses, refunds, and privacy actions') +- '</div>' ++ '<div class="account-panel-kicker">Next move</div>' ++ '<h4>' + escapeHTML(nextStepTitle) + '</h4>' ++ '<p>' + escapeHTML(nextStepCopy) + '</p>' ++ nextStepActions +'</div>' +renderAttentionPanel(workspaces) +'</div>' +@@ -716,21 +728,8 @@ export function renderAuthenticatedPortalHTML(context: ShellViewContext): string? 'Hosted operations live above. Use these commercial tools for self-hosted licenses, billing, refunds, and privacy actions.': 'Use these account tools for self-hosted licenses, billing, refunds, and privacy actions.';var hostedContent = accounts.map(function(account) {- var workspaceLabel = workspaceCountLabel((account.workspaces || []).length);return ('<section class="account-surface">' +- '<div class="account-surface-header">' +- '<div class="account-heading">' +- '<div class="account-eyebrow">' + escapeHTML(accountKindLabel(account)) + '</div>' +- '<h2>' + escapeHTML(account.name) + '</h2>' +- '<div class="account-summary">' + escapeHTML(account.kind === 'msp' ? 'Operator workspace account' : 'Hosted account operations') + '</div>' +- '</div>' +- '<div class="account-context-strip">' +- '<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>' +'<div class="account-surface-body">' +renderAccountOverviewSection(account) +renderAccountWorkspaceSection(account, context.accountAPIBasePath) +@@ -746,6 +745,7 @@ export function renderAuthenticatedPortalHTML(context: ShellViewContext): stringrenderShellNavigation(accounts, context.bootstrap.support_email || '', activeSection) +'<div class="portal-shell-main">' +renderOverviewBand(accounts) ++ (accounts.length === 1 ? renderPrimaryAccountBar(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 a94cbf65b4..d550a39d04 100644--- a/internal/cloudcp/portal/frontend/src/styles.css+++ b/internal/cloudcp/portal/frontend/src/styles.css@@ -430,6 +430,52 @@ header .logout-btn:hover,display: none !important;}+.portal-account-bar {+ display: grid;+ grid-template-columns: minmax(0, 1fr) auto;+ gap: 18px;+ align-items: end;+ padding: 16px 22px 18px;+ border-bottom: 1px solid var(--line);+ background: rgba(244, 247, 250, 0.92);+}++.portal-account-bar-copy {+ display: flex;+ flex-direction: column;+ gap: 6px;+}++.portal-account-bar-row {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 16px;+ flex-wrap: wrap;+}++.portal-account-bar-row h2 {+ margin: 0;+ font-size: 28px;+ line-height: 0.98;+ letter-spacing: -0.05em;+}++.portal-account-bar-copy p {+ margin: 0;+ font-size: 13px;+ line-height: 1.5;+ color: var(--ink-soft);+}++.portal-account-bar-chips,+.portal-account-bar-actions {+ display: flex;+ align-items: center;+ gap: 10px;+ flex-wrap: wrap;+}+.portal-shell[data-shell-section="overview"] .portal-content-panel-overview,.portal-shell[data-shell-section="services"] .portal-content-panel-services,.portal-shell[data-shell-section="support"] .portal-content-panel-support,@@ -513,32 +559,6 @@ header .logout-btn:hover,margin-top: 22px;}-.account-surface-header {- display: grid;- grid-template-columns: minmax(0, 1fr) auto;- align-items: end;- gap: 16px;- padding: 0 4px 12px;- border: none;- border-bottom: 1px solid var(--line);- border-radius: var(--radius-md);- background: transparent;- box-shadow: none;-}--.account-heading h2 {- margin: 2px 0 0;- font-size: 24px;- line-height: 1.02;- letter-spacing: -0.05em;-}--.account-summary {- margin-top: 5px;- font-size: 12px;- color: var(--ink-soft);-}-.account-badges,.account-context-strip,.workspace-badges,@@ -588,7 +608,6 @@ header .logout-btn:hover,display: grid;grid-template-columns: 1fr;gap: 14px;- margin-top: 10px;}.account-content-panel {@@ -773,42 +792,13 @@ header .logout-btn:hover,background: var(--panel-strong);}-.overview-quick-actions {- display: grid;- grid-template-columns: repeat(3, minmax(0, 1fr));+.overview-next-actions {+ display: flex;gap: 10px;+ flex-wrap: wrap;margin-top: 16px;}-.overview-quick-action {- display: flex;- flex-direction: column;- gap: 6px;- padding: 14px;- border: 1px solid var(--line);- border-radius: 10px;- background: #fff;- text-align: left;- cursor: pointer;-}--.overview-quick-action:hover {- border-color: var(--accent);- box-shadow: var(--shadow-sm);-}--.overview-quick-action-title {- font-size: 14px;- font-weight: 700;- color: var(--ink);-}--.overview-quick-action-copy {- font-size: 12px;- line-height: 1.5;- color: var(--ink-soft);-}-.overview-alert-list {display: flex;flex-direction: column;@@ -1233,12 +1223,14 @@ header .logout-btn:hover,display: grid;grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.92fr);gap: 14px;+ align-items: start;}.team-side-column {display: flex;flex-direction: column;gap: 14px;+ align-self: start;}.team-roster,@@ -1247,6 +1239,10 @@ header .logout-btn:hover,border-color: var(--line);}+.team-roster {+ align-self: start;+}+.team-policy-panel {padding: 16px;border: 1px solid var(--line);@@ -1917,10 +1913,6 @@ header .logout-btn:hover,grid-template-columns: repeat(2, minmax(0, 1fr));}- .overview-quick-actions {- grid-template-columns: 1fr;- }-.portal-shell-nav {position: static;}@@ -1939,6 +1931,15 @@ header .logout-btn:hover,grid-template-columns: 1fr;}+ .portal-account-bar {+ grid-template-columns: 1fr;+ align-items: start;+ }++ .portal-account-bar-row {+ align-items: start;+ }+.portal-shell-head-stats {flex-wrap: wrap;}@@ -1976,12 +1977,13 @@ header .logout-btn:hover,}.portal-shell-head,+ .portal-account-bar,.portal-content-panel {padding-left: 16px;padding-right: 16px;}- .account-surface-header,+ .portal-account-bar-row,.workspace-management-header,.team-management-header,.service-header,