Skip to content

feat(alerts): price alert configuration UI (#1057) - #1078

Merged
Chucks1093 merged 9 commits into
accesslayerorg:devfrom
chidii:feat/1057-price-alert-ui
Oct 1, 2026
Merged

Chucks1093 merged 9 commits into
accesslayerorg:devfrom
chidii:feat/1057-price-alert-ui

Conversation

@chidii

@chidii chidii commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Closes #1057

Summary

Adds the creator key price alert configuration UI on top of the existing alert
backend. The notification trigger and auto-disable pipeline already exists in
processPriceAlerts (src/services/notification.service.ts) and is verified
by src/services/__tests__/priceAlerts.test.ts — this PR only adds the UI layer
that was missing.

Scope

  • Set alert button on the key detail page
  • Alert config modal: above/below direction, target price input
  • Active alerts list in user settings with edit and delete
  • In-app notification triggered when the alert condition is met
    (handled by the existing processPriceAlerts service)
  • Alert auto-disabled after triggering once
    (handled by the existing PATCH /alerts/:alertId/triggered call)

Changes

  • src/services/alert.service.ts — add createAlert, updateAlert, deleteAlert
    (POST /alerts, PATCH /alerts/:id, DELETE /alerts/:id)
  • src/lib/queryKeys.ts — alerts.detail(userId, alertId)
  • src/hooks/usePriceAlerts.ts — react-query hooks for list/create/update/delete;
    delete performs an optimistic cache update so the row disappears immediately
  • src/components/common/PriceAlertModal.tsx — direction radio + target price input
    with validation that rejects a target on the wrong side of the current price
  • src/components/common/PriceAlertButton.tsx — "Set price alert" button + modal
  • src/components/common/ActivePriceAlertsList.tsx — list with edit and delete
  • src/pages/CreatorDetailPage.tsx — renders <PriceAlertButton> next to the Buy button
  • src/pages/ProfilePage.tsx — new "Price Alerts" tab that renders the list

Acceptance criteria

  • Alert modal validates target price against current price direction
    — validateTargetPrice rejects an "above" target ≤ current and a "below"
    target ≥ current
  • Active alerts listed correctly in user settings
    — ActivePriceAlertsList fetches from GET /alerts?userId=...&active=true
  • Edit updates alert config correctly
    — useUpdatePriceAlert → PATCH /alerts/:id and refetches the list
  • Delete removes alert from list immediately
    — optimistic removal in useDeletePriceAlert.onMutate
  • In-app notification created correctly when price crosses threshold
    — existing processPriceAlerts covers this; see
    src/services/__tests__/priceAlerts.test.ts

Notes

  • The trigger + auto-disable was already implemented server-side; this PR does
    not touch that path.
  • No new dependencies.

@drips-wave

drips-wave Bot commented Sep 30, 2026

Copy link
Copy Markdown

@chidii 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 42b9e3d into accesslayerorg:dev Oct 1, 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

Development

Successfully merging this pull request may close these issues.

Implement creator key price alert configuration UI

2 participants