Skip to content

Commit d93aaef

Browse files
Pigbibicodex
andcommitted
fix(console): focus public UI on operator actions
Co-Authored-By: Codex <noreply@openai.com>
1 parent 30586b1 commit d93aaef

8 files changed

Lines changed: 344 additions & 430 deletions

File tree

tests/strategy_switch_worker_validation.mjs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ assert.equal(indexHtml.includes(".innerHTML"), false);
5858
assert.ok(indexHtml.includes('<body class="app-loading">'));
5959
assert.ok(indexHtml.includes('id="boot-screen"'));
6060
assert.ok(indexHtml.includes('id="app-shell"'));
61-
assert.ok(indexHtml.includes('id="runtime-authority-status"'));
61+
assert.equal(indexHtml.includes('runtime-authority-status'), false);
62+
assert.equal(indexHtml.includes('runtime-authority-notice'), false);
63+
assert.equal(indexHtml.includes('P0–P6'), false);
64+
assert.equal(indexHtml.includes('GitHub OAuth 保护'), false);
65+
assert.equal(indexHtml.includes('Worker 端触发'), false);
66+
assert.equal(indexHtml.includes('令牌保留在服务端'), false);
6267
assert.ok(indexHtml.includes('id="control-plane-view-button"'));
6368
assert.ok(indexHtml.includes('id="control-plane-view"'));
6469
assert.ok(indexHtml.includes('id="control-plane-list"'));
@@ -84,10 +89,10 @@ assert.ok(indexHtml.includes('id="reconciliation-recovery-list"'));
8489
assert.ok(indexHtml.includes('id="reconciliation-recovery-notice"'));
8590
assert.ok(indexHtml.includes('requestJson("/api/reconciliation-recovery")'));
8691
assert.ok(indexHtml.includes('data-reconciliation-recovery-confirm'));
87-
assert.ok(indexHtml.includes('P0_CONTROL_PLANE_NOT_RUNTIME_WIRED'));
88-
assert.ok(indexHtml.includes('window.__QSL_RUNTIME_AUTHORITY_STATUS__'));
89-
assert.ok(indexHtml.includes('execution_metadata_is_runtime_authority'));
90-
assert.ok(indexHtml.includes('P1–P3 non-live 数据获取仍需独立、精确的契约'));
92+
assert.equal(indexHtml.includes('P0_CONTROL_PLANE_NOT_RUNTIME_WIRED'), false);
93+
assert.equal(indexHtml.includes('window.__QSL_RUNTIME_AUTHORITY_STATUS__'), false);
94+
assert.equal(indexHtml.includes('execution_metadata_is_runtime_authority'), false);
95+
assert.equal(indexHtml.includes('P1–P3 non-live 数据获取仍需独立、精确的契约'), false);
9196
assert.ok(indexHtml.includes('requestJson("/api/execution-evidence")'));
9297
assert.ok(indexHtml.includes('requestJson("/api/adaptive-selection")'));
9398
assert.equal(indexHtml.includes('missing_current_promotion_evidence_and_human_acceptance'), false);
@@ -212,8 +217,8 @@ assert.equal(indexHtml.includes('id="ibit-zscore-exit-mode-select"'), false);
212217
assert.equal(indexHtml.includes("ibitZscoreExit"), false);
213218
assert.equal(indexHtml.includes("ibit_zscore_exit_mode"), false);
214219
assert.ok(indexHtml.includes('reservedCashDefault'));
215-
assert.ok(indexHtml.includes('dryRun: "演练(不下单)"'));
216-
assert.ok(indexHtml.includes('dryRun: "Dry run (no orders)"'));
220+
assert.ok(indexHtml.includes('dryRun: "模拟运行"'));
221+
assert.ok(indexHtml.includes('dryRun: "Simulated run"'));
217222
assert.ok(indexHtml.includes('平台默认:0 {currency} / 0%'));
218223
assert.equal(indexHtml.includes('比例沿用策略默认,通常 3%'), false);
219224
assert.equal(indexHtml.includes('平台默认:max(0 {currency}, 3%)'), false);
@@ -262,6 +267,7 @@ assert.equal(bootstrapConfigResponse.headers.get("Content-Type"), "application/j
262267
assert.equal(bootstrapConfigResponse.headers.get("X-Content-Type-Options"), "nosniff");
263268
assert.ok(bootstrapConfigJs.includes("window.__PLATFORM_CONFIG__"));
264269
assert.ok(bootstrapConfigJs.includes("window.__DEFAULT_STRATEGY_PROFILES__"));
270+
assert.equal(bootstrapConfigJs.includes("window.__QSL_RUNTIME_AUTHORITY_STATUS__"), false);
265271
assert.equal(bootstrapConfigJs.includes("ibkr-primary"), false);
266272
assert.equal(bootstrapConfigJs.includes("longbridge-quant-sg-service"), false);
267273
assert.equal(bootstrapConfigJs.includes('account_selector: "SG"'), false);

web/strategy-switch-console/app.css

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -137,36 +137,6 @@
137137
background: rgba(255, 255, 255, 0.7);
138138
}
139139

