Skip to content

[#210] Fix writer dashboard: dedupe donations, fix royalty display#212

Merged
realproject7 merged 2 commits intomainfrom
task/210-writer-dashboard-fixes
Mar 16, 2026
Merged

[#210] Fix writer dashboard: dedupe donations, fix royalty display#212
realproject7 merged 2 commits intomainfrom
task/210-writer-dashboard-fixes

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Deduplicated donations: Removed Donations column from WriterTradingStats (already in top grid). Now shows only Token Price + TVL (2-col).
  • Tiny amount fix: ClaimRoyalties uses formatTruncated with 10 decimal digits — never shows "0" when actual value is nonzero.
  • Green text: Unclaimed royalties display in text-accent when > 0.
  • Adjacent claim button: Moved inline next to royalty amount (not far right).
  • Net -24 lines.

Fixes #210

Test plan

  • tsc --noEmit — zero errors
  • next build — fails due to DNS/Google Fonts (not code issue)
  • Donations appear only once per card
  • Tiny royalty amounts display correctly
  • Claim button adjacent to amount

🤖 Generated with Claude Code

- WriterTradingStats: removed duplicate Donations column (now 2-col:
  Token Price + TVL only)
- ClaimRoyalties: use formatTruncated with 10 digits for tiny amounts
  (never shows "0" when nonzero), green text when unclaimed > 0,
  claim button inline-adjacent to royalty amount

Fixes #210

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T2b APPROVE

  1. Deduplication — Donations column removed from WriterTradingStats, grid changed to 2-col. Clean.
  2. formatTruncated — Smart nonzero guard: if truncation produces "0" but value > 0, keeps full precision. 10-digit default appropriate for royalties.
  3. Green text — Conditional text-accent when unclaimed > 0. Good visual cue.
  4. Inline button — Claim button moved adjacent to amount with ml-2. Better layout.

Net -24 lines. No issues.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES

Summary

This fixes the duplicate donations and tiny-royalty formatting issues, but it does not fully address the royalties placement problem from issue #210. The royalties UI is still rendered as a separate block below the stats section instead of being integrated into that stats area.

Findings

  • [medium] Royalties remain outside the stats area, so the placement fix is incomplete.
    • File: src/app/dashboard/writer/page.tsx:129
    • Suggestion: Adjust the card layout so the royalties row is part of the stats section rather than a separate sibling rendered after WriterTradingStats. That is the missing part of the issue's layout requirement.

Decision

Requesting changes because issue #210 explicitly calls for royalties to be integrated into the bottom-left stats area, and this PR leaves ClaimRoyalties as a separate block below WriterTradingStats.

Wrap WriterTradingStats + ClaimRoyalties in a single container with
consistent spacing. Remove individual mt-3 margins. ClaimRoyalties
now visually part of the stats section.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

The follow-up commit resolves the remaining layout gap from issue #210 by grouping WriterTradingStats and ClaimRoyalties into the same stats section and removing the extra top margin that previously left royalties visually detached. The duplicate donations, tiny-amount formatting, green positive-state styling, and adjacent claim button behavior are all in place.

Findings

  • [info] Previous blocking finding resolved.
    • File: src/app/dashboard/writer/page.tsx:142
    • Suggestion: None.

Decision

Approving because the royalties row is now visually integrated into the stats area as requested, GitHub lint-and-typecheck is passing, and local typecheck is clean.

@realproject7 realproject7 merged commit b2284a8 into main Mar 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] PR #201 writer dashboard: duplicate donations, royalties misplaced, tiny amounts hidden

2 participants