Skip to content

Commit ea9e7e4

Browse files
sktbrdclaude
andauthored
feat(treasury): drop Member Activity and the source tiles, name the subnet (#261)
Three changes to /treasury, grouped because they all touch the same page and the same area of it. Member Activity leaves the treasury page. The chart, its hook and its i18n keys all stay — HomeStaticContent still renders it — so this removes the usage, not the component. The chart row goes from three columns to two. The inflow source tiles go too. Their aggregate ("Subnet · 5 entries") was the summary above the list; the per-row badges stay, since telling each credit apart is what that panel is for. `inflows.entries` and `inflows.sources` were left orphaned and are removed. The badge reads "Morpheus Subnet" instead of "Subnet", and that rename has a consequence worth spelling out. The tagging rule treats every USDC credit from the SplitsWarehouse as subnet income, which holds only because the subnet split is currently the sole 0xSplits paying this treasury. The first rider sponsorship payout will leave the same address — and where "Subnet" was vague enough to slip by, "Morpheus Subnet" would put a specific false claim on a public treasury page. The warning beside `splitsAmbiguous` now says so directly: disambiguating stopped being cosmetic the day that string changed. i18n parity: 52 keys per locale, identical order. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent d72aa07 commit ea9e7e4

5 files changed

Lines changed: 16 additions & 43 deletions

File tree

messages/en/treasury.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,8 @@
7373
"auction": "Auction",
7474
"auctionHint": "Arrived from the auction house as an internal transfer",
7575
"viewTx": "View transaction on Basescan",
76-
"sources": "By source",
77-
"subnet": "Subnet",
76+
"subnet": "Morpheus Subnet",
7877
"splits": "Splits",
79-
"transfer": "Transfer",
80-
"entries": "entries"
78+
"transfer": "Transfer"
8179
}
8280
}

messages/pt-br/treasury.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,8 @@
7373
"auction": "Leilão",
7474
"auctionHint": "Chegou do contrato de leilão como transferência interna",
7575
"viewTx": "Ver transação no Basescan",
76-
"sources": "Por fonte",
77-
"subnet": "Subnet",
76+
"subnet": "Morpheus Subnet",
7877
"splits": "Splits",
79-
"transfer": "Transferência",
80-
"entries": "entradas"
78+
"transfer": "Transferência"
8179
}
8280
}

src/app/[locale]/treasury/page.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,6 @@ const ProposalsPerMonthChart = dynamic(
6565
})),
6666
{ loading: () => <div className="h-[300px] rounded-xl bg-muted animate-pulse" /> },
6767
);
68-
const MemberActivityChart = dynamic(
69-
() =>
70-
import("@/components/treasury/MemberActivityChart").then((mod) => ({
71-
default: mod.MemberActivityChart,
72-
})),
73-
{ loading: () => <div className="h-[300px] rounded-xl bg-muted animate-pulse" /> },
74-
);
7568

7669
export default async function TreasuryPage({ params }: { params: Promise<{ locale: string }> }) {
7770
const { locale } = await params;
@@ -136,16 +129,13 @@ export default async function TreasuryPage({ params }: { params: Promise<{ local
136129
</div>
137130

138131
{/* Charts */}
139-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-3">
132+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
140133
<div className="lg:col-span-1 min-w-0">
141134
<AuctionBidsPerMonthChart />
142135
</div>
143136
<div className="lg:col-span-1 min-w-0">
144137
<ProposalsPerMonthChart />
145138
</div>
146-
<div className="lg:col-span-1 min-w-0">
147-
<MemberActivityChart />
148-
</div>
149139
</div>
150140

151141
{/* Holdings, paired: fungible on the left, the Gnars themselves on the

src/components/treasury/TreasuryInflows.tsx

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -76,30 +76,6 @@ export async function TreasuryInflows({ locale }: { locale: string }) {
7676
</CardTitle>
7777
</CardHeader>
7878
<CardContent>
79-
{inflows.length > 0 ? (
80-
<div className="mb-3 grid grid-cols-2 gap-2 sm:grid-cols-4">
81-
{(["auction", "subnet", "splits", "transfer"] as const)
82-
.map((src) => ({
83-
src,
84-
rows: inflows.filter((f) => f.source === src),
85-
}))
86-
.filter(({ rows }) => rows.length > 0)
87-
.map(({ src, rows }) => (
88-
<div key={src} className="rounded-lg border border-border bg-muted/40 p-2.5">
89-
<div
90-
className={`inline-flex items-center rounded-full border px-1.5 py-0.5 text-[10px] font-semibold ${SOURCE_TONE[src]}`}
91-
>
92-
{t(src)}
93-
</div>
94-
<div className="mt-1.5 font-mono text-sm font-semibold tabular-nums">
95-
{rows.length}
96-
</div>
97-
<div className="text-[11px] text-muted-foreground">{t("entries")}</div>
98-
</div>
99-
))}
100-
</div>
101-
) : null}
102-
10379
{inflows.length === 0 ? (
10480
<p className="py-6 text-center text-sm text-muted-foreground">{t("empty")}</p>
10581
) : (

src/services/treasury-inflows.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,17 @@ export const loadTreasuryInflows = cache(
138138
// rider split has distributed yet. Until one has, warehouse credits are
139139
// unambiguously subnet; after that they degrade to the honest `splits`
140140
// rather than silently claiming the wrong origin.
141+
//
142+
// READ THIS BEFORE TOUCHING THE `subnet` BRANCH. The label users see is
143+
// no longer the vague "Subnet" — it now reads "Morpheus Subnet", which
144+
// names a specific product. So the failure mode changed with it: the
145+
// first rider sponsorship payout would not just be filed under a fuzzy
146+
// heading, it would appear on a public treasury page as Morpheus
147+
// earnings when it is nothing of the sort. Disambiguating stopped being
148+
// cosmetic the day that string was renamed. `splitsAmbiguous` and the
149+
// `splits` tag exist precisely so that day costs one flag, not a
150+
// redesign — set it and these rows degrade to an honest label instead
151+
// of asserting a false origin.
141152
const source: InflowSource =
142153
from === DAO_ADDRESSES.auction.toLowerCase()
143154
? "auction"

0 commit comments

Comments
 (0)