From acdc3c061e9cf0551aa2d56ffd847cc59004fca0 Mon Sep 17 00:00:00 2001 From: philipp Date: Wed, 13 May 2026 13:05:22 +0200 Subject: [PATCH] Surface pair controls above asset catalog Proof: npm test passed 174/174; npm run operator-dashboard:build passed; dashboard UI static test proves pair controls render before the long asset catalog table. Assumptions: The add-pair interface was present but hidden below the 163-row asset registry, so moving it above the catalog makes the existing DB-backed control discoverable without changing trading semantics. Still fake: no new price routes or liquidity discovery were added; non-current pairs without routes/config remain blocked from trading. --- src/operator-dashboard/static/pages/StrategyPage.jsx | 8 ++++---- test/operator-dashboard-ui-static.test.mjs | 9 ++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/operator-dashboard/static/pages/StrategyPage.jsx b/src/operator-dashboard/static/pages/StrategyPage.jsx index 801eed5..c1723f9 100644 --- a/src/operator-dashboard/static/pages/StrategyPage.jsx +++ b/src/operator-dashboard/static/pages/StrategyPage.jsx @@ -474,7 +474,7 @@ function PairConfigSection({ assetCatalog, pairConfig, onControl }) {
Pair config
-

Directed pairs and active strategy versions

+

Add, pause, and tune directed pairs

Loaded {pairConfig?.loaded_at ? formatTimestamp(pairConfig.loaded_at) : 'unavailable'}
@@ -527,7 +527,7 @@ function PairConfigSection({ assetCatalog, pairConfig, onControl }) {
@@ -645,10 +645,10 @@ export default function StrategyPage({ strategy, onControl }) {
- - + +
diff --git a/test/operator-dashboard-ui-static.test.mjs b/test/operator-dashboard-ui-static.test.mjs index f3c9ce7..3746508 100644 --- a/test/operator-dashboard-ui-static.test.mjs +++ b/test/operator-dashboard-ui-static.test.mjs @@ -66,12 +66,19 @@ test('asset registry table renders the loaded catalog without a hidden 20 row ca test('strategy page exposes pair activation, pause, edge, and deposit address controls', () => { assert.match(strategySource, /set-pair-mode/); assert.match(strategySource, /pause-pair/); - assert.match(strategySource, /Activate pair mode/); + assert.match(strategySource, /Add, pause, and tune directed pairs/); + assert.match(strategySource, /Add \/ activate pair/); assert.match(strategySource, /Edge bps for/); assert.match(strategySource, /deposit_address/); assert.match(strategySource, /Copy/); }); +test('pair controls are rendered before the long asset catalog table', () => { + assert.ok( + strategySource.indexOf(' { assert.match(systemSource, /Environmental conditions/);