Skip to content

[#158] Show donation stats prominently, clarify deadline wording#167

Merged
realproject7 merged 2 commits intomainfrom
task/158-dashboard-donation-deadline
Mar 16, 2026
Merged

[#158] Show donation stats prominently, clarify deadline wording#167
realproject7 merged 2 commits intomainfrom
task/158-dashboard-donation-deadline

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Replaced redundant "Deadline 72h" static column with donation total + count in writer dashboard
  • Changed deadline wording from "Deadline: XX:XX:XX remaining" to "Next plot due in XX:XX:XX"
  • Replaced cryptic "D:" / "R:" labels with clearer "Royalties:" in earnings breakdown

Fixes #158

Test plan

  • tsc --noEmit — zero errors
  • next build — clean
  • vitest run — 22/22 tests pass
  • Writer dashboard shows donation total + count instead of "Deadline 72h"
  • Deadline countdown reads "Next plot due in HH:MM:SS"

🤖 Generated with Claude Code

- Replace redundant "Deadline 72h" column with donation total + count
- Change "Deadline: XX:XX:XX remaining" to "Next plot due in XX:XX:XX"
- Replace cryptic "D:" / "R:" labels with "Royalties:" in earnings breakdown

Fixes #158

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

All three changes address the issue clearly:

  1. DonationCount — New component replaces static "72h" column with actual donation total + count from Supabase. BigInt summation is correct. Empty state handled.
  2. DeadlineCountdown — Wording improved: "Deadline: XX:XX:XX remaining" → "Next plot due in XX:XX:XX". Applied consistently to both placeholder and active states.
  3. WriterTradingStats — Removed redundant "D:" donation line (now in dashboard), kept "Royalties:" with clear label.

No issues found.

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

The dashboard wording changes are in the right direction, but the new prominent donation stat introduces a formatting regression by hardcoding token decimals. This codebase already handles reserve-token decimals dynamically elsewhere, so the new dashboard path should not revert to a fixed 18.

Findings

  • [medium] DonationCount formats totals with formatUnits(data.total, 18), which hardcodes the reserve-token decimals in a UI path that should follow the on-chain token metadata. That can misstate donation totals if the reserve token decimals differ and also violates the repo rule against hardcoded values.
    • File: src/app/dashboard/writer/page.tsx:173
    • Suggestion: Reuse the same reserve-token metadata path already used in WriterTradingStats/getTokenTVL so donation totals are formatted with the correct dynamic decimals (and ideally the symbol as well).

Decision

Requesting changes because the new prominent donation stat should not hardcode decimals. Once that formatting uses the reserve token metadata dynamically, the rest of the PR looks appropriately scoped to #158.

Fetch decimals via getTokenTVL instead of hardcoding 18. DonationCount
now takes tokenAddress prop to resolve the reserve token metadata.

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 fixes the donation-stat formatting regression by resolving reserve-token decimals dynamically instead of hardcoding 18. The dashboard wording/layout changes now look appropriately scoped to #158, and the updated head passes both GitHub CI and local validation.

Findings

  • [info] No remaining blocking findings after c2e76db.
    • File: src/app/dashboard/writer/page.tsx:153
    • Suggestion: None.

Decision

Approving because the prior hardcoded-decimals issue is resolved, the writer dashboard changes now align with the repo’s dynamic token metadata pattern, and lint-and-typecheck plus local typecheck, test, and build validation pass.

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

[QA-Bug] Writer dashboard — donation stat hidden, deadline wording unclear

2 participants