From 95fc7755c3cffdbe46c5844576c2adc9fdc090ff Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Tue, 10 Nov 2026 00:20:11 +0800 Subject: [PATCH] feat(desk): serve switch targets from account options The Meridian strategies page read api/fixtures/switchTargets.ts: six invented accounts with known live modes, strategy labels and masked suffixes. Project the configured account options into qsl.desk.switch_targets.v1 instead. The console has no desk read for a target's live mode or deployed strategy, so both are unknown/never_read. A configured default_execution_mode or default_strategy_profile is a default, not an observation, and is never shown as the current value. Domains and the declared default execution mode come from configuration; the account suffix is masked and only emitted when a real account selector exists. Switching is not connected, so every row is switchable:false / switch_not_connected, and no stop/resume capability is claimed. Flips DESK_SOURCES.switchTargets to live; session, credentials and this endpoint are now the three live desk reads. --- tests/console_desk_mock_validation.mjs | 15 ++- tests/desk_switch_targets_validation.mjs | 93 +++++++++++++++++++ .../application/desk/switch_targets.js | 77 +++++++++++++++ .../frontend/src/desk/api/endpoints.ts | 2 +- web/strategy-switch-console/package.json | 2 +- web/strategy-switch-console/v2_asset_map.js | 42 ++++----- web/strategy-switch-console/worker.js | 4 + 7 files changed, 207 insertions(+), 28 deletions(-) create mode 100644 tests/desk_switch_targets_validation.mjs create mode 100644 web/strategy-switch-console/application/desk/switch_targets.js diff --git a/tests/console_desk_mock_validation.mjs b/tests/console_desk_mock_validation.mjs index 93a59919..a687d56e 100644 --- a/tests/console_desk_mock_validation.mjs +++ b/tests/console_desk_mock_validation.mjs @@ -185,16 +185,19 @@ assert.equal(resolveMockScenario("?mock=0", "ok"), null); assert.equal(resolveMockScenario("?page=overview", "fail"), "fail"); assert.equal(resolveMockScenario("?mock=\n \n \n \n
\n \n \n