Skip to content

[#175] Show Claim Royalties always with disabled state and tooltip#182

Merged
realproject7 merged 1 commit intomainfrom
task/175-claim-royalties-always-visible
Mar 16, 2026
Merged

[#175] Show Claim Royalties always with disabled state and tooltip#182
realproject7 merged 1 commit intomainfrom
task/175-claim-royalties-always-visible

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Removed early return null — Claim Royalties section always visible
  • Button disabled when plotCount < 2 or unclaimed === 0
  • Added info icon with hover/tap tooltip explaining royalties, unlock conditions, and current status
  • Shows unlock hint: "Chain N more plots to unlock royalties"
  • Unclaimed amount always displayed even when 0

Fixes #175

Test plan

  • tsc --noEmit — zero errors
  • next build — clean
  • Writer dashboard always shows Claim Royalties section
  • Tooltip shows on hover (desktop) and tap (mobile)
  • Button disabled with reduced opacity when conditions not met
  • Button works normally when eligible with unclaimed > 0

🤖 Generated with Claude Code

- Remove early return null — section always visible in writer dashboard
- Claim button disabled when plotCount < 2 or unclaimed === 0
- Info icon (ⓘ) with hover/tap tooltip explaining royalties, unlock
  conditions, and current status with dynamic values
- Shows unlock hint: "Chain N more plots to unlock royalties"
- Unclaimed amount always displayed even when 0

Fixes #175

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 UX improvement:

  1. Always visiblereturn null removed, section always rendered with disabled state.
  2. Tooltip — Hover (desktop) + click (mobile) via combined onMouseEnter/Leave + onClick toggle. Shows dynamic plot count and unclaimed amount. Positioned above with bottom-full.
  3. Unlock hint — Dynamic "Chain N more plots" text with correct singular/plural.
  4. ButtoncanClaim combines eligibility + unclaimed > 0. Disabled opacity applied.

Note (non-blocking, pre-existing): formatUnits(unclaimed, 18) uses hardcoded decimals — same as the existing code before this PR, not a regression.

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: APPROVE

Summary

The royalties CTA is now consistently visible, disabled when conditions are not met, and backed by an inline tooltip that explains the unlock rules with current values. The change is focused to the requested UX improvement in #175 and validation is clean.

Findings

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

Decision

Approving because the Claim Royalties section is no longer hidden, the disabled/tooltip behavior matches the issue requirements, and GitHub lint-and-typecheck plus local typecheck and build validation pass.

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] Show Claim Royalties button always with disabled state and tooltip

2 participants