140-
.runtime-authority-notice {
141-
display: grid;
142-
grid-template-columns: minmax(210px, 0.42fr) minmax(0, 0.9fr) minmax(0, 1fr);
143-
gap: 12px 18px;
144-
align-items: center;
145-
margin-bottom: 14px;
146-
padding: 14px 16px;
147-
border: 1px solid rgba(186, 146, 59, 0.34);
148-
border-radius: var(--radius-md, 12px);
149-
background: linear-gradient(90deg, rgba(255, 248, 223, 0.92), rgba(255, 255, 255, 0.9));
150-
color: #5d4617;
151-
}
152-
153-
.runtime-authority-notice > div {
154-
display: grid;
155-
gap: 4px;
156-
}
157-
158-
.runtime-authority-notice strong {
159-
color: #8a5a00;
160-
font-size: 13px;
161-
overflow-wrap: anywhere;
162-
}
163-
164-
.runtime-authority-notice p {
165-
margin: 0;
166-
font-size: 12px;
167-
line-height: 1.5;
168-
}
169-
170140
.console-nav__button {
171141
min-height: 38px;
172142
padding: 0 15px;
@@ -1558,8 +1528,7 @@
15581528

15591529
.platform-strip,
15601530
.quick-form,
1561-
.form-section,
1562-
.runtime-authority-notice {
1531+
.form-section {
15631532
grid-template-columns: 1fr;
15641533
}
15651534

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

1732-
.runtime-authority-notice {
1733-
border-color: rgba(231, 181, 82, 0.42);
1734-
background: linear-gradient(90deg, rgba(80, 60, 24, 0.5), rgba(13, 27, 43, 0.85));
1735-
color: #f0d595;
1736-
}
1737-
1738-
.runtime-authority-notice strong { color: #ffd16d; }
1739-
17401701
.health-head {
17411702
align-items: flex-start;
17421703
padding: 8px 2px 2px;
@@ -1888,10 +1849,6 @@
18881849
align-items: start;
18891850
}
18901851

1891-
.runtime-authority-notice {
1892-
grid-column: 1 / -1;
1893-
}
1894-
18951852
.console-nav {
18961853
position: sticky;
18971854
top: 98px;
@@ -1979,17 +1936,6 @@
19791936
padding: 26px 0 44px;
19801937
}
19811938

1982-
.runtime-authority-notice {
1983-
border-color: #e7cf95;
1984-
background: #fffbef;
1985-
color: #705c2e;
1986-
box-shadow: none;
1987-
}
1988-
1989-
.runtime-authority-notice strong {
1990-
color: #8b6419;
1991-
}
1992-
19931939
.console-nav {
19941940
width: fit-content;
19951941
padding: 3px;
@@ -2629,7 +2575,7 @@
26292575

26302576
.decision-board {
26312577
display: grid;
2632-
grid-template-columns: minmax(0, 1fr) minmax(240px, 0.34fr);
2578+
grid-template-columns: minmax(0, 1fr);
26332579
gap: 18px;
26342580
align-items: start;
26352581
}
@@ -2804,12 +2750,6 @@
28042750
top: 92px;
28052751
}
28062752

2807-
.runtime-authority-notice {
2808-
padding: 11px 13px;
2809-
border-radius: 9px;
2810-
font-size: 12px;
2811-
}
2812-
28132753
@media (min-width: 900px) {
28142754
.decision-view,
28152755
#switch-view,

0 commit comments

Comments
 (0)