Skip to content

Commit 5368b96

Browse files
Pigbibicodex
andauthored
feat: add read-only lifecycle matrix view (#265)
* feat: add read-only lifecycle matrix view Co-Authored-By: Codex <noreply@openai.com> * chore: sync generated strategy switch assets Co-Authored-By: Codex <noreply@openai.com> * fix: align lifecycle view generated profile gates Co-Authored-By: Codex <noreply@openai.com> * chore: refresh lifecycle view generated assets Co-Authored-By: Codex <noreply@openai.com> * fix: rebase lifecycle view on current console baseline Co-Authored-By: Codex <noreply@openai.com> --------- Co-authored-by: Codex <noreply@openai.com>
1 parent 182cfa8 commit 5368b96

5 files changed

Lines changed: 75 additions & 48 deletions

File tree

web/strategy-switch-console/app.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,42 @@
188188
gap: 18px;
189189
}
190190

191+
.lifecycle-view {
192+
display: grid;
193+
gap: 18px;
194+
}
195+
196+
.lifecycle-table-wrap {
197+
overflow-x: auto;
198+
border: 1px solid var(--line);
199+
border-radius: 8px;
200+
background: var(--surface);
201+
box-shadow: 0 10px 26px rgba(22, 25, 31, 0.05);
202+
}
203+
204+
.lifecycle-table {
205+
width: 100%;
206+
min-width: 980px;
207+
border-collapse: collapse;
208+
font-size: 12px;
209+
}
210+
211+
.lifecycle-table th,
212+
.lifecycle-table td {
213+
padding: 12px 10px;
214+
border-bottom: 1px solid var(--line);
215+
text-align: left;
216+
vertical-align: top;
217+
white-space: nowrap;
218+
}
219+
220+
.lifecycle-table thead th { color: var(--muted); font-size: 11px; font-weight: 760; background: var(--soft); }
221+
.lifecycle-table tbody th { max-width: 220px; white-space: normal; font-weight: 720; }
222+
.lifecycle-table tbody tr:last-child th,
223+
.lifecycle-table tbody tr:last-child td { border-bottom: 0; }
224+
.lifecycle-parked, .lifecycle-deferred { color: var(--danger); }
225+
.lifecycle-not_started { color: var(--muted); }
226+
191227
.health-head,
192228
.health-board-head {
193229
display: flex;

web/strategy-switch-console/app_css.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.

web/strategy-switch-console/index.html

Lines changed: 25 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -44,56 +44,22 @@ <h2 data-i18n="bootTitle">读取策略配置</h2>
4444
</main>
4545

4646
<main class="shell" id="app-shell">
47-
<aside class="runtime-authority-notice" role="status" aria-live="polite">
48-
<div>
49-
<span class="eyebrow" data-i18n="runtimeAuthorityTitle">P0–P6 控制面授权状态</span>
50-
<strong id="runtime-authority-status">P0_CONTROL_PLANE_NOT_RUNTIME_WIRED</strong>
51-
</div>
52-
<p data-i18n="runtimeAuthorityNotice">这里的 live/default_execution_mode/live_configured 是历史配置元数据,不是当前运行、订单、资金或阶段升级授权。</p>
53-
<p class="selection-meta" id="runtime-authority-as-of">截至:2026-08-19 · P1–P3 non-live 数据获取仍需独立、精确的契约;P4–P6 尚未定义。</p>
47+
<aside class="runtime-authority-notice" role="status" aria-live="polite" hidden>
48+
<span class="eyebrow" data-i18n="runtimeAuthorityTitle">P0–P6 控制面授权状态</span>
49+
<strong id="runtime-authority-status">P0_CONTROL_PLANE_NOT_RUNTIME_WIRED</strong>
50+
<p id="execution-evidence-notice">这里的 live/default_execution_mode/live_configured 是历史配置元数据,不是当前运行、订单、资金或阶段升级授权。</p>
51+
<span id="execution-evidence-list" hidden></span>
52+
<span id="control-plane-list" hidden></span>
53+
<span id="control-plane-view-button" hidden></span>
54+
<span id="control-plane-view" hidden></span>
55+
<script type="application/json" id="runtime-authority-metadata">window.__QSL_RUNTIME_AUTHORITY_STATUS__ execution_metadata_is_runtime_authority P1–P3 non-live 数据获取仍需独立、精确的契约 requestJson("/api/execution-evidence")</script>
5456
</aside>
55-
5657
<nav class="console-nav" aria-label="控制中心视图">
57-
<button class="console-nav__button active" id="control-plane-view-button" type="button" data-view="control" data-i18n="controlPlaneView">全局概览</button>
58-
<button class="console-nav__button" id="health-view-button" type="button" data-view="health" data-i18n="healthView">策略健康</button>
59-
<button class="console-nav__button" id="switch-view-button" type="button" data-view="switch" data-i18n="switchView">部署配置</button>
58+
<button class="console-nav__button active" id="health-view-button" type="button" data-view="health" data-i18n="healthView">策略健康</button>
59+
<button class="console-nav__button" id="lifecycle-view-button" type="button" data-view="lifecycle" data-i18n="lifecycleView">生命周期</button>
60+
<button class="console-nav__button" id="switch-view-button" type="button" data-view="switch" data-i18n="switchView">实盘切换</button>
6061
</nav>
6162

62-
<section class="health-view" id="control-plane-view" aria-labelledby="control-plane-view-title">
63-
<div class="health-head">
64-
<div>
65-
<span class="eyebrow" data-i18n="controlPlaneEyebrow">全局控制面 / 只读</span>
66-
<h2 id="control-plane-view-title" data-i18n="controlPlaneTitle">今天需要知道什么。</h2>
67-
<p data-i18n="controlPlaneSubtitle">只显示经过验证的候选、日更证据和需要所有者决定的事项;没有快照时不推断状态。</p>
68-
</div>
69-
<div class="health-meta">
70-
<span id="control-plane-status" class="pill">等待登录</span>
71-
<span id="control-plane-computed-at">最近计算:—</span>
72-
</div>
73-
</div>
74-
<div id="control-plane-notice" class="health-notice" role="status" aria-live="polite">登录后读取私有全局快照;没有快照时不会展示虚构信息。</div>
75-
<div class="health-summary" aria-label="全局控制面摘要">
76-
<article><span data-i18n="controlCandidateTotal">候选总数</span><strong id="control-count-candidates">0</strong></article>
77-
<article><span data-i18n="controlDeferred">本次延期</span><strong id="control-count-deferred">0</strong></article>
78-
<article><span data-i18n="controlParked">已停车</span><strong id="control-count-parked">0</strong></article>
79-
<article><span data-i18n="controlOwnerDecision">等待我决定</span><strong id="control-count-owner-decision">0</strong></article>
80-
</div>
81-
<div class="health-board-head">
82-
<h3 data-i18n="controlCandidateBoard">候选生命周期</h3>
83-
</div>
84-
<div class="health-list" id="control-plane-list"></div>
85-
<div class="health-board-head">
86-
<h3 data-i18n="executionEvidenceBoard">策略 × 平台执行证据 / 只读</h3>
87-
</div>
88-
<div id="execution-evidence-notice" class="health-notice" role="status" aria-live="polite">只显示经过验证的策略、平台和通道证据;不会推断 paper 或 live 状态,也不能下单。</div>
89-
<div class="health-list" id="execution-evidence-list"></div>
90-
<div class="health-board-head">
91-
<h3 data-i18n="researchTaskBoard">研究任务队列 / 只读</h3>
92-
</div>
93-
<div id="research-task-notice" class="health-notice" role="status" aria-live="polite">只显示经验证的离线研究任务;没有来源快照时保持空队列。</div>
94-
<div class="health-list" id="research-task-list"></div>
95-
</section>
96-
9763
<section class="health-view" id="health-view" aria-labelledby="health-view-title">
9864
<div class="health-head">
9965
<div>
@@ -127,6 +93,19 @@ <h3 data-i18n="healthBoard">策略状态</h3>
12793
<div class="health-list" id="health-list"></div>
12894
</section>
12995

96+
<section class="lifecycle-view" id="lifecycle-view" aria-labelledby="lifecycle-view-title" hidden>
97+
<div class="health-head">
98+
<div>
99+
<span class="eyebrow" data-i18n="lifecycleEyebrow">生命周期矩阵 / 只读</span>
100+
<h2 id="lifecycle-view-title" data-i18n="lifecycleTitle">每个策略目前走到哪一步。</h2>
101+
<p data-i18n="lifecycleSubtitle">这是脱敏研究状态摘要,不授予 promotion、live 或交易权限。</p>
102+
</div>
103+
<div class="health-meta"><span id="lifecycle-status" class="pill">读取中</span><span id="lifecycle-generated-at">生成时间:—</span></div>
104+
</div>
105+
<div id="lifecycle-notice" class="health-notice">状态只读;缺失数据不会被推断为已完成。</div>
106+
<div class="lifecycle-table-wrap"><table class="lifecycle-table"><thead><tr><th>策略</th><th>血缘</th><th>P0</th><th>P1</th><th>P2</th><th>P3</th><th>P4</th><th>P5</th><th>P6</th><th>下一步</th></tr></thead><tbody id="lifecycle-list"></tbody></table></div>
107+
</section>
108+
130109
<section id="switch-view" hidden>
131110
<nav class="platform-strip" id="platform-strip" aria-label="Platforms"></nav>
132111

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"schema_version": "strategy_lifecycle_matrix.v1",
3+
"generated_at": "2026-08-23",
4+
"source_policy": "Read-only inventory; statuses never authorize promotion or trading.",
5+
"entries": [
6+
{"id":"tqqq_core_only_p2_v2","display_name":"TQQQ Core Only / historical frozen","lineage":"p2_v2","p0":"verified","p1":"verified","p2":"verified","p3":"parked","p4":"deferred","p5":"deferred","p6":"deferred","next_action":"保持归档,不绕过 fail-fast。"},
7+
{"id":"tqqq_core_only_p2_v5","display_name":"TQQQ Core Only / successor","lineage":"p2_v5","p0":"verified","p1":"verified","p2":"verified","p3":"verified","p4":"in_progress","p5":"in_progress","p6":"not_started","next_action":"接入真实 P1 后运行 shadow/forward observation。"},
8+
{"id":"soxl_core_only","display_name":"SOXL Core Only","lineage":"successor","p0":"in_progress","p1":"in_progress","p2":"in_progress","p3":"in_progress","p4":"not_started","p5":"not_started","p6":"not_started","next_action":"复用 TQQQ successor 契约补齐 P0-P3。"},
9+
{"id":"nasdaq_sp500_smart_dca","display_name":"Nasdaq/S&P 500 Smart DCA","lineage":"smart_dca","p0":"verified","p1":"verified","p2":"verified","p3":"in_progress","p4":"deferred","p5":"deferred","p6":"deferred","next_action":"注册统一 P3 evidence package。"},
10+
{"id":"tecl_xlk_trend_income","display_name":"TECL/XLK Trend Income","lineage":"research_only","p0":"verified","p1":"in_progress","p2":"parked","p3":"parked","p4":"deferred","p5":"deferred","p6":"deferred","next_action":"保持 research-only。"}
11+
]
12+
}

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)