Skip to content

feat: contract filters, unified active webhooks, distinct chart colours, and responsive axis labels - #328

Merged
Valreb001 merged 2 commits into
Tx-wats:mainfrom
daddygokings-art:feat/contract-filters-webhooks-chart-improvements
Oct 19, 2026
Merged

Valreb001 merged 2 commits into
Tx-wats:mainfrom
daddygokings-art:feat/contract-filters-webhooks-chart-improvements

Conversation

@daddygokings-art

Copy link
Copy Markdown
Contributor

Summary of Changes

  • Contract Filter Predicates & Integration (#228):
    • Rewrote hasAlertSinceLocalMidnight to check stored contract alerts on or after local midnight, falling back to lastAlertAt.
    • Wired applyContractFilter into ContractsClient to support ?filter=alerts-today and ?filter=webhooks.
    • Rendered a removable filter chip in ContractsClient to clearly indicate active filter states and allow quick clearing.
    • Updated dashboard "Alerts Today" tile link to /contracts?filter=alerts-today.
  • Unified Active Webhooks Definition (#227):
    • Defined active webhooks in hasActiveWebhooks / isActiveWebhook (lib/contractsApi.ts) and countActiveWebhooks (lib/dashboard.ts) as contracts that are enabled (enabled !== false && !paused) and have a non-empty webhook_url.
    • Used this unified definition across the dashboard tile count, dashboard links, and the applyContractFilter webhooks filter.
  • Accessible & Distinct Chart Series Colours (#226):
    • Replaced ambiguous shades of indigo in AlertActivityChart with distinct, accessible colors.
    • Used networkDotColors (#10b981 for mainnet, #eab308 for testnet, #a855f7 for futurenet) for network series.
    • Used RULE_META colors (#f59e0b for LargeTransfer, #6366f1 for FunctionCalled, #ef4444 for AdminFunctionCalled, #f43f5e for TransactionFailed, #71717a for AnyTransaction) for rule series.
    • Maintained contrast ratios exceeding 3:1 against card background and between series.
  • Responsive Axis Labels Without SVG Stretching (#225):
    • Removed <text> elements from within the stretched SVG in both chart implementations, separating labels into clean HTML flex containers below the SVG.
    • Added responsive spacing on 24-hour charts (displaying every 6th label on mobile, every 3rd on tablet, all on desktop) to eliminate label overlap.
    • Added Playwright e2e test in e2e/chart-responsive.spec.ts.

Closes #228
Closes #227
Closes #226
Closes #225

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@daddygokings-art 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

@Valreb001
Valreb001 merged commit 812ae3f into Tx-wats:main Oct 19, 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

2 participants