Skip to content

feat(TransactionHistory): add fee total, multi-op filter, and 7-day trend - #416

Merged
k-deejah merged 1 commit into
Sorokit:mainfrom
KayProject:feat/transaction-history-fee-total-multiop-trend
Jul 29, 2026
Merged

feat(TransactionHistory): add fee total, multi-op filter, and 7-day trend#416
k-deejah merged 1 commit into
Sorokit:mainfrom
KayProject:feat/transaction-history-fee-total-multiop-trend

Conversation

@KayProject

Copy link
Copy Markdown
Contributor

Resolves #403

What this adds

1. Total fee footer. The card footer now sums feePaid across the displayed transactions and shows the stroops total with an XLM approximation (1 XLM = 10,000,000 stroops). Values that don't parse are skipped rather than poisoning the sum into NaN.

2. "Multi-op" filter toggle. A toggle beside the status filters narrows the list to transactions with operationCount > 1. It carries aria-pressed so its state is exposed to assistive tech. The fee total recomputes from the filtered set, so the number always describes what's on screen.

3. showTrend prop. Opt-in 7-day activity sparkline in the card header, rendered as height-scaled bars with a role="img" summary label and a per-bar tooltip.

Implementation notes

  • Buckets compare local midnights, not raw timestamps. Comparing raw times put a transaction created later the same day into the previous bucket, so "today" undercounted; the tests cover that case.
  • Bars use Math.max(..., 8) for a minimum height so a low-but-nonzero day is still visible, with empty days rendered in bg-surface-2.
  • The fee total only renders when there are rows to describe.

Verification

npx vitest run src/components/TransactionHistory.test.tsx29 passed, including 7 new cases covering the fee sum, unparseable fees, the multi-op toggle round-trip, total-follows-filter, and sparkline bucketing/scaling.

Full-suite check for regressions:

Test files Tests
main (5bc3678) 24 failed / 51 passed 61 failed / 945 passed
this branch 24 failed / 51 passed 61 failed / 952 passed

Identical failure counts, +7 passing — no regressions.

Heads-up on the build AC

npm run build does not currently pass on main, for reasons unrelated to this change: src/components/FeeEstimator.tsx and src/components/SorobanPanel.tsx each contain an unclosed block left by a merge, which also accounts for the 61 pre-existing test failures above. Happy to open a separate PR repairing those two files if that's useful.

ESLint is clean on both changed files.

…rend

Gives cost auditors and power users a summary of what the displayed history
actually cost and how active the account has been.

- Footer sums `feePaid` across the displayed transactions and shows the
  stroops total alongside an XLM approximation. Unparseable fees are skipped
  so a bad value can't render NaN.
- "Multi-op" toggle filters the list to transactions with more than one
  operation; the fee total follows the filtered set.
- New `showTrend` prop renders a 7-day activity sparkline in the header,
  bucketed by local calendar day.

Resolves Sorokit#403
@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@KayProject 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

@k-deejah
k-deejah merged commit 09b588f into Sorokit:main Jul 29, 2026
2 of 4 checks 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

Development

Successfully merging this pull request may close these issues.

feat(TransactionHistory): no total fee footer, no multi-op filter, no sparkline trend indicator

2 participants