Skip to content

[Feature] Add TVL/balance trend sparkline to pool cards #142

Description

@grantfox-oss

Getting Started

  1. Fork the repository: https://github.com/JointSave-org/Joint_Save
  2. Clone your fork:
   git clone https://github.com/<your-username>/Joint_Save.git
   cd Joint_Save
  1. Create a new branch:
   git checkout -b feat/pool-card-trend-sparkline

Overview

Checked pool-card.tsx and confirmed there's no historical trend visualization at all — just the current balance as a static number. A small sparkline showing the pool's balance trajectory over time would give a much quicker sense of whether a pool is healthy and growing versus stagnant, especially useful on the Explore page when comparing pools.

Requirements

  • Periodically snapshot each pool's total balance (a lightweight scheduled job, or piggybacking on an existing activity write) into a new pool_balance_history table
  • Add a small sparkline (a tiny inline SVG or a minimal charting library already available in this project, like recharts) to pool-card.tsx showing the last 30 days of balance history
  • Should degrade gracefully for pools with little or no history (show a flat line or omit the sparkline entirely rather than a broken/empty chart)
  • Keep it lightweight — this is a small visual accent on a card, not a full analytics view

Acceptance Criteria

  • Sparkline renders correctly for a pool with real history
  • Pools with insufficient history don't show a broken or misleading chart
  • No noticeable performance impact on the Explore/My Groups grid when rendering many cards at once
  • Snapshot mechanism doesn't add significant load (reasonable interval, e.g. daily)

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSOfficial CampaignCampaign: Official Campaignhigh-complexityLarge scope, multiple systems/files. Needs planning

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions