Skip to content

feat(creator-economy): full history since the Hive fork (25 quarters)#1074

Merged
feruzm merged 2 commits into
developfrom
feature/creator-economy-14-quarters
Jul 3, 2026
Merged

feat(creator-economy): full history since the Hive fork (25 quarters)#1074
feruzm merged 2 commits into
developfrom
feature/creator-economy-14-quarters

Conversation

@feruzm

@feruzm feruzm commented Jul 3, 2026

Copy link
Copy Markdown
Member

Extends /creator-economy from six quarters to the complete record: Q2 2020 (first full quarter after the Hive fork) through Q2 2026.

  • Dense trend charts render as lines (new LineChart server component; columns remain for short series and community bars). Year ticks on the x-axis, selective first/peak/last value labels, table views carry every number.
  • VESTS-era rewards convert with each quarter's historical chain ratio sampled from on-chain fill_vesting_withdraw operations (exact), replacing the current-ratio approximation that overstated early years by up to 10 percent. Applies to author and curation figures alike.
  • Curation section now spans every quarter.
  • Older HIVE prices from Binance daily closes (the free price API's history limit); HBD at peg for those windows; Q2 2020 averages the post-listing portion of the quarter.

The arc the page now shows: quarterly USD value 730k to 2.28M (Q4 2021) to 99k today; earning authors 12.6k to 19.3k to 5.1k; curation HP stable at 2.3-3.3M every quarter for six years; roughly 18M USD cumulative to authors since the fork.

Rendered and reviewed at 25 points in both themes; web suite green.

Summary by CodeRabbit

  • New Features
    • Added adaptive trend charts on the creator economy page, switching to a line view for longer time ranges while keeping column charts for shorter ones.
    • Improved chart readability with denser layouts, clearer labels, and better visual styling in light and dark modes.
  • Content Updates
    • Refreshed the creator economy quarter data to show updated values across multiple time periods.

Extends the report from six quarters to the complete record, Q2 2020 (the
first full quarter after the fork) through Q2 2026:

- Trend charts switch to line form past 12 quarters (new LineChart server
  component: 2px round-join stroke, ringed end dot, area wash for single
  series, year ticks, selective first/peak/last labels). Columns stay for
  short series and the community bars.
- VESTS-era rewards now convert with each quarter's HISTORICAL chain ratio,
  sampled from fill_vesting_withdraw operations on-chain (exact conversions),
  replacing the current-ratio approximation that overstated early years by up
  to 10 percent.
- Curation figures cover every quarter (full-history index).
- 2020-2024 HIVE prices from Binance daily closes; HBD at peg for those
  windows; Q2 2020 averages the post-listing part of the quarter.

Headline arc: quarterly USD value 730k -> 2.28M (Q4 2021) -> 99k; earning
authors 12.6k -> 19.3k -> 5.1k; curation HP stable at 2.3-3.3M per quarter
across the entire six years; cumulative ~18M USD to authors since the fork.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c0db2b49c2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"hive": 0,
"hp": 1021828,
"usd": 651405,
"hp": 981502,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update the methodology for historical VESTS conversion

This changed Q1 2025 HP total, along with the other pre-2026 HP/USD values, no longer matches the current-ratio method described by the rendered methodology; apps/web/src/features/i18n/locales/en-US.json:2710 still tells readers that VESTS before 2026 are converted with the current chain ratio. Since the report now uses historical chain ratios, the public methodology is inaccurate for the historical series and should be updated with the data change.

Useful? React with 👍 / 👎.

@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown

Greptile Summary

Extends the creator-economy page from 6 quarters to the full 25-quarter history (Q2 2020–Q2 2026), adding a new LineChart server component for dense time series and correcting VESTS-era HP rewards with per-quarter historical chain ratios instead of the current-ratio approximation.

  • New LineChart component switches charts from column to line rendering when there are more than 12 data points; renders a year-tick x-axis, selective first/peak/last value labels, a 10%-opacity area wash for single-series, and an end dot with surface ring — all as zero-JS server SVG.
  • 19 new quarter objects added to quarters.json with consistent schema (including curation on every quarter); existing recent quarters revised with corrected historical HP conversion factors; --ce-surface CSS variable added to support the end-dot ring in both themes.
  • methodology-4 i18n string updated to accurately describe the per-quarter historical ratio conversion approach.

Confidence Score: 5/5

Safe to merge. The change is purely additive static-data and a new server-only SVG component with no client-side JavaScript.

All four trend charts correctly switch to LineChart via the quarters.length > 12 guard. The LineChart handles year ticks, label collision avoidance, lastIdx bounding, and the --ce-surface variable for the end-dot ring. The data expansion is consistent across all 25 quarter entries. Previous review concerns (year-tick anchor at i=0, lastIdx derivation) are addressed in this PR.

No files require special attention.

Important Files Changed

Filename Overview
apps/web/src/app/(staticPages)/creator-economy/_components/charts.tsx Adds LineChart server component with year-tick axis, selective labels, area fill, and end-dot; updates ColumnChart for dense-series density handling. Logic is sound; addressed the lastIdx and year-tick clip concerns from prior review.
apps/web/src/app/(staticPages)/creator-economy/_data/quarters.json Adds 19 quarters (Q2 2020–Q4 2024) and revises recent quarters with corrected per-quarter historical HP conversion ratios. Schema consistent across all entries; all quarters include curation objects enabling the full-history curation chart.
apps/web/src/app/(staticPages)/creator-economy/page.tsx Introduces the Trend variable (LineChart vs ColumnChart selected by quarters.length > 12), adds --ce-surface CSS variable for the end-dot ring, and switches all four trend charts to Trend. Clean and correct.
apps/web/src/features/i18n/locales/en-US.json methodology-4 string updated to correctly describe per-quarter historical chain ratio sampling instead of the prior current-ratio approximation. English-only change as expected per project convention.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[quarters.json\n25 quarters Q2-2020→Q2-2026] --> B[page.tsx\nCreatorEconomyPage]
    B --> C{quarters.length > 12?}
    C -->|Yes - 25 quarters| D[Trend = LineChart]
    C -->|No| E[Trend = ColumnChart]
    D --> F[USD Rewards Chart]
    D --> G[Earning Authors Chart]
    D --> H[Content Chart\n2-series: posts + comments]
    D --> I[Curation HP Chart\ncurationTrend labels]
    B --> J[HBarChart\nTop Communities]
    B --> K[Full Data Table\naccessibility fallback]

    subgraph LineChart Logic
        L[n = labels.length] --> M[px = i to padX + i divided by n-1 times plotW]
        M --> N[Year ticks: i=0 or Q1 xx]
        N --> O[Selective labels: last/peak/first\ncollision window <= 2 steps]
        O --> P[End dot + surface ring]
        P --> Q[Area wash 10% single-series only]
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[quarters.json\n25 quarters Q2-2020→Q2-2026] --> B[page.tsx\nCreatorEconomyPage]
    B --> C{quarters.length > 12?}
    C -->|Yes - 25 quarters| D[Trend = LineChart]
    C -->|No| E[Trend = ColumnChart]
    D --> F[USD Rewards Chart]
    D --> G[Earning Authors Chart]
    D --> H[Content Chart\n2-series: posts + comments]
    D --> I[Curation HP Chart\ncurationTrend labels]
    B --> J[HBarChart\nTop Communities]
    B --> K[Full Data Table\naccessibility fallback]

    subgraph LineChart Logic
        L[n = labels.length] --> M[px = i to padX + i divided by n-1 times plotW]
        M --> N[Year ticks: i=0 or Q1 xx]
        N --> O[Selective labels: last/peak/first\ncollision window <= 2 steps]
        O --> P[End dot + surface ring]
        P --> Q[Area wash 10% single-series only]
    end
Loading

Reviews (2): Last reviewed commit: "review: methodology wording for historic..." | Re-trigger Greptile

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@feruzm, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 098d17b5-e722-4131-8be0-9af48932d19a

📥 Commits

Reviewing files that changed from the base of the PR and between c0db2b4 and d364249.

📒 Files selected for processing (2)
  • apps/web/src/app/(staticPages)/creator-economy/_components/charts.tsx
  • apps/web/src/features/i18n/locales/en-US.json
📝 Walkthrough

Walkthrough

ColumnChart gains dense-mode sizing and conditional cap labels; LineChart is replaced with an SVG trendline implementation using selective point labeling. The creator-economy page adds a Trend selector switching between LineChart and ColumnChart, updated CSS variables, and refreshed quarters.json dataset values across most quarters.

Changes

Creator Economy Charts and Data

Layer / File(s) Summary
ColumnChart dense mode and sizing
apps/web/src/app/(staticPages)/creator-economy/_components/charts.tsx
Bar width is derived from group width/series count, dense mode computes smaller font size and suppresses cap labels for multi-series charts, and SVG group keys now include group index.
LineChart trend rendering
apps/web/src/app/(staticPages)/creator-economy/_components/charts.tsx
LineChart is rewritten as a server-rendered SVG using px/py coordinates, selective year ticks, polyline/area wash, end dot, and collision-avoided peak/last/first labels.
Page wiring for Trend component
apps/web/src/app/(staticPages)/creator-economy/page.tsx
A Trend alias selects LineChart when quarters exceed 12, USD/authors/content/curation chart sections use Trend, and additional light/dark ce-viz CSS variables are added.
Quarters dataset refresh
apps/web/src/app/(staticPages)/creator-economy/_data/quarters.json
Rewards, perAuthorHp, content, topCommunities, curation, and hiveUsd values are updated across quarters from the dataset start through Q2 2026.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Page
  participant Trend
  participant LineChart
  participant ColumnChart
  Page->>Trend: pass quarters data
  alt quarters.length > 12
    Trend->>LineChart: render trend SVG
    LineChart->>LineChart: compute px/py, draw polyline/wash
    LineChart->>LineChart: place peak/last/first labels
    LineChart-->>Page: rendered chart
  else quarters.length <= 12
    Trend->>ColumnChart: render bar chart
    ColumnChart->>ColumnChart: compute barW, dense mode, fontSize
    ColumnChart-->>Page: rendered chart
  end
Loading

Possibly related PRs

  • ecency/vision-next#1065: Modifies the same creator-economy/_components/charts.tsx ColumnChart logic and creator-economy page trend rendering over quarters.json.

Poem

A rabbit charts the quarters bright,
Bars grow dense, lines take flight,
Trend picks the shape that fits just right,
Numbers refreshed through day and night,
Hop hop hooray, the graphs delight! 🐰📈

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: extending creator-economy history to the full Hive-fork quarter range.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/creator-economy-14-quarters

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.

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/web/src/app/(staticPages)/creator-economy/page.tsx (1)

53-54: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Choose the trend renderer from the chart’s own label count.

Trend is selected from quarters.length, but the curation chart passes curationTrend labels after filtering missing quarters. If that filtered series has 12 or fewer points, it still renders as a line chart. Tie the choice to props.labels.length.

Proposed fix
-  // Columns stop working past ~12 groups; dense series render as trend lines.
-  const Trend = quarters.length > 12 ? LineChart : ColumnChart;
+  // Columns stop working past ~12 groups; dense series render as trend lines.
+  const Trend = (props: Parameters<typeof ColumnChart>[0]) => {
+    const Chart = props.labels.length > 12 ? LineChart : ColumnChart;
+    return <Chart {...props} />;
+  };

Also applies to: 240-243

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/app/`(staticPages)/creator-economy/page.tsx around lines 53 -
54, The Trend renderer in the creator economy chart is currently chosen from the
raw quarters array, which can mismatch the actual chart data after filtering.
Update the selection logic in the chart component that uses Trend so it keys off
the chart’s own label count, specifically the props.labels length for the
curation trend series, and apply the same fix anywhere the same Trend/quarters
logic is reused.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/web/src/app/`(staticPages)/creator-economy/_components/charts.tsx:
- Around line 199-207: The label selection logic in charts.tsx is still allowing
adjacent peak and last labels to render together because the current Set-based
ordering always keeps lastIdx. Update the label selection in the series.map
block to prioritize lastIdx first, then peakIdx, then 0, and filter out any
candidate that falls within the collision window around an already kept label.
Apply the same ordering/collision handling to the duplicate label logic in the
other affected block so peak and last labels don’t overlap.

---

Nitpick comments:
In `@apps/web/src/app/`(staticPages)/creator-economy/page.tsx:
- Around line 53-54: The Trend renderer in the creator economy chart is
currently chosen from the raw quarters array, which can mismatch the actual
chart data after filtering. Update the selection logic in the chart component
that uses Trend so it keys off the chart’s own label count, specifically the
props.labels length for the curation trend series, and apply the same fix
anywhere the same Trend/quarters logic is reused.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e786a41f-a3d7-4559-83ae-0c3f918afd6f

📥 Commits

Reviewing files that changed from the base of the PR and between 37a289e and c0db2b4.

📒 Files selected for processing (3)
  • apps/web/src/app/(staticPages)/creator-economy/_components/charts.tsx
  • apps/web/src/app/(staticPages)/creator-economy/_data/quarters.json
  • apps/web/src/app/(staticPages)/creator-economy/page.tsx

Comment thread apps/web/src/app/(staticPages)/creator-economy/_components/charts.tsx Outdated
…hardening

- Methodology now states VESTS-era amounts convert with each quarter's
  historical chain ratio (Codex: the text still described the old
  current-ratio method after the data switched).
- First year tick anchors start so it cannot clip the left edge (Greptile).
- Last-point index bounded by both labels and values lengths, making the
  equal-length contract explicit (Greptile).
- Selective labels pick by priority (last > peak > first) with a collision
  window, so an end-adjacent peak cannot overlap the last label (CodeRabbit).
@feruzm feruzm merged commit 1e65b19 into develop Jul 3, 2026
7 checks passed
@feruzm feruzm deleted the feature/creator-economy-14-quarters branch July 3, 2026 10:50
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