From bf8853da26edc8566f7276463db91e0f599e73ef Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Wed, 1 Apr 2026 15:46:57 +0100 Subject: [PATCH 1/3] =?UTF-8?q?[#724]=20Stories=20tab=20v4=20=E2=80=94=20s?= =?UTF-8?q?tructured=20label-value=20grid=20layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Writer Stats: - grid-cols-2 for Stories/Plots and Holders/Views - grid-cols-[auto_1fr] for Donated and Claimable rows Storyline cards: - Title section with genre + status on second line - Stats grid: Price as label-value row, TVL via WriterTradingStats - grid-cols-2 for Plots/Holders and Views/Created pairs - Donations, deadline, royalties, history in divide-y sections - No inline flex-wrap for stats — all predictable grid positions Co-Authored-By: Claude Opus 4.6 (1M context) --- src/app/profile/[address]/page.tsx | 182 ++++++++++++++++------------- 1 file changed, 101 insertions(+), 81 deletions(-) diff --git a/src/app/profile/[address]/page.tsx b/src/app/profile/[address]/page.tsx index 94451c88..20965fb7 100644 --- a/src/app/profile/[address]/page.tsx +++ b/src/app/profile/[address]/page.tsx @@ -677,44 +677,50 @@ function StoriesTab({ return (
- {/* Writer Stats — compact horizontal row */} -
-
- Writer - {storylines.length} - stories - · - {totalPlots} - plots - · - {totalHolders !== undefined ? totalHolders : "—"} - holders - · - {totalDonations > BigInt(0) ? ( - <> - {formatPrice(formatUnits(totalDonations, 18))} {RESERVE_LABEL} - {plotUsd != null && ( - (≈ {formatUsdValue(Number(formatUnits(totalDonations, 18)) * plotUsd)}) - )} - - ) : ( - - )} - donated + {/* Writer Stats — structured grid */} +
+

Writer Stats

+
+
+ Stories + {storylines.length} +
+
+ Plots + {totalPlots} +
+
+ Holders + {totalHolders !== undefined ? totalHolders : "—"} +
+
+ Views + + {storylines.reduce((sum, s) => sum + (s.view_count ?? 0), 0)} + +
+
+
+ Donated + + {totalDonations > BigInt(0) + ? `${formatPrice(formatUnits(totalDonations, 18))} ${RESERVE_LABEL}` + : "—"} + {totalDonations > BigInt(0) && plotUsd != null && ( + ({formatUsdValue(Number(formatUnits(totalDonations, 18)) * plotUsd)}) + )} + {isOwnProfile && royaltyInfo && ( <> - · - {royaltyInfo.unclaimed > BigInt(0) ? ( - <> - {formatPrice(formatUnits(royaltyInfo.unclaimed, 18))} {RESERVE_LABEL} - {plotUsd != null && ( - (≈ {formatUsdValue(Number(formatUnits(royaltyInfo.unclaimed, 18)) * plotUsd)}) - )} - - ) : ( - - )} - claimable + Claimable + + {royaltyInfo.unclaimed > BigInt(0) + ? `${formatPrice(formatUnits(royaltyInfo.unclaimed, 18))} ${RESERVE_LABEL}` + : "—"} + {royaltyInfo.unclaimed > BigInt(0) && plotUsd != null && ( + ({formatUsdValue(Number(formatUnits(royaltyInfo.unclaimed, 18)) * plotUsd)}) + )} + )}
@@ -823,68 +829,76 @@ function StoryRow({ }); return ( -
- {/* Primary: title + badges + price */} -
+
+ {/* Title section */} +
{storyline.title} - {storyline.genre && ( - - {storyline.genre} - - )} - {storyline.sunset ? ( - complete - ) : ( - active - )} - {priceInfo && ( - - {formatPrice(priceInfo.pricePerToken)} {RESERVE_LABEL} - {plotUsd != null && ( - (≈ {formatUsdValue(Number(priceInfo.pricePerToken) * plotUsd)}) +
+ {storyline.genre && {storyline.genre}} + {storyline.sunset ? ( + complete + ) : ( + active + )} +
+
+ + {/* Stats grid */} +
+
+ Price + + {priceInfo ? formatPrice(priceInfo.pricePerToken) : "—"} {priceInfo ? RESERVE_LABEL : ""} + {priceInfo && plotUsd != null && ( + {formatUsdValue(Number(priceInfo.pricePerToken) * plotUsd)} )} +
+ {storyline.token_address && ( + )} -
- - {/* Secondary: compact stats */} -
- {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} - · - {holderCount !== undefined ? `${holderCount} ${holderCount === 1 ? "holder" : "holders"}` : "—"} - · - {formatViewCount(storyline.view_count)} views - {storyline.block_timestamp && ( - <> - · - {new Date(storyline.block_timestamp).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" })} - +
+
+ Plots + {storyline.plot_count} +
+
+ Holders + {holderCount ?? "—"} +
+
+ Views + {formatViewCount(storyline.view_count)} +
+
+ Created + + {storyline.block_timestamp + ? new Date(storyline.block_timestamp).toLocaleDateString("en-US", { month: "short", year: "2-digit" }) + : "—"} + +
+
+ {storyline.token_address && ( + )}
- {/* TVL + donations */} - {storyline.token_address && ( -
- - -
- )} - {/* Deadline */} {!storyline.sunset && storyline.last_plot_time && ( -
+
)} - {/* Owner-only: genre edit, royalties, donation history */} + {/* Genre prompt — own profile */} {isOwnProfile && !storyline.genre && ( -
+
)} + + {/* Royalties + Claim — own profile */} {isOwnProfile && storyline.token_address && ( -
+
)} + + {/* Donation history — own profile */} {isOwnProfile && storyline.token_address && ( - +
+ +
)}
); From 6b0648784394e2e8ec9cf04a3957289fe4e52893 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Wed, 1 Apr 2026 15:51:18 +0100 Subject: [PATCH 2/3] [#724] Fix T2a review: remove duplicate price row, grid-ify donations - Removed standalone Price row (WriterTradingStats already shows it) - StoryDonationCount now uses grid-cols-[auto_1fr] label-value layout instead of inline text Co-Authored-By: Claude Opus 4.6 (1M context) --- src/app/profile/[address]/page.tsx | 34 +++++++++++++----------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/src/app/profile/[address]/page.tsx b/src/app/profile/[address]/page.tsx index 20965fb7..e5c9d676 100644 --- a/src/app/profile/[address]/page.tsx +++ b/src/app/profile/[address]/page.tsx @@ -849,20 +849,11 @@ function StoryRow({
{/* Stats grid */} -
-
- Price - - {priceInfo ? formatPrice(priceInfo.pricePerToken) : "—"} {priceInfo ? RESERVE_LABEL : ""} - {priceInfo && plotUsd != null && ( - {formatUsdValue(Number(priceInfo.pricePerToken) * plotUsd)} - )} - -
+
{storyline.token_address && ( )} -
+
Plots {storyline.plot_count} @@ -1153,19 +1144,24 @@ function StoryDonationCount({ storylineId, tokenAddress }: { storylineId: number }); if (!data || data.count === 0) { - return
No donations
; + return ( +
+ Donations + +
+ ); } return ( -
- Donations - +
+ Donations + {formatPrice(formatUnits(data.total, 18))} {RESERVE_LABEL} + {plotUsd != null && ( + ({formatUsdValue(Number(formatUnits(data.total, 18)) * plotUsd)}) + )} + ×{data.count} - {plotUsd != null && ( - (≈ {formatUsdValue(Number(formatUnits(data.total, 18)) * plotUsd)}) - )} - ({data.count})
); } From bcc0ea6ee7c8680ada7ee34ab411cf353c79a4e6 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Wed, 1 Apr 2026 15:53:59 +0100 Subject: [PATCH 3/3] [#724] Fix WriterTradingStats: grid-cols-[auto_1fr] label-value rows Replace stacked two-column mini-grid with structured label-value rows matching the wireframe pattern (label left, value right). Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/WriterTradingStats.tsx | 34 ++++++++++----------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/src/components/WriterTradingStats.tsx b/src/components/WriterTradingStats.tsx index 3837d004..09cba282 100644 --- a/src/components/WriterTradingStats.tsx +++ b/src/components/WriterTradingStats.tsx @@ -43,32 +43,24 @@ export function WriterTradingStats({ storyline, plotUsd }: WriterTradingStatsPro }); return ( -
-
- - Token Price - - +
+
+ Price + {data ? `${formatPrice(data.price)} ${RESERVE_LABEL}` : "—"} + {data && plotUsd && ( + ({formatUsdValue(parseFloat(data.price) * plotUsd)}) + )} - {data && plotUsd && ( - - (≈ {formatUsdValue(parseFloat(data.price) * plotUsd)}) - - )}
-
- - TVL - - +
+ TVL + {data ? `${formatPrice(data.tvl)} ${RESERVE_LABEL}` : "—"} + {data && plotUsd && ( + ({formatUsdValue(parseFloat(data.tvl) * plotUsd)}) + )} - {data && plotUsd && ( - - (≈ {formatUsdValue(parseFloat(data.tvl) * plotUsd)}) - - )}
);