Skip to content

chore: cleanup auto merchant#139

Merged
JoE11-y merged 1 commit intomainfrom
stellar-integrations
Apr 20, 2026
Merged

chore: cleanup auto merchant#139
JoE11-y merged 1 commit intomainfrom
stellar-integrations

Conversation

@JoE11-y
Copy link
Copy Markdown
Contributor

@JoE11-y JoE11-y commented Apr 20, 2026

Summary by CodeRabbit

  • New Features

    • Unlock progress indicator displays signing, proving, submitting, and confirming stages with elapsed time
    • Chain icons now appear in bridge interface
  • UI/UX Improvements

    • Orders page tabs relabeled to "My Ads" and "My Bridges"
    • Modal styling enhanced and locked during operations to prevent accidental closure
    • Toast notification styling updated
    • Improved token auto-selection for Stellar-to-Sepolia bridge routes
  • Bug Fixes

    • Lock/unlock modal remains open on errors to display failure state

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
proof-bridge-frontend Building Building Preview, Comment Apr 20, 2026 0:57am

@JoE11-y JoE11-y merged commit c301030 into main Apr 20, 2026
1 of 3 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 235aef8a-e646-4e44-bc34-94aad2effaf7

📥 Commits

Reviewing files that changed from the base of the PR and between dd0554f and 57037a8.

📒 Files selected for processing (11)
  • apps/auto-merchant-bot/src/api/trades.ts
  • apps/auto-merchant-bot/src/run.ts
  • apps/frontend/app/(app)/(auth-protected)/orders/page.tsx
  • apps/frontend/app/globals.css
  • apps/frontend/components/bridge-ui/BridgeTab.tsx
  • apps/frontend/components/bridge-ui/TradeAd.tsx
  • apps/frontend/components/orders/OrdersTable.tsx
  • apps/frontend/components/orders/UnlockProgress.tsx
  • apps/frontend/components/ui/sonner.tsx
  • apps/frontend/hooks/useNotifications.ts
  • apps/frontend/hooks/useTrades.ts

📝 Walkthrough

Walkthrough

The pull request restructures the Trade and TradeTokenSummary types in the API to use nested objects (route, chain), adds observability logging and updates backend logic accordingly, enhances the unlock flow with stage tracking and progress UI on the frontend, updates tab labels and adds chain icons, and improves toast and wallet modal styling.

Changes

Cohort / File(s) Summary
API Type Restructuring
apps/auto-merchant-bot/src/api/trades.ts
Added TokenKind type and restructured TradeTokenSummary to nest chain information in a chain object. Restructured Trade to nest adToken and orderToken under a route object containing id, and added routeId and createdAt fields.
Backend Observability
apps/auto-merchant-bot/src/run.ts
Updated poll-loop logging to emit trade count and per-trade metadata, and adjusted downstream control-flow logic to access chain/symbol details via the new nested trade.route.adToken.chain.* path.
Frontend Tab Labels
apps/frontend/app/(app)/(auth-protected)/orders/page.tsx
Changed tab display labels from "Incoming Orders"/"Outgoing Orders" to "My Ads"/"My Bridges".
Frontend Styling & Theming
apps/frontend/app/globals.css, apps/frontend/components/ui/sonner.tsx
Added CSS styling for Stellar wallets modal card appearance; refactored toast component styling with fixed dark color values, removed next-themes dependency, and expanded classNames for improved visual consistency.
Frontend Token Selection
apps/frontend/components/bridge-ui/BridgeTab.tsx
Introduced STELLAR_NATIVE_SYMBOLS preference list for Stellar-to-Sepolia routes, updated token auto-selection logic, and added chain selection dependencies to the useEffect hook.
Frontend Trade Display
apps/frontend/components/bridge-ui/TradeAd.tsx
Added chain icon rendering in the destination-chain row, with fallback placeholder when icon is unavailable.
Frontend Unlock Flow Enhancement
apps/frontend/components/orders/OrdersTable.tsx, apps/frontend/components/orders/UnlockProgress.tsx, apps/frontend/hooks/useTrades.ts
Introduced stage-based unlock progress tracking (UnlockProgress component), updated useUnLockFunds hook to emit stage callbacks (signing, proving, submitting, confirming), improved error handling with try/catch in confirmation flow, and prevented modal closure during in-flight operations.
Frontend Cleanup
apps/frontend/hooks/useNotifications.ts
Removed inline comments from useMarkNotificationRead handler.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • ProofBridge#27: Directly modifies Trade shape with route/routeId nesting and adds createdAt field, mirroring the core type restructuring in this PR.
  • ProofBridge#26: Updates the same frontend components (BridgeTab.tsx and TradeAd.tsx) affecting token-selection and trade-rendering logic.
  • ProofBridge#45: Modifies the same frontend components and hooks (TradeAd.tsx, OrdersTable.tsx, useTrades.ts) related to unlock flow and trade display.

Poem

🐰 The trades now nest with route delight,
Stages sing from signing into light,
Chains dance in icons, progress glows,
"My Ads" and "Bridges"—the platform grows! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch stellar-integrations

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant