From 8146f975501b5e6e1502d463ae745d1cc7128e6d Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Wed, 15 Apr 2026 17:12:50 -0400 Subject: [PATCH] fix(rnetwork): consolidate to single sub-tab menu, remove empty nav items - Reduce tabs to Members (default), Trust, CRM - Remove empty outputPaths (Connections, Groups placeholders) - Hide subnav when tabbar is present (avoid double menu) - CRM tab redirects to the CRM sub-app Co-Authored-By: Claude Opus 4.6 --- .../rnetwork/components/folk-graph-viewer.ts | 19 ------------------- modules/rnetwork/mod.ts | 13 ++++++------- server/shell.ts | 2 +- 3 files changed, 7 insertions(+), 27 deletions(-) diff --git a/modules/rnetwork/components/folk-graph-viewer.ts b/modules/rnetwork/components/folk-graph-viewer.ts index c4322f3b..965c4a0e 100644 --- a/modules/rnetwork/components/folk-graph-viewer.ts +++ b/modules/rnetwork/components/folk-graph-viewer.ts @@ -203,42 +203,23 @@ class FolkGraphViewer extends HTMLElement { private applyTab(tab: string) { const wasTrust = this.trustMode; - const wasLayers = this.layersMode; switch (tab) { case "members": this.filter = "all"; this.trustMode = false; - if (wasLayers) this.exitLayersMode(); - break; - case "people": - this.filter = "person"; - this.trustMode = false; - if (wasLayers) this.exitLayersMode(); - break; - case "companies": - this.filter = "company"; - this.trustMode = false; - if (wasLayers) this.exitLayersMode(); break; case "trust": this.filter = "all"; this.trustMode = true; - if (wasLayers) this.exitLayersMode(); if (this.layoutMode !== "rings") { this.layoutMode = "rings"; const ringsBtn = this.shadow.getElementById("rings-toggle"); if (ringsBtn) ringsBtn.classList.add("active"); } break; - case "layers": - this.filter = "all"; - this.trustMode = false; - if (!wasLayers) this.enterLayersMode(); - break; } this.updateAuthorityBar(); - // Trust mode change needs full data reload if (this.trustMode !== wasTrust) { this.loadData(); } else { diff --git a/modules/rnetwork/mod.ts b/modules/rnetwork/mod.ts index 8731fedd..e381d9d5 100644 --- a/modules/rnetwork/mod.ts +++ b/modules/rnetwork/mod.ts @@ -695,10 +695,8 @@ routes.get("/api/opportunities", async (c) => { // ── Graph tabs (main view) ── const GRAPH_TABS = [ { id: "members", label: "Members" }, - { id: "people", label: "People" }, - { id: "companies", label: "Companies" }, { id: "trust", label: "Trust" }, - { id: "layers", label: "Layers" }, + { id: "crm", label: "CRM" }, ] as const; const GRAPH_TAB_IDS = new Set(GRAPH_TABS.map(t => t.id)); @@ -767,6 +765,11 @@ routes.get("/:tabId", (c, next) => { const tabId = c.req.param("tabId"); // Only handle graph tab IDs here; let other routes (crm, api, etc.) pass through if (!GRAPH_TAB_IDS.has(tabId as any)) return next(); + // "crm" tab redirects to the CRM sub-app + if (tabId === "crm") { + const space = c.req.param("space") || "demo"; + return c.redirect(c.get("isSubdomain") ? `/rnetwork/crm/pipeline` : `/${space}/rnetwork/crm/pipeline`, 302); + } const space = c.req.param("space") || "demo"; return c.html(renderGraph(space, tabId, c.get("isSubdomain"))); }); @@ -836,10 +839,6 @@ export const networkModule: RSpaceModule = { }, ], acceptsFeeds: ["data", "trust", "governance"], - outputPaths: [ - { path: "connections", name: "Connections", icon: "🤝", description: "Community member connections" }, - { path: "groups", name: "Groups", icon: "👥", description: "Relationship groups and circles" }, - ], subPageInfos: [ { path: "crm", diff --git a/server/shell.ts b/server/shell.ts index b61075d3..ac28b36d 100644 --- a/server/shell.ts +++ b/server/shell.ts @@ -353,7 +353,7 @@ export function renderShell(opts: ShellOptions): string { ${moduleId !== "rspace" ? `` : ''}
- ${renderModuleSubNav(moduleId, spaceSlug, visibleModules, opts.isSubdomain ?? IS_PRODUCTION)} + ${opts.tabs ? '' : renderModuleSubNav(moduleId, spaceSlug, visibleModules, opts.isSubdomain ?? IS_PRODUCTION)} ${opts.tabs ? renderTabBar(opts.tabs, opts.activeTab, opts.tabBasePath || ((opts.isSubdomain ?? IS_PRODUCTION) ? `/${escapeAttr(moduleId)}` : `/${escapeAttr(spaceSlug)}/${escapeAttr(moduleId)}`)) : ''}
${body}