Skip to content

fix(market): hide extended stats columns for compact spot categories(OK-53080)#11204

Merged
originalix merged 13 commits intoxfrom
fix/market-hide-spot-extended-stats-desktop
Apr 15, 2026
Merged

fix(market): hide extended stats columns for compact spot categories(OK-53080)#11204
originalix merged 13 commits intoxfrom
fix/market-hide-spot-extended-stats-desktop

Conversation

@limichange
Copy link
Copy Markdown
Contributor

@limichange limichange commented Apr 14, 2026

Summary

  • Hide extended stats columns (transactions, uniqueTraders, holders, tokenAge) on desktop market layout for spot categories with limited OKX API data
  • Categories trending and x_mentioned retain full stats; other thematic categories (ai, stock, metal, etc.) show compact view
  • Added unit tests for the new shouldHideSpotExtendedStats utility function

Intent & Context

Spot categories backed by per-token OKX detail APIs only expose a compact metric set. The desktop list pages now conditionally hide extended stats columns to match watchlist behavior and avoid displaying empty/unavailable data.

Design Decisions

  • Used a Set for O(1) lookup of categories with full stats (trending, x_mentioned)
  • Exported COMPACT_SPOT_HIDDEN_DESKTOP_COLUMNS as a constant array with as const for type safety
  • Used useMemo with selectedCategory dependency to avoid unnecessary re-renders

Changes Detail

  • utils.ts: Added shouldHideSpotExtendedStats() function and COMPACT_SPOT_HIDDEN_DESKTOP_COLUMNS constant
  • utils.test.ts: Added comprehensive test coverage for the new utility
  • DesktopLayout.tsx: Integrated column hiding logic using memoized hiddenSpotDesktopColumns

Risk Assessment

  • Risk Level: Low
  • Affected Platforms: Desktop
  • Risk Areas: Only affects desktop market view column visibility; no data logic changes

Test plan

  • Open Market page on desktop
  • Select trending category - verify all columns visible
  • Select x_mentioned category - verify all columns visible
  • Select ai or other thematic category - verify extended stats columns are hidden
  • Verify unit tests pass: yarn test utils.test.ts

Open with Devin

…OK-53080)

Categories backed by per-token OKX detail APIs only expose a compact
metric set, so desktop list pages now hide extended stats columns
(transactions, uniqueTraders, holders, tokenAge) to match watchlist
behavior. Categories with full stats (trending, x_mentioned) remain
unchanged.
@revan-zhang
Copy link
Copy Markdown
Contributor

revan-zhang commented Apr 14, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@originalix originalix disabled auto-merge April 15, 2026 00:36
@originalix originalix merged commit 6394eab into x Apr 15, 2026
12 checks passed
@originalix originalix deleted the fix/market-hide-spot-extended-stats-desktop branch April 15, 2026 00:36
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.

4 participants