Surface pair controls above asset catalog
Some checks failed
deploy / deploy (push) Failing after 43s

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.
This commit is contained in:
philipp 2026-05-13 13:05:22 +02:00
parent da2202c455
commit acdc3c061e
2 changed files with 12 additions and 5 deletions

View file

@ -474,7 +474,7 @@ function PairConfigSection({ assetCatalog, pairConfig, onControl }) {
<div className="panel-head">
<div>
<div className="eyebrow">Pair config</div>
<h3>Directed pairs and active strategy versions</h3>
<h3>Add, pause, and tune directed pairs</h3>
<div className="panel-subtitle">
Loaded {pairConfig?.loaded_at ? formatTimestamp(pairConfig.loaded_at) : 'unavailable'}
</div>
@ -527,7 +527,7 @@ function PairConfigSection({ assetCatalog, pairConfig, onControl }) {
</div>
<div className="button-row">
<button className="button" disabled={!assets.length || pairForm.asset_in === pairForm.asset_out} type="submit">
Activate pair mode
Add / activate pair
</button>
</div>
</form>
@ -645,10 +645,10 @@ export default function StrategyPage({ strategy, onControl }) {
</div>
</section>
<AssetCatalogSection assetCatalog={strategy.asset_catalog} onControl={onControl} />
<PairConfigSection assetCatalog={strategy.asset_catalog} pairConfig={strategy.pair_config} onControl={onControl} />
<AssetCatalogSection assetCatalog={strategy.asset_catalog} onControl={onControl} />
<section className="panel">
<div className="panel-head">
<div>

View file

@ -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('<PairConfigSection') < strategySource.indexOf('<AssetCatalogSection'),
);
});
test('system page exposes deduped environmental conditions history', () => {
assert.match(systemSource, /Environmental conditions/);