Skip to content

fix: narrow YieldExplainers action prop type to remove unused claim variant#12073

Open
NeOMakinG wants to merge 3 commits intodevelopfrom
fix/11824-yield-explainers-type
Open

fix: narrow YieldExplainers action prop type to remove unused claim variant#12073
NeOMakinG wants to merge 3 commits intodevelopfrom
fix/11824-yield-explainers-type

Conversation

@NeOMakinG
Copy link
Collaborator

@NeOMakinG NeOMakinG commented Mar 3, 2026

Description

Narrows the YieldExplainers action prop type to remove unused claim variant.

Changes

  • Changed action type from 'enter' | 'exit' | 'claim' to 'enter' | 'exit'

Testing

Type-only change - no runtime behavior change. CI build verification.


QA Report ✅

Tested: 2026-03-03
Tester: QABot (CI Verification)
Branch: fix/11824-yield-explainers-type

Test Results

Test Case Status Notes
TypeScript compilation ✅ Pass CI "Call / Static" passed
Type narrowing correct ✅ Pass Removed unused claim variant
No runtime impact ✅ Pass Type-only change

Verification

Verified code change removes unused claim from action union type. CI static checks (TypeScript + lint) passed.

QABot Report: https://qabot-kappa.vercel.app/runs/8db66f0a-18b6-4eb9-89cd-f65375c53fa7

@NeOMakinG NeOMakinG requested a review from a team as a code owner March 3, 2026 09:29
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 3, 2026

📝 Walkthrough

Walkthrough

The YieldExplainersProps action type signature was narrowed by removing the 'claim' option, restricting it to 'enter' | 'exit' only. This change aligns the type definition with actual component usage patterns where the 'claim' action is guarded against upstream.

Changes

Cohort / File(s) Summary
Type Signature Narrowing
src/pages/Yields/components/YieldExplainers.tsx
Removed 'claim' from YieldExplainersProps action type union, narrowing to 'enter' | 'exit' to match actual usage patterns.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 A type once bloated, three options did claim,
But usage showed just two—what a shame!
Now 'enter' and 'exit' dance pure and clean,
The narrowest scope we've ever seen! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: narrowing the YieldExplainers action prop type by removing the unused 'claim' variant.
Linked Issues check ✅ Passed The PR successfully implements the requirement from issue #11824 by narrowing the action prop type from 'enter' | 'exit' | 'claim' to 'enter' | 'exit' in YieldExplainers.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to the YieldExplainers action prop type definition, directly addressing issue #11824 with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/11824-yield-explainers-type

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@NeOMakinG NeOMakinG marked this pull request as draft March 3, 2026 09:40
@NeOMakinG NeOMakinG marked this pull request as ready for review March 3, 2026 10:34
@NeOMakinG
Copy link
Collaborator Author

🧪 QA Report

Changes Reviewed

  • Removes 'claim' from the action prop type union
  • Type is now 'enter' | 'exit' instead of 'enter' | 'exit' | 'claim'

Code Review ✅

  • Pure TypeScript cleanup - no runtime changes
  • 'claim' variant was never used in the codebase
  • Narrower types = better type safety

Testing Required

  • None (TypeScript-only change, CI validates)

Verdict

Approved. CI passes ✅ No runtime impact.

@NeOMakinG
Copy link
Collaborator Author

🤖 QABot Report (2026-03-03)

Testing completed. See dashboard for full results.

📊 Dashboard: skills/qabot/reports/2026-03-03/dashboard.md

Copy link
Collaborator Author

@NeOMakinG NeOMakinG left a comment

Choose a reason for hiding this comment

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

QABot Code Review

Summary: Type narrowing is correct and verified.

Analysis:

  • YieldExplainers component is only rendered when !isManageAction
  • isManageAction = isClaimAction || isWithdrawAction
  • Therefore, YieldExplainers is never called with 'claim' or 'withdraw'
  • Removing unused 'claim' variant is correct

Risk: None - type-only change with no runtime impact.

Already has QABot test: https://qabot-kappa.vercel.app/runs/8db66f0a-18b6-4eb9-89cd-f65375c53fa7

@gomesalexandre gomesalexandre enabled auto-merge (squash) March 6, 2026 17:17
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.

2 participants