From 6bb422c322c75c7c0ce64e4e17b2e649618cea2a Mon Sep 17 00:00:00 2001 From: argszero Date: Tue, 13 Oct 2026 07:57:49 +0800 Subject: [PATCH] docs(ui): drop the stale card ordinal from the ops trades-card note The operator overview's trades card is the 6th of the nine cards the render array emits (status, version, uptime, users, keys, trades, calls, in, out), not the ninth -- the README bullet had it as "the 9th card". The card was placed at that position on purpose: the note that landed it records it as "immediately after the keys card, i.e. the mock branch's original slot", and the same README sentence already says the grid has nine cards. The ordinal carried no owner and no gate pins the grid order, so it is dropped rather than refreshed -- a fresh number would rot the same way on the next insertion. Docs only; ui/README.md is part of the include_str! corpus, so the full suite was run. --- ui/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/README.md b/ui/README.md index 7d14d80..1500403 100644 --- a/ui/README.md +++ b/ui/README.md @@ -393,7 +393,7 @@ ui/ - **page-head crumb**:8 个视图统一 `.crumb`(`/ 设置` `/ 管理视图` `/ 运营视图`),与仪表盘/市场/共享/钱包/交易一致; - **管理视图**(4 tab 不变):成员管理 pane 增加 `#emp-search` 成员搜索(成员名 / 邮箱 / 部门,`hl()` 高亮)+ 表格「角色 / 部门 / 永久点数 / 赠送点数 / 可用」列;用量报表用 `.card-grid-3` 三栏;组织管理与模型管理的工具栏为「搜索 + `.grow` + 主按钮(`btn-sm`)」,与原型一致; - **运营视图**(2 tab 不变):运行概览新增四张卡片——**服务版本**(`/api/ops/runtime` 的 `version`,取自 `env!("CARGO_PKG_VERSION")`,与 `/healthz` 同源;前端**不得**写死版本号)与**运行时长**(`uptime_secs` / `uptime_days` / `uptime_hours` / `uptime_minutes` / `uptime_secs_rest`,进位在后端 `split_uptime` 完成,前端 `fmtUptime` 只挑「最高两个非零位」并取 `ops.uptime.{days,hours,minutes,seconds}` 单位)、**今日调用量(按小时)** `.bar-list`(`today_hours`,服务端 0-23 全量补零;GROUP BY 会省略无调用的小时,不补零会让柱子整体左移,与交易页 `txTrendDays` 同款坑)与**上游 key 状态** `.mini-list`(`key_health` 按厂商聚合 total/on/off,三态 pill:全部启用 / N 个停用 / 全部停用 —— C2158 改名,见下文同名小节);成员充值的搜索框移到卡片标题行右侧(原型 `.spread`); -- **交易量卡(第 9 张,回归修复)**:`total_txs`(`ops.stats.trades` + `cnt.trades` + `ops.stats.trades.sub`)自 `85982e8`(PR #80)起就在 `/api/ops/runtime` 返回(口径见 `src/routes/ops.rs`:读模型 `tx_facts` 的 `SUM(row_count)` 即账本条数,累计**全部类型**),但 v1.22 零 mock 重构 `89963f3` 删掉 mock 分支那张卡时漏了重接。**这不是原型对齐**——原型没有这张卡(原型 4 张,实现 9 张,多出的卡是刻意的)。值一律取自响应,**不取** `D.TRANSACTIONS`; +- **交易量卡(回归修复)**:`total_txs`(`ops.stats.trades` + `cnt.trades` + `ops.stats.trades.sub`)自 `85982e8`(PR #80)起就在 `/api/ops/runtime` 返回(口径见 `src/routes/ops.rs`:读模型 `tx_facts` 的 `SUM(row_count)` 即账本条数,累计**全部类型**),但 v1.22 零 mock 重构 `89963f3` 删掉 mock 分支那张卡时漏了重接。**这不是原型对齐**——原型没有这张卡(原型 4 张,实现 9 张,多出的卡是刻意的)。值一律取自响应,**不取** `D.TRANSACTIONS`; - **零 mock 不破**:以上数据全部来自真实端点,加载失败仍走空态 + 重试(`.mini-item` / `.bar-row` 只在有真实数据时才渲染)。 ## 交易类型筛选:一份状态,两套控件(C2112)