fix: prevent trace platform header wrapping

This commit is contained in:
Soulter
2026-10-12 17:04:50 +08:00
parent ad8f3a2927
commit 39d16e995a
6 changed files with 11 additions and 4 deletions
+1
View File
@@ -21,3 +21,4 @@
- Remove the outer gray trace card and tinted list shell, using a flat tab layout with toolbar/table separators in both themes.
- Top hint and separate recording switch → a toolbar Start/Pause/Connecting button. Filters, recording, and refresh share gray icon-and-text styling and 36px input height; search fills available width and includes the message count in its placeholder.
- Use Vuetify datatable with native rows, typography, spacing, and hover styling for the trace list; customize individual cells while retaining fixed headers, stable trace row IDs, keyboard activation, and explicit detail selection without adding pagination or automatic selection.
- Shorten the Chinese duration column label and prevent the platform column header from wrapping with a minimum width.
@@ -136,7 +136,7 @@ const traceRows = computed(() => filteredEvents.value.map((event) => ({
const traceHeaders = computed(() => [
{ title: tm("columns.status"), key: "status", width: 120 },
{ title: tm("columns.platform"), key: "platform", width: 80 },
{ title: tm("columns.platform"), key: "platform", width: 112, minWidth: 112, headerProps: { class: "text-no-wrap" } },
{ title: tm("columns.timestamp"), key: "timestamp", width: 160 },
{ title: tm("columns.duration"), key: "duration", width: 120 },
{ title: tm("columns.message"), key: "message", minWidth: 240 },
@@ -43,7 +43,7 @@
"updateFailed": "切换追踪记录失败,请重试"
},
"columns": {
"duration": "运行时间",
"duration": "时长",
"status": "状态",
"platform": "平台",
"timestamp": "时间戳",
+6
View File
@@ -114,6 +114,12 @@ test("Vuetify datatable keeps the requested columns and explicit detail selectio
"columns.status", "columns.platform", "columns.timestamp",
"columns.duration", "columns.message", "UMO", "columns.sender", "Spans",
]);
const platformHeader = state.traceHeaders.value.find((header) => header.key === "platform");
assert.equal(platformHeader.width, 112);
assert.equal(platformHeader.minWidth, 112);
assert.equal(platformHeader.headerProps.class, "text-no-wrap");
const zh = JSON.parse(readFileSync(new URL("../src/i18n/locales/zh-CN/features/trace.json", import.meta.url), "utf8"));
assert.equal(zh.columns.duration, "时长");
assert.match(descriptor.template.content, /<v-data-table/);
assert.match(descriptor.template.content, /item-value="event.span_id"/);
assert.match(descriptor.template.content, /:items-per-page="-1"/);
+1 -1
View File
@@ -174,7 +174,7 @@ The toolbar contains search, fullscreen, font-size controls, and `Install Pip pa
The trace tab has no outer gray card; its toolbar and list sit directly on the page with only the necessary separators. The former hint and switch are replaced by a toolbar button showing Pause (enabled and connected), Connecting (enabled but disconnected), or Start (disabled). Filters, recording, and refresh use matching light-gray icon-and-text buttons sharing the input's background color, all 36px high. Search fills the remaining width, pushing actions to the right. Its placeholder includes the message count instead of a separate counter. Click to pause or resume. Updates show loading and prevent repeated clicks; failures preserve the previous state and display an error. Pausing retains the list and open details in both themes.
The `Trace` tab shows message execution chains: receipt, plugin handlers, Agent requests, responses, and completion. It opens as a full-width Vuetify datatable with columns ordered as status chip, platform logo, timestamp, duration, message, UMO, sender, and Spans. Headers, row height, and spacing use Vuetify defaults; only cell content such as status, platform icons, and messages is customized. Duration updates while execution is active. Click a row to open its timeline details on the right; use the close button or Escape to return to the list. History loading, incoming records, and filtering never automatically open another trace. Scroll horizontally on narrow screens. Spans counts timeline nodes after pairing start/end records; collapsing groups does not reduce it. The search placeholder counts message traces only. Open `Filters` next to search to select `Has errors`, `Has model calls`, and `Has plugin calls`. Multiple selections require all conditions and can be combined with search. No selection shows all traces; `Reset` clears selections, and closing the sidebar preserves them. This sidebar replaces the former `All / Errors / Agent / Plugins` single-select tabs. Use the toolbar recording button to enable or disable trace recording.
The `Trace` tab shows message execution chains: receipt, plugin handlers, Agent requests, responses, and completion. It opens as a full-width Vuetify datatable with columns ordered as status chip, platform logo, timestamp, duration, message, UMO, sender, and Spans. Headers, row height, and spacing use Vuetify defaults; only cell content such as status, platform icons, and messages is customized. The platform column has a minimum width and a non-wrapping header. Duration updates while execution is active. Click a row to open its timeline details on the right; use the close button or Escape to return to the list. History loading, incoming records, and filtering never automatically open another trace. Scroll horizontally on narrow screens. Spans counts timeline nodes after pairing start/end records; collapsing groups does not reduce it. The search placeholder counts message traces only. Open `Filters` next to search to select `Has errors`, `Has model calls`, and `Has plugin calls`. Multiple selections require all conditions and can be combined with search. No selection shows all traces; `Reset` clears selections, and closing the sidebar preserves them. This sidebar replaces the former `All / Errors / Agent / Plugins` single-select tabs. Use the toolbar recording button to enable or disable trace recording.
Session aliases replace raw UMOs when available; hover over the dotted underline to see the full UMO. Plugins use their display name when available; hover to see the plugin ID. Handler names, event types, and duration are also shown. Plugin handler nodes use the plugin logo when available and the plugin card's default blue star icon if it is missing or fails to load. Titles show the category in parentheses, matching the plugin detail page: command/command group, event listener, event hook, or LLM tool.
+1 -1
View File
@@ -174,7 +174,7 @@ ChatUI 支持以下常用能力:
追踪标签页不使用外层灰色卡片,工具栏和列表直接铺在页面上,仅保留必要的分隔线。原来的顶部说明和独立记录开关已移除;工具栏按钮显示“暂停”(启用且已连接)、“连接中”(启用但未连接)或“启动”(停用)。过滤器、记录按钮、刷新均采用图标加文字的浅灰按钮,与搜索框共用背景色,统一为 36px 高;搜索框填满剩余宽度,将操作按钮靠右排列。记录数量并入占位文字:“在 X 条记录中搜索消息、会话、插件”,不单独显示。点击记录按钮可暂停或恢复,更新期间显示加载状态并禁用重复点击;失败时保持原状态并提示错误。暂停不会清除已有列表或关闭详情,明暗主题保持相同布局。
`追踪` 页面实时显示消息执行链:收到消息、触发插件处理器、Agent 相关请求、发送响应和完成。默认只展示全宽 Vuetify datatable 追踪列表,列顺序为状态标签(运行中/已完成/错误)、平台 logo、时间戳、运行时间、消息、UMO、发送人和 Spans;表头、行高和间距采用 Vuetify 默认样式,仅定制状态、平台图标及消息等单元格内容。运行时间在执行期间持续更新。点击某行后才打开右侧时间线详情,点击关闭按钮或按 Escape 返回列表;加载历史记录、新记录到达及筛选变化都不会自动打开其他记录的详情。窄屏列表可横向滚动。Spans 统计开始/结束合并后的时间线节点,同类型折叠不减少该数量,搜索占位文字中的记录数仍只统计消息。点击搜索框左侧的“过滤器”,勾选“有错误”“有模型调用”“有插件调用”;多选需同时满足所有条件,并可叠加搜索。不勾选则显示全部,“重置”清除勾选,关闭侧栏仍保留条件。原先的“全部 / 错误 / Agent / 插件”单选标签已改为多选侧栏。工具栏记录按钮可启用或禁用追踪记录。
`追踪` 页面实时显示消息执行链:收到消息、触发插件处理器、Agent 相关请求、发送响应和完成。默认只展示全宽 Vuetify datatable 追踪列表,列顺序为状态标签(运行中/已完成/错误)、平台 logo、时间戳、时长、消息、UMO、发送人和 Spans;表头、行高和间距采用 Vuetify 默认样式,仅定制状态、平台图标及消息等单元格内容。平台列设有最小宽度,表头不会换行。时长在执行期间持续更新。点击某行后才打开右侧时间线详情,点击关闭按钮或按 Escape 返回列表;加载历史记录、新记录到达及筛选变化都不会自动打开其他记录的详情。窄屏列表可横向滚动。Spans 统计开始/结束合并后的时间线节点,同类型折叠不减少该数量,搜索占位文字中的记录数仍只统计消息。点击搜索框左侧的“过滤器”,勾选“有错误”“有模型调用”“有插件调用”;多选需同时满足所有条件,并可叠加搜索。不勾选则显示全部,“重置”清除勾选,关闭侧栏仍保留条件。原先的“全部 / 错误 / Agent / 插件”单选标签已改为多选侧栏。工具栏记录按钮可启用或禁用追踪记录。
UMO 有别名时显示别名,带点划线的文字可悬停查看完整 UMO。插件优先显示 display name,悬停可查看插件 ID,同时展示 Handler 名称、事件类型及耗时。插件处理器节点优先使用插件 logo,没有 logo 或加载失败时使用插件卡片的默认蓝色星形图标;标题括号内展示与插件详情页一致的分类:指令/指令组、事件监听器、事件钩子或 LLM 工具。