Skip to content

feat(console): redesign runtime page into status band + recall traces - #322

Merged
Windsander merged 1 commit into
mainfrom
feat/console-runtime-redesign
Nov 17, 2026
Merged

Windsander merged 1 commit into
mainfrom
feat/console-runtime-redesign

Conversation

@Windsander

@Windsander Windsander commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • 重新设计控制台「运行时」页面:只保留 四格状态带 + 单列召回轨迹。
  • 删除与「记忆」主页功能重叠的 记忆时间线(时间线行、筛选 select、内部对象开关、对象详情、归档/删除动作、运行时对 /admin/api/memories 的读取)。
  • 召回轨迹改为审计扁平行派生的账本列表,保留展开详情与反馈动作。
  • 页面壳与共享 / 记忆 / 审计一致:标题 13/700/18/3、toolbar 34、刷新按钮 34px / 7px 11px / 8px 圆角、行内动作 .btn-small 27px。

方向修正:删除记忆时间线

运行时原先还提供「记忆时间线」,与「记忆」主页读取同一 /admin/api/memories,同样提供浏览/查看/归档/删除,只是多了内部对象/类型筛选。本 PR 已删除这部分:

  • 不做两视图 tabs;#runtime-timeline、筛选 select、内部对象开关、时间线行、对象详情、归档/删除动作与相关请求全部移除。
  • 「记忆」页保持不变,继续是记忆浏览的单一入口;#memories-view、记忆页筛选/动作/API 原样保留。
  • 运行时只保留:标题 + 刷新、单一状态带(服务 / 模式 / 模型来源 / 版本、异常条)、单列召回轨迹。

页面细节

  • 状态带:四格 服务状态 / 记忆模式 / 模型来源 / 版本;服务状态为单点 + 文本。正常就绪时只有这一条;降级、失败、错误、未启用才追加一条左侧细条状态行(role=status / role=alert,错误原文沿用原脱敏函数)。900 起允许 2×2。
  • 轨迹标题:列表上方有可见 h3(runtime.trace.title,13 / 700 / 18),section 与列表都用 aria-labelledby 指向它;空态、加载、错误、轻量 MCP 下标题保持可见。
  • 轨迹账本:从审计 .audit-item 扁平行派生(透明底、0 圆角、虚线底边、9px 8px 9px 10px);列为时间 / 召回标签 / 查询与紧凑 meta / 一个动作。标签复用 .crt-tag 10px,动作复用 .btn-small 27px,反馈按钮在展开详情中。
  • aria:展开按钮的 aria-expanded / aria-controls 完整;详情容器使用稳定 id="rt-trace-detail-<id>",展开、加载、错误状态都存在。
  • 状态覆盖:空轨迹 / 加载 / 错误由 Jest 静态断言覆盖(四个分支 + data-rt-traces-disabled / data-rt-traces-unavailable);轻量 MCP 由浏览器 UI 测试覆盖。未伪造服务端数据截图。
  • 文案清理:runtime.trace.note 与 runtime.trace.listLabel 已删除,中英同步;runtime.trace.title 同时用于可见标题。

主页面一致性实测

项目 运行时 共享 记忆 审计
h2(1440 / 390) 13px / 700 / 18px / 3px 同 同 同
toolbar 顶部 y(1440) 107 107 107 107
toolbar 高度(1440) 34 34 34 34
页面级按钮 34px / 7px 11px / 8px 同 同 同
行形态 审计扁平行:0 圆角、虚线底边、9px 8px 9px 10px 扇区项 卡片 8px 圆角、10px 12px(未改) 与运行时同
行内标签 .crt-tag 10px — .crt-tag 10px .audit-action 11px
行内动作 .btn-small(本地 27px;与记忆页同高) — .btn-small(本地 27px) —
390 横向溢出 0 0 0 0

首行实测:1440 top=238 / 900 top=365;390 行堆叠且 docOver=0 / panelOver=0 / bodyOver=0。

行内动作不写死像素高度:复用了记忆页同一 .btn-small。macOS 实测 27px,CI Linux 字体度量下 24px;测试按“与记忆页行内按钮同高”断言,避免跨平台误报。

Screenshots

改前

before 1440
before 900
before 390

改后

after 1440
after 900
after 390
after expanded 1440
after en 1440

主页面一致性(1440)

runtime
shared
memories
audit

Verification

Command Result
npm run verify:console PASS
npm test -- tests/console/runtime-ui.test.mjs 27 / 27 passed
npm run verify:console:ui 460 / 460 passed(完整脚本,未跳过)
npm run lint PASS
npm run check:docs 7 / 7 passed
npm run check:i18n 32 checks, 0 failed

Boundary

  • 只改 runtime 页面、runtime 作用域 CSS、runtime 事件/数据加载、runtime 断言与中英文 runtime 文案;新增 U-5 截图基线。
  • 未改 API、配置、存储、同步、写路径、设置页、星图 / 共享 / 记忆 / 审计 / 邀请页面。
  • 未把时间线搬去「记忆」页。
  • 不自动合并,不部署。

- Remove the duplicated memory timeline (timeline rows, filters, internal-object
  toggle, object detail, archive/delete actions and /admin/api/memories reads).
  Memory browsing stays in the memories page.
- Keep one four-cell status band (service / mode / model source / version) with a
  single warning line only for degraded, failed, error or disabled states.
- Add a visible 13/700/18 section title above the recall-trace list and wire
  aria-labelledby to it; keep the title present in every state.
- Render recall traces as a single-column ledger derived from the audit flat row;
  give every expanded detail a stable id so aria-controls always resolves.
- Add deterministic empty/loading/error source assertions; remove the unused
  runtime.trace.note copy in both locales.
- Align the page shell with shared/memories/audit: existing h2, toolbar, .btn/.btn-crt,
  .crt-tag and .btn-small; runtime-scoped CSS only.
- Update runtime tests and U-5 before/after plus main-page consistency screenshots.
@Windsander
Windsander force-pushed the feat/console-runtime-redesign branch from 17842a2 to 6e0d89d Compare November 17, 2026 04:20
@Windsander
Windsander merged commit 171d57d into main Nov 17, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant