feat(alerts): price alert configuration UI (#1057) - #1078
Merged
Merged
Conversation
|
@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! 🚀 |
…accesslayer-client into feat/1057-price-alert-ui # Conflicts: # src/pages/CreatorDetailPage.tsx
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 verifiedby
src/services/__tests__/priceAlerts.test.ts— this PR only adds the UI layerthat was missing.
Scope
(handled by the existing
processPriceAlertsservice)(handled by the existing
PATCH /alerts/:alertId/triggeredcall)Changes
src/services/alert.service.ts— addcreateAlert,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 inputwith validation that rejects a target on the wrong side of the current price
src/components/common/PriceAlertButton.tsx— "Set price alert" button + modalsrc/components/common/ActivePriceAlertsList.tsx— list with edit and deletesrc/pages/CreatorDetailPage.tsx— renders<PriceAlertButton>next to the Buy buttonsrc/pages/ProfilePage.tsx— new "Price Alerts" tab that renders the listAcceptance criteria
—
validateTargetPricerejects an "above" target ≤ current and a "below"target ≥ current
—
ActivePriceAlertsListfetches fromGET /alerts?userId=...&active=true—
useUpdatePriceAlert→PATCH /alerts/:idand refetches the list— optimistic removal in
useDeletePriceAlert.onMutate— existing
processPriceAlertscovers this; seesrc/services/__tests__/priceAlerts.test.tsNotes
not touch that path.