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
feat(portal): add shell section navigation
rcourtman0fce84ad9669
diff --git a/docs/release-control/v6/internal/PULSE_ACCOUNT_PORTAL_SPEC.md b/docs/release-control/v6/internal/PULSE_ACCOUNT_PORTAL_SPEC.mdindex 4e3b88ada3..8b32e03c64 100644--- a/docs/release-control/v6/internal/PULSE_ACCOUNT_PORTAL_SPEC.md+++ b/docs/release-control/v6/internal/PULSE_ACCOUNT_PORTAL_SPEC.md@@ -146,6 +146,9 @@ Core rules:11. Team and membership management must be treated as an account-managementsurface with visible roster and invite context, not as a hidden table thatappears without orientation.+12. The signed-in shell must expose clear top-level section navigation so+ hosted operations, commercial account services, and support are legible as+ deliberate product areas rather than one long scrolling document.## Screen Modeldiff --git a/internal/cloudcp/portal/dist/build_manifest.json b/internal/cloudcp/portal/dist/build_manifest.jsonindex eb7ba35590..0aa26f17c2 100644--- a/internal/cloudcp/portal/dist/build_manifest.json+++ b/internal/cloudcp/portal/dist/build_manifest.json@@ -1,5 +1,5 @@{- "source_hash": "ffa91a3e86257e3723273ec4a2950841ad9a5d3ed8d67b74c591d825ed5e1103",+ "source_hash": "32f6b26c75224ffa7ad3ca4e9e444cb647655d9e0a9c9fd8b0a03ff38168cd63","build_inputs": ["package.json","tsconfig.json",diff --git a/internal/cloudcp/portal/dist/portal_app.css b/internal/cloudcp/portal/dist/portal_app.cssindex 09ad2b7acd..1768f9a2a6 100644--- a/internal/cloudcp/portal/dist/portal_app.css+++ b/internal/cloudcp/portal/dist/portal_app.css@@ -53,6 +53,56 @@ header .logout-btn:hover {margin: 32px auto;padding: 0 16px 48px;}+.portal-section-nav {+ display: grid;+ grid-template-columns: repeat(3, minmax(0, 1fr));+ gap: 12px;+ margin-bottom: 24px;+}+.portal-section-link {+ display: flex;+ flex-direction: column;+ gap: 4px;+ text-decoration: none;+ color: inherit;+ background: #fff;+ border: 1px solid #e2e8f0;+ border-radius: 12px;+ padding: 14px 16px;+ box-shadow: 0 1px 3px rgba(15, 23, 42, .04);+}+.portal-section-link:hover {+ border-color: #93c5fd;+ box-shadow: 0 8px 18px rgba(29, 78, 216, .08);+}+.portal-section-link-label {+ font-size: 13px;+ font-weight: 700;+ color: #0f172a;+}+.portal-section-link-copy {+ font-size: 13px;+ color: #64748b;+ line-height: 1.45;+}+.portal-top-section {+ margin-bottom: 36px;+}+.portal-top-section-header {+ margin-bottom: 16px;+}+.portal-top-section-header h2 {+ margin: 0 0 6px;+ font-size: 21px;+ font-weight: 700;+}+.portal-top-section-header p {+ margin: 0;+ font-size: 14px;+ color: #64748b;+ line-height: 1.55;+ max-width: 760px;+}.account-section {margin-bottom: 40px;}@@ -965,6 +1015,9 @@ header .logout-btn:hover {.overview-band {grid-template-columns: 1fr;}+ .portal-section-nav {+ grid-template-columns: 1fr;+ }}@media (max-width: 720px) {.account-header {diff --git a/internal/cloudcp/portal/dist/portal_app.js b/internal/cloudcp/portal/dist/portal_app.jsindex 1b2a8adba5..9d3354cbb7 100644--- a/internal/cloudcp/portal/dist/portal_app.js+++ b/internal/cloudcp/portal/dist/portal_app.js@@ -1572,6 +1572,12 @@var accountsLabel = accounts.length === 1 ? "1 account" : String(accounts.length) + " accounts";return '<section class="overview-band"><div class="overview-copy"><div class="overview-kicker">' + (hosted ? "Hosted access is active on this account." : "No hosted workspace access is attached to this account yet.") + "</div><h1>" + title + "</h1><p>" + summary + '</p></div><div class="overview-stats"><div class="overview-stat-card"><span class="overview-stat-label">Hosted access</span><span class="overview-stat-value ' + hostedStateClass + '">' + hostedStateLabel + '</span></div><div class="overview-stat-card"><span class="overview-stat-label">Accounts</span><span class="overview-stat-value">' + accountsLabel + '</span></div><div class="overview-stat-card"><span class="overview-stat-label">Workspaces</span><span class="overview-stat-value">' + String(workspaceTotal) + "</span></div></div></section>";}+ function renderShellNavigation(accounts, supportEmail) {+ var hosted = hasHostedAccounts(accounts);+ var hostedLabel = hosted ? "Hosted operations" : "Hosted access";+ var hostedCopy = hosted ? "Workspaces, teams, and hosted billing" : "No hosted workspaces are attached yet";+ return '<nav class="portal-section-nav" aria-label="Pulse Account sections"><a class="portal-section-link" href="#hosted-operations-section"><span class="portal-section-link-label">' + hostedLabel + '</span><span class="portal-section-link-copy">' + hostedCopy + '</span></a><a class="portal-section-link" href="#account-services-section"><span class="portal-section-link-label">Account services</span><span class="portal-section-link-copy">Licenses, billing, refunds, and privacy</span></a><a class="portal-section-link" href="mailto:' + escapeAttr(supportEmail || "") + '"><span class="portal-section-link-label">Support</span><span class="portal-section-link-copy">' + escapeHTML(supportEmail || "") + "</span></a></nav>";+ }function renderWorkspaceCard(account, workspace, accountAPIBasePath) {var state = String(workspace.state || "");var safeState = escapeHTML(state);@@ -1639,7 +1645,7 @@var accounts = Array.isArray(context.bootstrap.accounts) ? context.bootstrap.accounts : [];var serviceHeading = hasHostedAccounts(accounts) ? "Self-hosted licenses and billing" : "Account services";var serviceNote = hasHostedAccounts(accounts) ? "Hosted access lives above. The self-hosted commercial tools remain available here for licenses, billing, refunds, and privacy actions." : "Use these account tools for self-hosted licenses, billing, refunds, and privacy actions.";- return renderOverviewBand(context, accounts) + '<div id="accounts-root">' + renderAccountsHTML(context) + '</div><section class="service-section"><div class="service-header"><h2>' + serviceHeading + '</h2><div class="service-note">' + serviceNote + '</div></div><div class="service-grid"><button class="service-card service-card-button" type="button" id="open-manage-service" data-account-service-action="open-service-panel" data-account-service-panel="manage-service-panel" data-account-service-focus="manage-inline-email"><h3>Manage subscriptions</h3><p>Open Stripe billing access for existing self-hosted subscriptions without leaving the Pulse Account shell.</p></button><button class="service-card service-card-button" type="button" id="open-retrieve-service" data-account-service-action="open-service-panel" data-account-service-panel="retrieve-service-panel" data-account-service-focus="retrieve-inline-email"><h3>Retrieve licenses</h3><p>Recover the latest active self-hosted license and invoice link for a commercial email address.</p></button><button class="service-card service-card-button" type="button" id="open-refund-service" data-account-service-action="open-service-panel" data-account-service-panel="refund-service-panel" data-account-service-focus="refund-inline-email"><h3>Refund requests</h3><p>Request an immediate self-serve refund for eligible self-hosted purchases with explicit revocation confirmation.</p></button><button class="service-card service-card-button" type="button" id="open-data-service" data-account-service-action="open-service-panel" data-account-service-panel="data-service-panel" data-account-service-focus="data-export-email"><h3>Data and privacy</h3><p>Request commercial data export or deletion without leaving the account shell.</p></button></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></section>";+ return renderOverviewBand(context, accounts) + renderShellNavigation(accounts, context.bootstrap.support_email || "") + '<section class="portal-top-section" id="hosted-operations-section"><div class="portal-top-section-header"><h2>' + (hasHostedAccounts(accounts) ? "Hosted operations" : "Hosted access") + "</h2><p>" + (hasHostedAccounts(accounts) ? "Use this area for workspace access, fleet operations, hosted billing, and team management." : "This account does not currently have hosted workspace access. If that is unexpected, contact support while using the commercial tools below.") + '</p></div><div id="accounts-root">' + renderAccountsHTML(context) + '</div></section><section class="service-section" id="account-services-section"><div class="service-header"><h2>' + serviceHeading + '</h2><div class="service-note">' + serviceNote + '</div></div><div class="service-grid"><button class="service-card service-card-button" type="button" id="open-manage-service" data-account-service-action="open-service-panel" data-account-service-panel="manage-service-panel" data-account-service-focus="manage-inline-email"><h3>Manage subscriptions</h3><p>Open Stripe billing access for existing self-hosted subscriptions without leaving the Pulse Account shell.</p></button><button class="service-card service-card-button" type="button" id="open-retrieve-service" data-account-service-action="open-service-panel" data-account-service-panel="retrieve-service-panel" data-account-service-focus="retrieve-inline-email"><h3>Retrieve licenses</h3><p>Recover the latest active self-hosted license and invoice link for a commercial email address.</p></button><button class="service-card service-card-button" type="button" id="open-refund-service" data-account-service-action="open-service-panel" data-account-service-panel="refund-service-panel" data-account-service-focus="refund-inline-email"><h3>Refund requests</h3><p>Request an immediate self-serve refund for eligible self-hosted purchases with explicit revocation confirmation.</p></button><button class="service-card service-card-button" type="button" id="open-data-service" data-account-service-action="open-service-panel" data-account-service-panel="data-service-panel" data-account-service-focus="data-export-email"><h3>Data and privacy</h3><p>Request commercial data export or deletion without leaving the account shell.</p></button></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></section>";}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 48bc613d69..d23c1e0329 100644--- a/internal/cloudcp/portal/frontend/src/shell_view.test.ts+++ b/internal/cloudcp/portal/frontend/src/shell_view.test.ts@@ -126,6 +126,12 @@ describe('shell view', function() {expect(html).toContain('<h1>Pulse Account</h1>');expect(html).toContain('Hosted access is active on this account.');+ expect(html).toContain('portal-section-nav');+ expect(html).toContain('Hosted operations');+ expect(html).toContain('Account services');+ expect(html).toContain('Support');+ expect(html).toContain('id="hosted-operations-section"');+ expect(html).toContain('id="account-services-section"');expect(html).toContain('Self-hosted licenses and billing');expect(html).toContain('id="accounts-root"');expect(html).toContain('MSP account');@@ -171,6 +177,7 @@ describe('shell view', function() {expect(html).toContain('<h1>Self-hosted Pulse Account</h1>');expect(html).toContain('No hosted workspace access is attached to this account yet.');+ expect(html).toContain('This account does not currently have hosted workspace access.');expect(html).toContain('Account services');expect(html).not.toContain('Self-hosted licenses and billing');});diff --git a/internal/cloudcp/portal/frontend/src/shell_view.ts b/internal/cloudcp/portal/frontend/src/shell_view.tsindex 18726da019..be423c3670 100644--- a/internal/cloudcp/portal/frontend/src/shell_view.ts+++ b/internal/cloudcp/portal/frontend/src/shell_view.ts@@ -129,6 +129,31 @@ function renderOverviewBand(context: ShellViewContext, accounts: PortalAccountSu);}+function renderShellNavigation(accounts: PortalAccountSummary[], supportEmail: string): string {+ var hosted = hasHostedAccounts(accounts);+ var hostedLabel = hosted ? 'Hosted operations' : 'Hosted access';+ var hostedCopy = hosted+ ? 'Workspaces, teams, and hosted billing'+ : 'No hosted workspaces are attached yet';++ return (+ '<nav class="portal-section-nav" aria-label="Pulse Account sections">' ++ '<a class="portal-section-link" href="#hosted-operations-section">' ++ '<span class="portal-section-link-label">' + hostedLabel + '</span>' ++ '<span class="portal-section-link-copy">' + hostedCopy + '</span>' ++ '</a>' ++ '<a class="portal-section-link" href="#account-services-section">' ++ '<span class="portal-section-link-label">Account services</span>' ++ '<span class="portal-section-link-copy">Licenses, billing, refunds, and privacy</span>' ++ '</a>' ++ '<a class="portal-section-link" href="mailto:' + escapeAttr(supportEmail || '') + '">' ++ '<span class="portal-section-link-label">Support</span>' ++ '<span class="portal-section-link-copy">' + escapeHTML(supportEmail || '') + '</span>' ++ '</a>' ++ '</nav>'+ );+}+function renderWorkspaceCard(account: PortalAccountSummary, workspace: PortalWorkspaceSummary, accountAPIBasePath: string): string {var state = String(workspace.state || '');var safeState = escapeHTML(state);@@ -443,8 +468,17 @@ export function renderAuthenticatedPortalHTML(context: ShellViewContext): string: 'Use these account tools for self-hosted licenses, billing, refunds, and privacy actions.';return (renderOverviewBand(context, accounts) +- '<div id="accounts-root">' + renderAccountsHTML(context) + '</div>' +- '<section class="service-section">' ++ renderShellNavigation(accounts, context.bootstrap.support_email || '') ++ '<section class="portal-top-section" id="hosted-operations-section">' ++ '<div class="portal-top-section-header">' ++ '<h2>' + (hasHostedAccounts(accounts) ? 'Hosted operations' : 'Hosted access') + '</h2>' ++ '<p>' + (hasHostedAccounts(accounts)+ ? 'Use this area for workspace access, fleet operations, hosted billing, and team management.'+ : 'This account does not currently have hosted workspace access. If that is unexpected, contact support while using the commercial tools below.') + '</p>' ++ '</div>' ++ '<div id="accounts-root">' + renderAccountsHTML(context) + '</div>' ++ '</section>' ++ '<section class="service-section" id="account-services-section">' +'<div class="service-header">' +'<h2>' + serviceHeading + '</h2>' +'<div class="service-note">' + serviceNote + '</div>' +diff --git a/internal/cloudcp/portal/frontend/src/styles.css b/internal/cloudcp/portal/frontend/src/styles.cssindex 27ad4f434f..e0398652c4 100644--- a/internal/cloudcp/portal/frontend/src/styles.css+++ b/internal/cloudcp/portal/frontend/src/styles.css@@ -7,6 +7,15 @@header .logout-btn { background: none; border: 1px solid #475569; color: #94a3b8; border-radius: 6px; padding: 5px 12px; cursor: pointer; font-size: 13px; }header .logout-btn:hover { border-color: #94a3b8; color: #f8fafc; }.main { max-width: 980px; margin: 32px auto; padding: 0 16px 48px; }+ .portal-section-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }+ .portal-section-link { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(15,23,42,.04); }+ .portal-section-link:hover { border-color: #93c5fd; box-shadow: 0 8px 18px rgba(29,78,216,.08); }+ .portal-section-link-label { font-size: 13px; font-weight: 700; color: #0f172a; }+ .portal-section-link-copy { font-size: 13px; color: #64748b; line-height: 1.45; }+ .portal-top-section { margin-bottom: 36px; }+ .portal-top-section-header { margin-bottom: 16px; }+ .portal-top-section-header h2 { margin: 0 0 6px; font-size: 21px; font-weight: 700; }+ .portal-top-section-header p { margin: 0; font-size: 14px; color: #64748b; line-height: 1.55; max-width: 760px; }.account-section { margin-bottom: 40px; }.account-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }.account-header h2 { margin: 0; font-size: 22px; font-weight: 700; }@@ -167,6 +176,7 @@.toast.error { background: #991b1b; }@media (max-width: 900px) {.overview-band { grid-template-columns: 1fr; }+ .portal-section-nav { grid-template-columns: 1fr; }}@media (max-width: 720px) {.account-header { flex-direction: column; }