fix(rwallet): consolidate dual tab bars into single shell subnav

Remove internal view-tabs from folk-wallet-viewer — navigation now handled
entirely by shell subnav outputPaths: Budget (default), Token Balances, Flows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-03-25 14:40:14 -07:00
parent a10f8e9507
commit 28f11242f7
2 changed files with 8 additions and 12 deletions

View File

@ -3346,8 +3346,6 @@ class FolkWalletViewer extends HTMLElement {
</div>
</div>` : ""}
${this.renderViewTabs()}
${this.activeView === "balances"
? this.renderBalanceTable() + this.renderDefiPositions() + this.renderPaymentActions()
: `<div class="viz-wrapper">
@ -3541,13 +3539,7 @@ class FolkWalletViewer extends HTMLElement {
this.addToWatchlist(addr, chain, label);
});
// View tab listeners (skip tour button which has no data-view)
this.shadow.querySelectorAll(".view-tab[data-view]").forEach((tab) => {
tab.addEventListener("click", () => {
const view = (tab as HTMLElement).dataset.view as ViewTab;
this.handleViewTabClick(view);
});
});
// View tab listeners no longer needed — shell subnav handles navigation
this.shadow.querySelector("#btn-tour")?.addEventListener("click", () => this.startTour());

View File

@ -1264,8 +1264,12 @@ function renderWallet(spaceSlug: string, initialView?: string) {
});
}
routes.get("/wallets", (c) => c.html(renderWallet(c.req.param("space") || "demo", "budget")));
routes.get("/budget", (c) => c.html(renderWallet(c.req.param("space") || "demo", "budget")));
routes.get("/tokens", (c) => c.html(renderWallet(c.req.param("space") || "demo", "balances")));
routes.get("/flows", (c) => c.html(renderWallet(c.req.param("space") || "demo", "flows")));
// Legacy aliases
routes.get("/wallets", (c) => c.html(renderWallet(c.req.param("space") || "demo", "budget")));
routes.get("/transactions", (c) => c.html(renderWallet(c.req.param("space") || "demo", "budget")));
routes.get("/", (c) => c.html(renderWallet(c.req.param("space") || "demo", "budget")));
@ -1295,8 +1299,8 @@ export const walletModule: RSpaceModule = {
],
acceptsFeeds: ["economic", "governance"],
outputPaths: [
{ path: "wallets", name: "Wallets", icon: "💳", description: "Connected Safe wallets and EOA accounts" },
{ path: "budget", name: "Budget", icon: "📊", description: "Budget visualization — balance river timeline" },
{ path: "tokens", name: "Token Balances", icon: "🪙", description: "Token balances across chains" },
{ path: "transactions", name: "Transactions", icon: "📜", description: "Transaction history and transfers" },
{ path: "flows", name: "Flows", icon: "🔀", description: "Sankey flow diagram with transaction scrubber" },
],
};