Repository navigation
feat(ui): 表格单元格收成一套 —— 时间 / 耗时 / 空值 / 行操作(#210) - #213
Merged
Merged
Conversation
- 新增 pages/_shared/cells.tsx:TimeCell · DurationCell · EmptyCell · RowActions - 时间:15 个列定义统一成灰色等宽小字;只有点开详情的那几列是主色(蓝色 = 能点)。 AI 调用日志原来是 14px 黑字、用户 / 公告 / 审批监控是无衬线,都换掉了; 应用管理的「从未调用」不再染成链接蓝 - 耗时:`7.0 ms` / `52 ms` / `1.24 s` 一种格式,超阈值标琥珀(短信 / AI 工具按外部调用给 3 秒) - 状态:登录 / 操作日志去掉药丸里的小圆点;操作日志成功时不再挂一个「200」,失败才带业务码 - 空值:几处白色的「—」改成 EmptyCell(灰),公告阅读统计的「–」统一成「—」 - 行操作:任务调度的 ▶ + 红字「删除」、投递记录的「重发」按钮收进 ⋯; 另外 6 页手抄的 ⋯ 菜单换成 RowActions。DataTable 认 id=actions,收窄靠右 - E2E:调度页删除先开 ⋯ 菜单 - formatDuration 单测(含 999.6 不显示成「1000 ms」) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- TimeCell:有 onOpen 时时间为空也渲染能点的「—」(执行中 / 重试中的任务没有 date_done, 原来整行没有详情入口);判空改用 toEpochMs,不再拿格式化结果比占位符 - RowActions 改成 items 数据:组件自己按 perm / superOnly / hidden 过滤,一项不剩返回 null, 危险项排最后、前面有普通项才画分隔线 —— 修掉空浮层和孤立分隔线;scheduler 不再在调用处重复权限码 - formatDuration → formatMs(和 @admin/i18n 收秒数的同名函数撞了),9.95ms 那道舍入边界也按舍入后判 - 详情抽屉(操作日志 / 开放调用日志 / 短信日志 / 投递记录)的耗时也走 formatMs - 部门 / 菜单两张树表的 ⋯ 换成 RowActions;公告阅读统计 / Webhook 投递的时间格换成 TimeCell - accessor 里的 `?? '—'` 改成 EmptyCell(执行记录任务名 / 节点 / UUID,登录 / 操作日志浏览器 / 系统) - DataTable:ACTIONS_COLUMN_ID 的注释挪回原位,不再拆开 DataTableColumnVisibility 的 JSDoc; 调用方改用常量;导出 ACTIONS_CELL_CLASS 给自己画表的树表用 - 去掉没人用的 EMPTY 导出和 RowActions.className Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#210 调研结论里的 P1-7(表格单元格)和 P1-8(操作列),对应拆分计划里的 ③。
改了什么
新增
packages/platform/src/pages/_shared/cells.tsx,四个组件:TimeCellonOpen才是主色 + 悬停下划线DurationCell7.0 ms·52 ms·1.24 s,超阈值琥珀色52ms黑字 /7.0 ms灰字两种EmptyCell—–RowActionsDataTable:id: 'actions'的列收到按内容宽、靠右pages/AGENTS.md(调研:现在系统各页面的美观度 —— 先从「页面顶部固定一行说明文字」开始,逐页过一遍出统一改法 #210 那一节)验证
pnpm typecheck --force·pnpm lint·i18n:check·arch:check·ctx:check全过pnpm test:js全过(新增formatDuration单测)scheduler/webhook/sms通过;notification.spec红在 beforeEach,原因是本地fba_test少一个迁移(sys_notification.source does not exist),和本 PR 无关,交给 CI不在这个 PR 里
插件管理卡片上的红色「卸载」按钮属于卡片页(拆分计划 ⑤);数据权限的三个裸图标在主从页详情区,不是表格操作列,留到 ⑤ 一起看。
Refs #210
🤖 Generated with Claude Code