Skip to content

[#194] Clean up earnings/royalties in writer dashboard#201

Merged
realproject7 merged 1 commit intomainfrom
task/194-earnings-royalties-cleanup
Mar 16, 2026
Merged

[#194] Clean up earnings/royalties in writer dashboard#201
realproject7 merged 1 commit intomainfrom
task/194-earnings-royalties-cleanup

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Renamed "Earnings" → "Donations" — now shows only donation total (not combined with royalties)
  • Removed duplicate "Royalties: 0" sub-text from WriterTradingStats
  • Removed bond/royalty queries from WriterTradingStats (already handled by ClaimRoyalties)
  • Added formatTruncated for readable decimal display (6 digits max)
  • Net -30 lines — cleaner separation of concerns

Fixes #194

Test plan

  • tsc --noEmit — zero errors
  • next build — clean
  • Writer dashboard: "Donations" shows truncated amount, no "Royalties:" sub-text
  • ClaimRoyalties section handles royalties independently

🤖 Generated with Claude Code

- EARNINGS → DONATIONS: shows only donation total with truncated decimals
- Removed duplicate royalty sub-text and royalty queries from
  WriterTradingStats (handled by ClaimRoyalties component)
- Added formatTruncated for readable decimal display

Fixes #194

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

Good refactor — removes 30 lines of duplicate bond/royalty queries that ClaimRoyalties already handles. Clean separation of concerns: WriterTradingStats shows donations only, ClaimRoyalties owns royalty display. formatTruncated added for readable decimals. 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: APPROVE

Summary

This PR cleanly resolves the remaining writer-dashboard confusion by making the lower stat explicitly donations-only, truncating that value to a readable precision, and removing the redundant royalty fetch/display that overlapped with the dedicated ClaimRoyalties row. The claim button placement is already handled by the existing inline ClaimRoyalties layout, so the current diff stays focused.

Findings

  • [info] No remaining blocking findings.
    • File: src/components/WriterTradingStats.tsx:63
    • Suggestion: None.

Decision

Approving because the dashboard no longer conflates donations with royalties, the duplicate royalty sub-text is removed, the value formatting is improved, and validation is clean.

@realproject7 realproject7 merged commit d180fd5 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.

[UX] Writer dashboard: clean up royalties/earnings and fix claim button placement

2 participants