Skip to content

Commit cb11b1d

Browse files
Pigbibicursoragent
andcommitted
Fix strategy switch console boot hang by adding missing section ids.
renderControls toggles income-layer and option-overlay visibility by id; without those ids render() threw and blocked boot from completing. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent c9b14cd commit cb11b1d

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

tests/strategy_switch_worker_validation.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ assert.ok(indexHtml.includes('class="form-section execution-cash-policy-section"
4343
assert.ok(indexHtml.includes('function reconcileExecutionCashPolicy('));
4444
assert.ok(indexHtml.includes('qmt: { label: "QMT"'));
4545
assert.ok(indexHtml.includes('cn_industry_etf_rotation'));
46-
assert.ok(indexHtml.includes('platformDryRunOnly'));
46+
assert.ok(indexHtml.includes('id="income-layer-section"'));
47+
assert.ok(indexHtml.includes('id="option-overlay-section"'));
48+
assert.ok(indexHtml.includes('id="mode-meta"'));
4749
assert.ok(indexHtml.includes('qmtDryRunOnlyNote'));
4850
assert.ok(indexHtml.includes('cashOnlyExecutionMode: "允许融资"'));
4951
assert.ok(indexHtml.includes('cashOnlyExecutionValueYes: "允许融资:是"'));

web/strategy-switch-console/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,7 @@ <h2 id="platform-title">LongBridge</h2>
13651365
</label>
13661366
</div>
13671367

1368-
<div class="form-section income-layer-section">
1368+
<div class="form-section income-layer-section" id="income-layer-section">
13691369
<label class="control-block income-layer-mode-block section-wide">
13701370
<span data-i18n="incomeLayerMode">收入层状态</span>
13711371
<select id="income-layer-mode-select"></select>
@@ -1385,7 +1385,7 @@ <h2 id="platform-title">LongBridge</h2>
13851385
</label>
13861386
</div>
13871387

1388-
<div class="form-section option-overlay-section">
1388+
<div class="form-section option-overlay-section" id="option-overlay-section">
13891389
<label class="control-block option-overlay-mode-block section-wide">
13901390
<span data-i18n="optionOverlayMode">期权层状态</span>
13911391
<select id="option-overlay-mode-select"></select>

web/strategy-switch-console/page_asset.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)