Skip to content

feat: add unique trader count stat to key detail analytics (#1020) - #1025

Merged
Chucks1093 merged 1 commit into
accesslayerorg:devfrom
daniella-techie:feat/1020-unique-trader-count-stat
Sep 27, 2026
Merged

Chucks1093 merged 1 commit into
accesslayerorg:devfrom
daniella-techie:feat/1020-unique-trader-count-stat

Conversation

@daniella-techie

@daniella-techie daniella-techie commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1020
Closes #1019
Closes #1021
Closes #1022

Summary

Adds a Unique Traders stat card to the Key Stats panel on the creator key detail page, alongside holders and total volume.

Changes

  • courseService.getKeyUniqueTraders(keyId) → GET /keys/:keyId/unique-traders, returning { uniqueTraders, uniqueTraders24hAgo }
  • useKeyUniqueTraders hook, refreshed every 5 minutes (staleTime and refetchInterval)
  • UniqueTradersStat cell rendered inside KeyStatsPanel:
    • Fixed-height value slot, with the skeleton shown only on the first load, so refreshes don't shift the layout
    • Accessible tooltip: "Number of distinct wallets that have bought or sold this key at least once."
    • 24h trend indicator (up/down/no change) with a screen-reader label; hidden when the previous value is unavailable
    • New keys with zero traders show 0 with a no-change trend
  • Panel grid updated to sm:grid-cols-4 xl:grid-cols-7 to fit the seventh cell
  • There is no key summary export in the codebase yet, so the "include in export" item is not applicable

Tests

  • UniqueTradersStat.test.tsx: value, up/down/flat trend, zero traders, missing previous value, tooltip, no layout shift, background refresh
  • useKeyUniqueTraders.test.tsx: 5-minute refresh config, refetch keeps previous data, disabled for an empty id
  • uniqueTraders.utils.test.ts: trend calculation
  • KeyStatsPanel.test.tsx updated for the new cell and grid

…erorg#1020)

Show distinct wallets that have bought or sold the key in the key stats
panel, refreshed every 5 minutes, with an accessible tooltip and a trend
indicator vs the previous 24 hours.
@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

@daniella-techie Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Chucks1093
Chucks1093 merged commit 78ee248 into accesslayerorg:dev Sep 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants