Skip to content

Claude/add reward cut graph hh3o x#618

Draft
rickstaa wants to merge 11 commits intolivepeer:mainfrom
rickstaa:claude/add-reward-cut-graph-Hh3oX
Draft

Claude/add reward cut graph hh3o x#618
rickstaa wants to merge 11 commits intolivepeer:mainfrom
rickstaa:claude/add-reward-cut-graph-Hh3oX

Conversation

@rickstaa
Copy link
Copy Markdown
Member

@rickstaa rickstaa commented Apr 4, 2026

Description

Type of Change

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation update
  • style: Code style/formatting changes (no logic changes)
  • refactor: Code refactoring (no behavior change)
  • perf: Performance improvement
  • test: Adding or updating tests
  • build: Build system or dependency changes
  • ci: CI/CD changes
  • chore: Other changes

Related Issue(s)

Related: #
Closes: # (only if it should auto-close)

Changes Made

Testing

  • Tested locally
  • Added/updated tests
  • All tests passing

How to test (optional unless test is not trivial)

Impact / Risk

Risk level: Low / Medium / High

Impacted areas: UI / API / DB / Infra / Config / ...

User impact: What changes for users (if any)?

Rollback plan: How to revert safely if this breaks (PR revert, flag off, config change, etc.)

Screenshots / Recordings (if applicable)

Additional Notes

claude added 11 commits April 4, 2026 00:05
Adds a dual-line chart (recharts) showing historical reward cut and fee
cut changes on the orchestrator detail page. Queries TranscoderUpdateEvents
from the subgraph filtered by orchestrator. Includes a warning banner
when large swings (50%+ points) are detected, helping delegators identify
potential bait-and-switch behavior.

https://claude.ai/code/session_01Su4CTFo3t3Q22rkZjFnfAS
Extends the chart line to the present day by appending a synthetic data
point with current values. This makes it visually clear how long the
current reward/fee cut has been in effect, rather than ending the chart
at the last change event.

https://claude.ai/code/session_01Su4CTFo3t3Q22rkZjFnfAS
Restructures RewardCutHistory to use the same Panel + CSS grid layout as
the homepage charts, making it ready for additional chart panels (fees
earned, reward payouts, etc). Moves the chart grid above the stat cards
so delegators see behavioral history first before current values.

https://claude.ai/code/session_01Su4CTFo3t3Q22rkZjFnfAS
Match ExplorerChart patterns exactly:
- Hidden tooltip (CustomContentOfTooltip) with values in header overlay
- Font size 13px on axis ticks (was 12px)
- Dots hidden by default (r: 0), activeDot r: 3
- Skeleton inside ResponsiveContainer for loading state
- useEffect sync for default values + onMouseLeave reset pattern
- Date format "MMM D" matching ExplorerChart's formatDateSubtitle

https://claude.ai/code/session_01Su4CTFo3t3Q22rkZjFnfAS
Show skeleton in both header values and chart area during Apollo loading
state, not just when data is empty. Move skeleton outside
ResponsiveContainer to avoid rendering non-recharts elements inside it.

https://claude.ai/code/session_01Su4CTFo3t3Q22rkZjFnfAS
Use the established amber warning pattern from URLVerificationBanner
($amber3 bg, $amber6 border, $amber11 text, FiAlertTriangle icon) instead
of custom red colors. Add role="alert" for accessibility. Simplify
warning text to be generic about cut changes rather than specifying
reward vs fee cut with exact percentages.

https://claude.ai/code/session_01Su4CTFo3t3Q22rkZjFnfAS
Move data fetching and malicious behavior detection out of the component
into a dedicated hook. Detection is now directional: only flags
increases (bad for delegators) of 50+ percentage points, not decreases
(which benefit delegators). An orch dropping from 100% to 0% reward cut
is positive and won't trigger a warning; raising from 0% to 50%+ will.

https://claude.ai/code/session_01Su4CTFo3t3Q22rkZjFnfAS
- Remove minWidth: 350 on mobile (only apply at @BP1 breakpoint) so the
  chart doesn't force horizontal overflow on small screens
- Add extra right padding (32px) to Panel for Y-axis label breathing room
- Change parent overflow from hidden to visible so axis labels aren't clipped

https://claude.ai/code/session_01Su4CTFo3t3Q22rkZjFnfAS
Increase YAxis width from 35 to 40 to accommodate the full '100%' label.

https://claude.ai/code/session_01Su4CTFo3t3Q22rkZjFnfAS
Move the amber warning banner from inside the chart component to
AccountLayout, between Profile and Delegate buttons. This eliminates
layout shift because the warning renders in the normal page flow at
the same time as other account data, rather than appearing after async
chart data loads and pushing content down.

The warning is now visible on all tabs (orchestrating, delegating,
history), not just the orchestrating tab. The chart component becomes
purely a visualization with no warning responsibility.

https://claude.ai/code/session_01Su4CTFo3t3Q22rkZjFnfAS
…t shift

Instead of a conditional banner that pushes content down when it appears,
show a small amber warning triangle icon inline in the chart header next
to the title. Hovering/tapping the icon reveals the full warning via
ExplorerTooltip. The chart panel border also turns amber as a subtle
visual cue. This causes zero layout shift since the icon is inside the
position:absolute header overlay.

https://claude.ai/code/session_01Su4CTFo3t3Q22rkZjFnfAS
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 4, 2026

@claude is attempting to deploy a commit to the Livepeer Foundation Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants