From d5a8f36b35f93465a7c80b9192c0d92fe9643060 Mon Sep 17 00:00:00 2001 From: Saravana Achu Mac Date: Wed, 6 May 2026 14:04:24 -0700 Subject: [PATCH] refactor(ui): migrate positions workflow controls --- web/src/tabs/PositionsTab.tsx | 311 +++++++++++++++++++--------------- 1 file changed, 177 insertions(+), 134 deletions(-) diff --git a/web/src/tabs/PositionsTab.tsx b/web/src/tabs/PositionsTab.tsx index 5c60a14..cd60f35 100644 --- a/web/src/tabs/PositionsTab.tsx +++ b/web/src/tabs/PositionsTab.tsx @@ -7,6 +7,7 @@ import { createRequestId } from '../../../shared/request-id.js'; import { Layers, ListFilter, Link2, GitBranch, AlertTriangle, Lock, RefreshCw, CheckCircle, XCircle } from 'lucide-react'; import { useCanonicalLifecycle } from '../hooks/useCanonicalLifecycle'; import { fetchPositionsBootstrap } from '../lib/positionsApi'; +import { Button, Input, Select } from '../components/ui/Primitives'; interface PositionsTabProps { botState: BotState; @@ -1291,26 +1292,32 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
- - {profiles.map(p => ( - + + {profiles.map(p => ( + ))}
@@ -1587,52 +1594,64 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) = Profile + Date filters - - - -
- setOrdersDateFrom(e.target.value)} - className="bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] text-gray-200 focus:outline-none focus:ring-2 focus:ring-orange-500/40" - /> - setOrdersDateTo(e.target.value)} - className="bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] text-gray-200 focus:outline-none focus:ring-2 focus:ring-orange-500/40" - /> -
- - -
-
- + setOrdersDateFrom(e.target.value)} + controlSize="sm" + variant="muted" + className="bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] text-gray-200 focus:outline-none focus:ring-2 focus:ring-orange-500/40" + /> + setOrdersDateTo(e.target.value)} + controlSize="sm" + variant="muted" + className="bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] text-gray-200 focus:outline-none focus:ring-2 focus:ring-orange-500/40" + /> +
+ + +
+ + Sorting is applied by time on this table. @@ -1775,23 +1794,29 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) = -{Math.min(ordersPage * ORDER_ACTIVITY_PAGE_SIZE, sortedOrdersForActivity.length)} of {sortedOrdersForActivity.length}
- + Page {ordersPage} / {ordersTotalPages} - +
@@ -1836,52 +1861,64 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) = Profile + Date filters - + setLifecycleDateFrom(e.target.value)} - className="bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] text-gray-200 focus:outline-none focus:ring-2 focus:ring-cyan-500/40" - /> - setLifecycleDateTo(e.target.value)} - className="bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] text-gray-200 focus:outline-none focus:ring-2 focus:ring-cyan-500/40" - /> -
- - + setLifecycleDateFrom(e.target.value)} + controlSize="sm" + variant="muted" + className="bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] text-gray-200 focus:outline-none focus:ring-2 focus:ring-cyan-500/40" + /> + setLifecycleDateTo(e.target.value)} + controlSize="sm" + variant="muted" + className="bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] text-gray-200 focus:outline-none focus:ring-2 focus:ring-cyan-500/40" + /> +
+ +
@@ -1992,23 +2029,29 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) = -{Math.min(lifecyclePage * TRACE_PAGE_SIZE, sortedLifecycleTraces.length)} of {sortedLifecycleTraces.length}
- + Page {lifecyclePage} / {lifecycleTotalPages} - +