- GET /system/health splits processes into current instances (hosts with
a beat in the last 10 min, newest per host+kind, not stopped) and
retiredProcesses[]; 45s stale and level only consider current ones
- heartbeat writer marks stopped_at on graceful exit (migration 0043),
upsert clears it; pure api role now stops its writer on SIGTERM
- scheduled job system.heartbeat_cleanup (maintain, 1h) deletes rows
without a beat for 24h and samples older than 7 days
- status page: per-role alarms ("io worker 45 秒没有心跳"), collapsible
retired instances; glossary/runbook updated
- bump all members to 0.2.2, CHANGELOG [0.2.2]
Co-Authored-By: Claude Opus 5.5 <[email protected]>
设计系统
控制台(apps/web)沿用 /opt/uhd_web 的设计系统:token 定义在 app.css,shadcn 组件在 apps/web/app/components/ui/,控制台共享件在 apps/web/app/components/console/。
| 文档 | 内容 |
|---|---|
| design-tokens.md | 颜色 token 分层、命名与使用规则,字号/圆角/时长/缓动阶梯 |
| interface-materials.md | 材质:pg-chrome 贴边、pg-slab 内容卡、pg-float 悬浮层 |
| ui-controls.md | 按钮、选中态、状态反馈、动效与圆角角色 |
硬规则
- 新增语义先加 token 再用。 需要新的颜色、字号、圆角、时长或缓动时,先在
app.css定义语义 token(日夜两套值都给),跑deno task gen:tokens,再在组件里引用。 - 禁止原色与十六进制。 组件里不写
#xxxxxx、text-[#..]、bg-red-500这类 Tailwind 调色板色、white/10之类的黑白透明度,也不写text-[13px]、duration-300、ease-[cubic..]、裸rounded。状态只用success/warning/destructive,并且配文字,不只靠颜色。 - 材质按层级只有三种,不在玻璃上叠玻璃:已在卡片里的空态用
<EmptyState plain>。 - 确需例外(第三方库的颜色参数等),在该行或上一行写
token-allow: 原因。
以上规则由 deno task check:tokens(apps/web/scripts/check-design-tokens.sh + 生成物校验)在 deno task ci 中守住。
控制台共享件
PageHeader:页面标题 + 一句说明 + 右侧操作区。EmptyState:空态/建设中占位;plain用于卡片内部。StatusBadge:success | warning | destructive | neutral四种语气,必须带文字。nav.ts:12 个工作区的导航表,标题与说明同时供占位页使用。