Skip to content

feat(webapp): surface full expected profit breakdown on signal page#123

Closed
itamarreif wants to merge 1 commit into
mainfrom
itamarreif/feat/expected-profit-ui
Closed

feat(webapp): surface full expected profit breakdown on signal page#123
itamarreif wants to merge 1 commit into
mainfrom
itamarreif/feat/expected-profit-ui

Conversation

@itamarreif
Copy link
Copy Markdown
Contributor

Summary

All ExpectedProfitResponse fields were already returned by the API but only the total was shown. This PR exposes the remaining fields on the signal detail page:

  • Surplus section: adds per-token min USDC amounts (min_usdc_amount_a, min_usdc_amount_b) between each token surplus and the total, making the surplus → USDC conversion visible
  • Config section: adds a "Prices Used" subsection showing token_a/USDC, token_b/USDC, and ETH/USDC rates applied during signal generation

No backend or DB changes — frontend only.

Test plan

  • Open any signal detail page
  • Confirm Surplus section shows "Min USDC (TOKEN_A)" and "Min USDC (TOKEN_B)" rows between the token surpluses and the total
  • Confirm Config section shows "Prices Used" with three price rows
  • Verify values sum correctly: min_usdc_amount_a + min_usdc_amount_b ≈ min_total_amount_usdc

🤖 Generated with Claude Code

The ExpectedProfitResponse already includes per-token USDC amounts and
the prices used for conversion, but only the total was displayed. Now shows:

- Surplus section: min USDC amount for each token (before summing to total),
  making the conversion from token surplus → USDC explicit
- Config section: a "Prices Used" subsection with token_a/USDC, token_b/USDC,
  and ETH/USDC rates that were applied during signal generation

No backend changes — all fields were already returned by the API.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@itamarreif
Copy link
Copy Markdown
Contributor Author

Superseded by the full layout redesign in #122 — expected profit changes are included there.

@itamarreif itamarreif closed this Apr 18, 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.

1 participant