Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions tests/strategy_switch_worker_validation.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ assert.equal(indexHtml.includes(".innerHTML"), false);
assert.ok(indexHtml.includes('<body class="app-loading">'));
assert.ok(indexHtml.includes('id="boot-screen"'));
assert.ok(indexHtml.includes('id="app-shell"'));
assert.ok(indexHtml.includes('id="runtime-authority-status"'));
assert.equal(indexHtml.includes('runtime-authority-status'), false);
assert.equal(indexHtml.includes('runtime-authority-notice'), false);
assert.equal(indexHtml.includes('P0–P6'), false);
assert.equal(indexHtml.includes('GitHub OAuth 保护'), false);
assert.equal(indexHtml.includes('Worker 端触发'), false);
assert.equal(indexHtml.includes('令牌保留在服务端'), false);
assert.ok(indexHtml.includes('id="control-plane-view-button"'));
assert.ok(indexHtml.includes('id="control-plane-view"'));
assert.ok(indexHtml.includes('id="control-plane-list"'));
Expand All @@ -84,10 +89,10 @@ assert.ok(indexHtml.includes('id="reconciliation-recovery-list"'));
assert.ok(indexHtml.includes('id="reconciliation-recovery-notice"'));
assert.ok(indexHtml.includes('requestJson("/api/reconciliation-recovery")'));
assert.ok(indexHtml.includes('data-reconciliation-recovery-confirm'));
assert.ok(indexHtml.includes('P0_CONTROL_PLANE_NOT_RUNTIME_WIRED'));
assert.ok(indexHtml.includes('window.__QSL_RUNTIME_AUTHORITY_STATUS__'));
assert.ok(indexHtml.includes('execution_metadata_is_runtime_authority'));
assert.ok(indexHtml.includes('P1–P3 non-live 数据获取仍需独立、精确的契约'));
assert.equal(indexHtml.includes('P0_CONTROL_PLANE_NOT_RUNTIME_WIRED'), false);
assert.equal(indexHtml.includes('window.__QSL_RUNTIME_AUTHORITY_STATUS__'), false);
assert.equal(indexHtml.includes('execution_metadata_is_runtime_authority'), false);
assert.equal(indexHtml.includes('P1–P3 non-live 数据获取仍需独立、精确的契约'), false);
assert.ok(indexHtml.includes('requestJson("/api/execution-evidence")'));
assert.ok(indexHtml.includes('requestJson("/api/adaptive-selection")'));
assert.equal(indexHtml.includes('missing_current_promotion_evidence_and_human_acceptance'), false);
Expand Down Expand Up @@ -212,8 +217,8 @@ assert.equal(indexHtml.includes('id="ibit-zscore-exit-mode-select"'), false);
assert.equal(indexHtml.includes("ibitZscoreExit"), false);
assert.equal(indexHtml.includes("ibit_zscore_exit_mode"), false);
assert.ok(indexHtml.includes('reservedCashDefault'));
assert.ok(indexHtml.includes('dryRun: "演练(不下单)"'));
assert.ok(indexHtml.includes('dryRun: "Dry run (no orders)"'));
assert.ok(indexHtml.includes('dryRun: "模拟运行"'));
assert.ok(indexHtml.includes('dryRun: "Simulated run"'));
assert.ok(indexHtml.includes('平台默认:0 {currency} / 0%'));
assert.equal(indexHtml.includes('比例沿用策略默认,通常 3%'), false);
assert.equal(indexHtml.includes('平台默认:max(0 {currency}, 3%)'), false);
Expand Down Expand Up @@ -262,6 +267,7 @@ assert.equal(bootstrapConfigResponse.headers.get("Content-Type"), "application/j
assert.equal(bootstrapConfigResponse.headers.get("X-Content-Type-Options"), "nosniff");
assert.ok(bootstrapConfigJs.includes("window.__PLATFORM_CONFIG__"));
assert.ok(bootstrapConfigJs.includes("window.__DEFAULT_STRATEGY_PROFILES__"));
assert.equal(bootstrapConfigJs.includes("window.__QSL_RUNTIME_AUTHORITY_STATUS__"), false);
assert.equal(bootstrapConfigJs.includes("ibkr-primary"), false);
assert.equal(bootstrapConfigJs.includes("longbridge-quant-sg-service"), false);
assert.equal(bootstrapConfigJs.includes('account_selector: "SG"'), false);
Expand Down
64 changes: 2 additions & 62 deletions web/strategy-switch-console/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,36 +137,6 @@
background: rgba(255, 255, 255, 0.7);
}

.runtime-authority-notice {
display: grid;
grid-template-columns: minmax(210px, 0.42fr) minmax(0, 0.9fr) minmax(0, 1fr);
gap: 12px 18px;
align-items: center;
margin-bottom: 14px;
padding: 14px 16px;
border: 1px solid rgba(186, 146, 59, 0.34);
border-radius: var(--radius-md, 12px);
background: linear-gradient(90deg, rgba(255, 248, 223, 0.92), rgba(255, 255, 255, 0.9));
color: #5d4617;
}

.runtime-authority-notice > div {
display: grid;
gap: 4px;
}

.runtime-authority-notice strong {
color: #8a5a00;
font-size: 13px;
overflow-wrap: anywhere;
}

.runtime-authority-notice p {
margin: 0;
font-size: 12px;
line-height: 1.5;
}

.console-nav__button {
min-height: 38px;
padding: 0 15px;
Expand Down Expand Up @@ -1558,8 +1528,7 @@

.platform-strip,
.quick-form,
.form-section,
.runtime-authority-notice {
.form-section {
grid-template-columns: 1fr;
}

Expand Down Expand Up @@ -1729,14 +1698,6 @@
box-shadow: inset 0 0 0 1px rgba(116, 167, 193, 0.2);
}

.runtime-authority-notice {
border-color: rgba(231, 181, 82, 0.42);
background: linear-gradient(90deg, rgba(80, 60, 24, 0.5), rgba(13, 27, 43, 0.85));
color: #f0d595;
}

.runtime-authority-notice strong { color: #ffd16d; }

.health-head {
align-items: flex-start;
padding: 8px 2px 2px;
Expand Down Expand Up @@ -1888,10 +1849,6 @@
align-items: start;
}

.runtime-authority-notice {
grid-column: 1 / -1;
}

.console-nav {
position: sticky;
top: 98px;
Expand Down Expand Up @@ -1979,17 +1936,6 @@
padding: 26px 0 44px;
}

.runtime-authority-notice {
border-color: #e7cf95;
background: #fffbef;
color: #705c2e;
box-shadow: none;
}

.runtime-authority-notice strong {
color: #8b6419;
}

.console-nav {
width: fit-content;
padding: 3px;
Expand Down Expand Up @@ -2629,7 +2575,7 @@

.decision-board {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(240px, 0.34fr);
grid-template-columns: minmax(0, 1fr);
gap: 18px;
align-items: start;
}
Expand Down Expand Up @@ -2804,12 +2750,6 @@
top: 92px;
}

.runtime-authority-notice {
padding: 11px 13px;
border-radius: 9px;
font-size: 12px;
}

@media (min-width: 900px) {
.decision-view,
#switch-view,
Expand Down
Loading