Trading push approval + IBroker refactor + UTA e2e#72
Merged
luokerenx4 merged 4 commits intomasterfrom Mar 18, 2026
Merged
Conversation
…ne is the single source Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Hollow out tradingPush tool so AI cannot execute trades directly — it now returns pending status and tells the user to approve in the UI. Add POST /accounts/:id/wallet/push REST endpoint for the frontend to call directly, and a PushApprovalPanel component on the chat page that polls for pending commits and provides an "Approve & Push" button. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add TradingGit.reject(reason?) that records a user-rejected commit so the AI can see which operations were denied and why. New REST endpoint POST /accounts/:id/wallet/reject. Rewrite PushApprovalPanel: reject button, inline push confirmation, buy/sell color coding, commit history below pending section with status badges and relative timestamps. Panel stays visible when trading accounts exist (no layout jump). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
TradingGit.restore() now rebuilds Decimal instances (Order.totalQuantity, Position.quantity, closePosition.quantity) lost during JSON round-trip, fixing "qty.equals is not a function" crash on walletLog after restart. Add standalone UTA-level e2e test for Bybit (uta-ccxt-bybit.e2e.spec.ts) covering full lifecycle (stage→commit→push→sync→close) and reject flow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
tradingPushtool so AI can't execute trades directly. NewPushApprovalPanelon the chat page right sidebar with approve/reject buttons, inline confirmation, buy/sell color coding, and commit historyTradingGit.reject(reason?)records auser-rejectedcommit so AI can see denied operations intradingLogTradingGit.restore()now rebuilds Decimal instances lost during JSON round-trip, fixingqty.equals is not a functioncrashproviderfield, added genericmeta<TMeta>, movedaliceIdfrom broker layer to UTA layerTest plan
pnpm build— type check passespnpm test— 856 unit tests passuta-lifecycle.e2e— 10 MockBroker tests passuta-ccxt-bybit.e2e— 3 tests pass (full lifecycle + reject with/without reason)user-rejectedstatus → AI sees it via tradingLog🤖 Generated with Claude Code