Skip to content

Markets: table view with 24h price changes and chart links#121

Merged
asim merged 2 commits intomainfrom
copilot/update-markets-page-view
Feb 22, 2026
Merged

Markets: table view with 24h price changes and chart links#121
asim merged 2 commits intomainfrom
copilot/update-markets-page-view

Conversation

Copy link
Contributor

Copilot AI commented Feb 22, 2026

The markets page showed only current prices with no change data and no way to drill into charts. This adds 24h percentage changes, color-coded up/down indicators, and per-asset chart links.

Data layer (widgets/markets.go)

  • New PriceData struct: { Price, Change24h }
  • Crypto 24h changes fetched from CoinGecko (/api/v3/simple/price?include_24hr_change=true); cryptoGeckoIDs map translates tickers to CoinGecko IDs
  • Futures/commodities use RegularMarketChangePercent already returned by finance-go (Yahoo Finance)
  • New GetAllPriceData() function exposes enriched data; price_data.json persisted alongside prices.json

Page handler (markets/markets.go)

  • Replaced card grid with a table: Symbol · Price · 24h Change · Chart
  • chartLinks map routes crypto → CoinGecko, futures/commodities → Yahoo Finance
  • formatChange() renders +5.00% / -2.34% with .markets-change-up / .markets-change-down / .markets-change-neutral CSS classes

Styles (app/html/mu.css)

  • Added .markets-table, .markets-chart-link, and change color classes
  • Responsive: reduced font/padding on mobile; chart column remains accessible

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: asim <17530+asim@users.noreply.github.com>
Copilot AI changed the title [WIP] Update markets page to display price changes and links Markets: table view with 24h price changes and chart links Feb 22, 2026
Copilot AI requested a review from asim February 22, 2026 12:18
@asim asim marked this pull request as ready for review February 22, 2026 12:34
@asim asim merged commit 60d5e2d into main Feb 22, 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.

2 participants