Skip to content

feat: enable /yields route#11781

Merged
NeOMakinG merged 18 commits intodevelopfrom
feat_yield_full_toggle_2
Feb 10, 2026
Merged

feat: enable /yields route#11781
NeOMakinG merged 18 commits intodevelopfrom
feat_yield_full_toggle_2

Conversation

@gomesalexandre
Copy link
Contributor

@gomesalexandre gomesalexandre commented Jan 27, 2026

Description

Enable /yields route and make yield a first-class route on mobile.

  • Replace History tab in mobile bottom nav with Earn tab (routes to /yields)
  • Add History icon button to mobile header (after search and QR icons)
  • Enable yield feature flags by default (VITE_FEATURE_YIELD_XYZ, VITE_FEATURE_YIELDS_PAGE, VITE_FEATURE_YIELD_MULTI_ACCOUNT)

Issue (if applicable)

N/A

Risk

Low - UI changes only, no transaction logic affected.

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

None - this is purely navigation/discoverability improvements.

Testing

Engineering

  1. Open the app on mobile viewport (or actual mobile device)
  2. Verify the bottom nav shows "Earn" instead of "History"
  3. Tap "Earn" tab and verify it navigates to /yields
  4. Verify the History icon appears in the top header (rightmost icon after search and QR)
  5. Tap History icon and verify it navigates to /history
  6. Verify yield feature flags are enabled by default

Operations

  • Verify mobile navigation changes work correctly
  • Verify yield pages are accessible and functional

Screenshots (if applicable)

image

Summary by CodeRabbit

  • New Features

    • Yields section added to navigation for direct access to yields management.
    • Multi-account yield management is now available.
    • Mobile header includes a new history button for quick access to transactions.
  • Configuration

    • Related yield feature flags have been enabled or adjusted to activate these features.

gomesalexandre and others added 13 commits January 26, 2026 12:34
…letes

After completing a yield enter transaction and navigating away (e.g., clicking
"View position"), the user could previously go back to /earn/confirm which
shouldn't be accessible anymore.

Fixes:
1. Reorder guards - check for success state BEFORE checking for selectedYield,
   ensuring the success screen renders even if Redux state becomes undefined
2. Clear tradeEarnInput Redux state on unmount when in success state, preventing
   re-access via browser back button or navigation

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Links were navigating to /yields/${yieldId} which resulted in 404s.
The correct route is /yield/${yieldId} (singular).

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Moved success buttons from YieldSuccess body content to footerContent
prop in EarnConfirm, matching the pattern used by input/confirm steps.

Added showButtons prop to YieldSuccess for backwards compatibility.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
When fiat amount is zero, return empty string instead of '0.00' to
trigger placeholder styling (greyed out) matching crypto mode behavior.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
For yields with a default validator (Cosmos ATOM, Solana SOL native staking),
filter out positions from other validators in useAllYieldBalances query.

This ensures only ShapeShift DAO positions show for Cosmos and only Figment
positions show for Solana, hiding positions staked externally with other
validators.

Removed redundant validator-specific filtering from YieldsList.tsx since
filtering now happens at the data layer.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Liquid staking yields (like ETH Lido) were missing the Provider row
because they are classified as staking but have no validators. The
condition now shows the provider when there's no validator metadata.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Document that PRs opened via CLI tools should always use the
PULL_REQUEST_TEMPLATE.md as the base for the PR body.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Shows a loading spinner with tooltip when legacy positions are still
loading, allowing the yield table to render immediately with yield.xyz data.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Adds getBestActionableYield utility that filters out disabled yields
(enter disabled, under maintenance, deprecated) before selecting the
highest APY option. Prevents showing CTAs for opportunities users can't act on.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
When DeFiEarn is rendered outside a YieldAccountProvider (like in the
wallet drawer), the default accountNumber: 0 was incorrectly filtering
to only Account #0's balances. Now falls through to enabledWalletAccountIds
when no context is present, properly aggregating balances across all accounts.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Wrap DeFiEarn in memo to prevent unnecessary re-renders
- Remove empty useEffect in YieldForm
- Consolidate isStakingYieldType utility (remove redundant wrapper)
- Extract CryptoAmountInput to shared component
- Extract useYieldDisplayInfo hook from YieldsList
- Move static searchIcon outside component
- Fix highestAmountUsdValidator computed after validator filtering
- Remove YIELD_IMPROVEMENTS.md dev notes file

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Replace History tab in mobile nav with Earn tab routing to /yields
- Add History icon button to mobile header (after search and QR icons)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Enable VITE_FEATURE_YIELD_XYZ, VITE_FEATURE_YIELDS_PAGE, VITE_FEATURE_YIELD_MULTI_ACCOUNT in .env
- Remove redundant overrides from .env.development and .env.production

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

Environment yield feature flags were enabled in .env and removed from .env.development and .env.production. A new /yields/* public route (gated by those flags) was added and history route visibility adjusted. A history button was added to the mobile user header to navigate to /history.

Changes

Cohort / File(s) Summary
Environment Configuration
\.env, \.env.development, \.env.production
Enabled three yield feature flags in .env and removed them from development/production files, consolidating feature flag declarations.
Route Configuration
src/Routes/RoutesCommon.tsx
Added /yields/* public route (icon: TbTrendingUp, main: YieldsPage) gated by VITE_FEATURE_YIELD_XYZ and VITE_FEATURE_YIELDS_PAGE; adjusted History route to use hide: true; updated react-icons/tb import.
Mobile Navigation / UI
src/pages/Dashboard/components/DashboardHeader/MobileUserHeader.tsx
Added history IconButton (uses TimeIcon), navigation to /history, and haptic feedback on press.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • premiumjibles

Poem

🐰
I nudged the flags and watched things grow,
A route hops in where earners go,
A tiny button — history's gate,
I tap, it hums, we navigate,
Carrot cheers for code in flow 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: enable /yields route' directly matches the main objective of the PR, which is to enable the /yields route as a first-class navigation item on mobile.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat_yield_full_toggle_2

No actionable comments were generated in the recent review. 🎉


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.

gomesalexandre and others added 3 commits January 26, 2026 14:53
Match the icon used in desktop Yields menu.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The history page was removed when replacing the mobile nav tab.
Add it back as a hidden route so it remains accessible via URL.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Match the exact icon used in desktop Earn -> Yields menu.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@gomesalexandre gomesalexandre marked this pull request as ready for review January 27, 2026 01:12
@gomesalexandre gomesalexandre requested a review from a team as a code owner January 27, 2026 01:12
Base automatically changed from feat_yield_full_toggle_1 to develop January 27, 2026 22:34
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.env:
- Around line 310-314: Reorder the yield-related env vars so dotenv-linter
ordering passes by moving VITE_FEATURE_YIELD_XYZ to appear after the other yield
entries; specifically update the block containing VITE_FEATURE_YIELDS_PAGE,
VITE_YIELD_XYZ_API_KEY, and VITE_FEATURE_YIELD_MULTI_ACCOUNT so that
VITE_FEATURE_YIELD_XYZ comes after them (preserve existing values and
formatting).

Copy link
Collaborator

@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.

@NeOMakinG NeOMakinG enabled auto-merge (squash) February 10, 2026 14:07
@NeOMakinG NeOMakinG merged commit 96c7274 into develop Feb 10, 2026
4 checks passed
@NeOMakinG NeOMakinG deleted the feat_yield_full_toggle_2 branch February 10, 2026 14:08
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