Skip to content

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

Merged
gomesalexandre merged 4 commits into
developfrom
fix/11824-yield-explainers-type
Mar 9, 2026
Merged

fix: narrow YieldExplainers action prop type to remove unused claim variant#12073
gomesalexandre merged 4 commits into
developfrom
fix/11824-yield-explainers-type

Conversation

@NeOMakinG

@NeOMakinG NeOMakinG commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

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

coderabbitai Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor
📝 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
Copy Markdown
Contributor 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
Copy Markdown
Contributor Author

🤖 QABot Report (2026-03-03)

Testing completed. See dashboard for full results.

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

@NeOMakinG NeOMakinG left a comment

Copy link
Copy Markdown
Contributor Author

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

@gomesalexandre gomesalexandre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Previously tested and confirmed gucci

@gomesalexandre
gomesalexandre merged commit a0e5c28 into develop Mar 9, 2026
4 checks passed
@gomesalexandre
gomesalexandre deleted the fix/11824-yield-explainers-type branch March 9, 2026 10:54

@gomesalexandre gomesalexandre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code looks good — narrowing the action prop type to remove the unused claim variant is a clean cleanup. Already tested previously. ✅

0xApotheosis added a commit that referenced this pull request Mar 10, 2026
* fix: copy patches dir in public-api Dockerfile for pnpm install

pnpm requires the patches directory during install (not just scripts)
because patched dependencies are referenced in the lockfile. The
--ignore-scripts flag alone doesn't prevent pnpm from reading patch
files during dependency resolution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add .railwayignore to reduce snapshot size for public-api deploys

Railway's "Failed to snapshot repository" error is caused by the repo
being too large (~74MB tracked files). This excludes frontend source,
images, tests, and other files not needed for the public-api Dockerfile
build from Railway's pre-build snapshot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Revert "fix: add .railwayignore to reduce snapshot size for public-api deploys"

This reverts commit 473f2d3.

* Revert "fix: copy patches dir in public-api Dockerfile for pnpm install"

This reverts commit a0618c1.

