Repository navigation
feat: Frontend UI enhancements — Toasts, Wallet Modal, Trading Interface & Activity Feed - #285
Merged
parkerwinner merged 4 commits intoJul 29, 2026
Conversation
Adds an in-app toast system with a headless store so any module can raise a notification without prop drilling. - lib/toast.ts: queue, variants (success/error/warning/info/loading), action buttons, per-variant auto-dismiss durations, update-by-id and toast.promise - ui/Toast.tsx: portal container with position/max-visible options, pause on hover or focus, overflow counter, reduced-motion friendly animations, and role=status / role=alert announcements - layout.tsx: mounts <ToastContainer /> in place of the sonner Toaster - migrates existing toast call sites to @/lib/toast (API-compatible) Closes parkerwinner#261
…r#244) Replaces the Freighter-only connect button with a multi-provider flow. - lib/wallet-providers.ts: registry for Freighter, Albedo, LOBSTR, xBull and Rabet with detection, connect, sign, disconnect, typed WalletError codes and localStorage-backed session restore - WalletModal.tsx: provider picker with detection badges, install links for missing wallets, per-provider connecting state, error handling, re-scan, plus a connected account view (copy address, disconnect) - WalletConnect.tsx: opens the modal, silently restores the previous session, and gains a compact `button` variant — existing props are unchanged - ui/dialog.tsx: shared Radix dialog primitive used by the modal Closes parkerwinner#244
Adds a trading ticket at /trade/[id]. - lib/trading.ts: order book types, quote maths (book walking, average fill price, platform + network fees, price impact, slippage limits, completion estimate), order submission and a WebSocket book subscription - OrderBook.tsx: bids/asks with depth bars, spread, click-to-fill pricing, loading/empty/error states - OrderForm.tsx: market and limit orders, slippage presets, live cost calculator, validation, imperative applyPrice for order book clicks - OrderConfirmModal.tsx: final review with fee breakdown, slippage limits and warnings for thin liquidity or high price impact - trade/[id]/page.tsx: asset summary, live/polling book updates, recent trades - websocket.ts: shared getWebSocketUrl() helper Sample depth is used (and clearly labelled) when the marketplace API is unavailable, matching the existing analytics page pattern. Closes parkerwinner#245
Adds a platform-wide activity feed. - hooks/useActivityFeed.ts: cursor pagination, type/asset filtering, live WebSocket updates with de-duplication, retained-event cap, and day grouping (Today / Yesterday / dated sections) - ActivityFeed.tsx: per-type icons and filter chips, sticky day headers, infinite scroll via the existing InfiniteScroll component, live status indicator, skeleton loading, empty and error states - activity/page.tsx: standalone /activity route so the feed is reachable Falls back to labelled sample events when the activity API is unavailable. Closes parkerwinner#268
|
@jayteemoney 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! 🚀 |
Owner
|
code reviewed |
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.
Summary
Four frontend features, one per commit, all built on the existing design system (shadcn-style primitives, CSS variables, light/dark) and branched from the current
main(e7fc3e8) so it merges cleanly.lib/toast.ts(queue, variants, actions, auto-dismiss,toast.promise) +ui/Toast.tsxportal container mounted in the root layout. The existingsonnercall sites were migrated to the new API (toast.success/toast.errorsignatures are unchanged).lib/wallet-providers.tsregistry for Freighter, Albedo, LOBSTR, xBull and Rabet with detection, connect/sign/disconnect, typed errors and session restore;WalletModal.tsxpicker + account view;WalletConnect.tsxnow opens the modal and keeps its original props./trade/[id]withOrderBook.tsx(depth bars, spread, click-to-fill),OrderForm.tsx(market/limit, slippage presets, live fee + price-impact calculator) andOrderConfirmModal.tsx(full breakdown, slippage limits, ETA, high-impact warnings). Pricing maths lives inlib/trading.ts.useActivityFeed.ts(cursor pagination, filtering, WebSocket updates with de-duplication, day grouping) +ActivityFeed.tsx(type filters, event icons, sticky day headers, infinite scroll) and a/activityroute so it's reachable.Notes for the reviewer
getWebSocketUrl()was added tolib/websocket.tsand is shared by the trade page and the activity feed; both reuse the existingWebSocketClient.components/ui/sonner.tsxis now unused. It was left in place on purpose to avoid conflicting with branches that still touch it — safe to delete in a follow-up.components/ui/dialog.tsx(Radix dialog primitive) and the existingInfiniteScrollcomponent is reused by the feed.Verification
npm run lintandnpx tsc --noEmit: no new errors or warnings — counts are identical tomainbefore this branch (36 errors / 34 warnings, all pre-existing).next buildcompiles the new code successfully (✓ Compiled successfully)./activityand/trade/<id>were rendered against a local dev server and return 200 with the expected markup.Pre-existing breakage on
main(not touched by this PR)These already fail on
e7fc3e8and are unrelated to these features — flagging them since they block a fully green build:src/hooks/useWebSocket.tscontains JSX (WSStatusBadge) in a.tsfile → parse/type error. Needs renaming to.tsx.src/components/charts/PieChart.tsxhas two recharts v3 typing errors (label,Tooltip formatter).next-intl@3doesn't support Next 16 (peer conflict requires--legacy-peer-deps), and at runtime every route 500s with "Couldn't find next-intl config file".Closes #261
Closes #244
Closes #245
Closes #268