* fix: unrug Railway CI - copy patches dir and add .railwayignore (#12099)

* fix: unrug public-api Railway CI - copy patches dir and add .railwayignore

Two fixes for Railway deployment failures:

1. Copy patches/ directory in Dockerfile before pnpm install - pnpm
   requires patch files during install even with --ignore-scripts because
   patched dependencies are referenced in the lockfile.

2. Add .railwayignore to reduce repo snapshot size - Railway's "Failed to
   snapshot repository" error was caused by the repo being ~74MB of tracked
   files. Excludes frontend source, images, tests, and other files not
   needed for the public-api Docker build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add patches dir to swap-widget Dockerfile and update .railwayignore

The swap-widget Dockerfile had the same missing patches/ dir bug as
public-api — pnpm install fails with ENOENT for patched dependencies.
Also add swap-widget *.md exception to .railwayignore.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use copy package-import-method in Docker to avoid pnpm ENOENT (#12100)

* fix: use copy package-import-method in Docker to avoid pnpm ENOENT

pnpm's default hard-link strategy fails intermittently on Docker's
overlay filesystem with "ENOENT: rename _tmp -> secp256k1". Setting
package-import-method=copy via env var (Docker-only, doesn't affect
local dev .npmrc) fixes the atomic rename race condition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add retry loop for pnpm install in Docker builds

The ENOENT rename failure persists even with package-import-method=copy
because pnpm's hoisting/linking phase still does atomic renames that
race on Docker's overlay filesystem. Since it's intermittent and all
packages are cached in the store after the first attempt, a retry with
clean node_modules is fast and reliable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: restrict swap-widget tsconfig types to prevent auto-discovery

Without an explicit `types` field, TypeScript auto-discovers all
@types/* packages hoisted to root node_modules. The deprecated stub
@types/ethereumjs-util (from hdwallet-ledger devDeps) has no .d.ts
files, causing TS2688 during Docker builds. Restricting to
["vite/client"] matches the pattern used by the root tsconfig.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* feat: speed up stuck btc transactions via rbf (#11885)

* fix: railway build with pnpm (#12107)

* feat: thorchain solana lp integration (#12037)

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

* fix: always refresh account balances after swap completion (#12106)

* chore: unify claude and codex instruction entrypoints (#12119)

* feat: idempotent release script state machine (#12110)

* feat: bebop solana swapper take 2 (#12111)

* chore: remove unused @chainflip/rpc and @chainflip/extrinsics deps (#12109)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: gomes-bot <contact@0xgom.es>
Co-authored-by: kevin <35275952+kaladinlight@users.noreply.github.com>
Co-authored-by: gomes <17035424+gomesalexandre@users.noreply.github.com>
Co-authored-by: NeOMakinG <14963751+NeOMakinG@users.noreply.github.com>
0xApotheosis added a commit that referenced this pull request Mar 12, 2026
* chore: prerelease v1.1016.0 (#12127)

* fix: copy patches dir in public-api Dockerfile for pnpm install

pnpm requires the patches directory during install (not just scripts)
because patched dependencies are referenced in the lockfile. The
--ignore-scripts flag alone doesn't prevent pnpm from reading patch
files during dependency resolution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add .railwayignore to reduce snapshot size for public-api deploys

Railway's "Failed to snapshot repository" error is caused by the repo
being too large (~74MB tracked files). This excludes frontend source,
images, tests, and other files not needed for the public-api Dockerfile
build from Railway's pre-build snapshot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Revert "fix: add .railwayignore to reduce snapshot size for public-api deploys"

This reverts commit 473f2d3.

* Revert "fix: copy patches dir in public-api Dockerfile for pnpm install"

This reverts commit a0618c1.

* fix: unrug Railway CI - copy patches dir and add .railwayignore (#12099)

* fix: unrug public-api Railway CI - copy patches dir and add .railwayignore

Two fixes for Railway deployment failures:

1. Copy patches/ directory in Dockerfile before pnpm install - pnpm
   requires patch files during install even with --ignore-scripts because
   patched dependencies are referenced in the lockfile.

2. Add .railwayignore to reduce repo snapshot size - Railway's "Failed to
   snapshot repository" error was caused by the repo being ~74MB of tracked
   files. Excludes frontend source, images, tests, and other files not
   needed for the public-api Docker build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add patches dir to swap-widget Dockerfile and update .railwayignore

The swap-widget Dockerfile had the same missing patches/ dir bug as
public-api — pnpm install fails with ENOENT for patched dependencies.
Also add swap-widget *.md exception to .railwayignore.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use copy package-import-method in Docker to avoid pnpm ENOENT (#12100)

* fix: use copy package-import-method in Docker to avoid pnpm ENOENT

pnpm's default hard-link strategy fails intermittently on Docker's
overlay filesystem with "ENOENT: rename _tmp -> secp256k1". Setting
package-import-method=copy via env var (Docker-only, doesn't affect
local dev .npmrc) fixes the atomic rename race condition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add retry loop for pnpm install in Docker builds

The ENOENT rename failure persists even with package-import-method=copy
because pnpm's hoisting/linking phase still does atomic renames that
race on Docker's overlay filesystem. Since it's intermittent and all
packages are cached in the store after the first attempt, a retry with
clean node_modules is fast and reliable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: restrict swap-widget tsconfig types to prevent auto-discovery

Without an explicit `types` field, TypeScript auto-discovers all
@types/* packages hoisted to root node_modules. The deprecated stub
@types/ethereumjs-util (from hdwallet-ledger devDeps) has no .d.ts
files, causing TS2688 during Docker builds. Restricting to
["vite/client"] matches the pattern used by the root tsconfig.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* feat: speed up stuck btc transactions via rbf (#11885)

* fix: railway build with pnpm (#12107)

* feat: thorchain solana lp integration (#12037)

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

* fix: always refresh account balances after swap completion (#12106)

* chore: unify claude and codex instruction entrypoints (#12119)

* feat: idempotent release script state machine (#12110)

* feat: bebop solana swapper take 2 (#12111)

* chore: remove unused @chainflip/rpc and @chainflip/extrinsics deps (#12109)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: gomes-bot <contact@0xgom.es>
Co-authored-by: kevin <35275952+kaladinlight@users.noreply.github.com>
Co-authored-by: gomes <17035424+gomesalexandre@users.noreply.github.com>
Co-authored-by: NeOMakinG <14963751+NeOMakinG@users.noreply.github.com>

* fix: bebop solana signing + thorchain solana lp compute budget (#12132)

* fix: bebop solana signing + reject amm-routed quotes (#12147)

* fix: cherry-pick #12148 - bebop solana ghost tx + malformed amm routes (#12151)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: gomes-bot <contact@0xgom.es>
Co-authored-by: kevin <35275952+kaladinlight@users.noreply.github.com>
Co-authored-by: gomes <17035424+gomesalexandre@users.noreply.github.com>
Co-authored-by: NeOMakinG <14963751+NeOMakinG@users.noreply.github.com>
0xApotheosis added a commit that referenced this pull request Mar 12, 2026
chore: release v1.1016.0 (#12128)

* chore: prerelease v1.1016.0 (#12127)

* fix: copy patches dir in public-api Dockerfile for pnpm install

pnpm requires the patches directory during install (not just scripts)
because patched dependencies are referenced in the lockfile. The
--ignore-scripts flag alone doesn't prevent pnpm from reading patch
files during dependency resolution.



* fix: add .railwayignore to reduce snapshot size for public-api deploys

Railway's "Failed to snapshot repository" error is caused by the repo
being too large (~74MB tracked files). This excludes frontend source,
images, tests, and other files not needed for the public-api Dockerfile
build from Railway's pre-build snapshot.



* Revert "fix: add .railwayignore to reduce snapshot size for public-api deploys"

This reverts commit 473f2d3.

* Revert "fix: copy patches dir in public-api Dockerfile for pnpm install"

This reverts commit a0618c1.

* fix: unrug Railway CI - copy patches dir and add .railwayignore (#12099)

* fix: unrug public-api Railway CI - copy patches dir and add .railwayignore

Two fixes for Railway deployment failures:

1. Copy patches/ directory in Dockerfile before pnpm install - pnpm
   requires patch files during install even with --ignore-scripts because
   patched dependencies are referenced in the lockfile.

2. Add .railwayignore to reduce repo snapshot size - Railway's "Failed to
   snapshot repository" error was caused by the repo being ~74MB of tracked
   files. Excludes frontend source, images, tests, and other files not
   needed for the public-api Docker build.



* fix: add patches dir to swap-widget Dockerfile and update .railwayignore

The swap-widget Dockerfile had the same missing patches/ dir bug as
public-api — pnpm install fails with ENOENT for patched dependencies.
Also add swap-widget *.md exception to .railwayignore.



---------



* fix: use copy package-import-method in Docker to avoid pnpm ENOENT (#12100)

* fix: use copy package-import-method in Docker to avoid pnpm ENOENT

pnpm's default hard-link strategy fails intermittently on Docker's
overlay filesystem with "ENOENT: rename _tmp -> secp256k1". Setting
package-import-method=copy via env var (Docker-only, doesn't affect
local dev .npmrc) fixes the atomic rename race condition.



* fix: add retry loop for pnpm install in Docker builds

The ENOENT rename failure persists even with package-import-method=copy
because pnpm's hoisting/linking phase still does atomic renames that
race on Docker's overlay filesystem. Since it's intermittent and all
packages are cached in the store after the first attempt, a retry with
clean node_modules is fast and reliable.



* fix: restrict swap-widget tsconfig types to prevent auto-discovery

Without an explicit `types` field, TypeScript auto-discovers all
@types/* packages hoisted to root node_modules. The deprecated stub
@types/ethereumjs-util (from hdwallet-ledger devDeps) has no .d.ts
files, causing TS2688 during Docker builds. Restricting to
["vite/client"] matches the pattern used by the root tsconfig.



---------



* feat: speed up stuck btc transactions via rbf (#11885)

* fix: railway build with pnpm (#12107)

* feat: thorchain solana lp integration (#12037)

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

* fix: always refresh account balances after swap completion (#12106)

* chore: unify claude and codex instruction entrypoints (#12119)

* feat: idempotent release script state machine (#12110)

* feat: bebop solana swapper take 2 (#12111)

* chore: remove unused @chainflip/rpc and @chainflip/extrinsics deps (#12109)

---------







* fix: bebop solana signing + thorchain solana lp compute budget (#12132)

* fix: bebop solana signing + reject amm-routed quotes (#12147)

* fix: cherry-pick #12148 - bebop solana ghost tx + malformed amm routes (#12151)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: gomes-bot <contact@0xgom.es>
Co-authored-by: kevin <35275952+kaladinlight@users.noreply.github.com>
Co-authored-by: gomes <17035424+gomesalexandre@users.noreply.github.com>
Co-authored-by: NeOMakinG <14963751+NeOMakinG@users.noreply.github.com>
This was referenced Mar 13, 2026
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