refactor(frontend): rebuild timeline UI with side drawer + attempt tabs
The previous Langfuse-style waterfall had concrete UX problems visible
in the field: the status text column wrapped Chinese characters across
two lines, the root span name truncated mid-identifier, the inline
detail expansion shifted sibling rows out of order, and the attempt
selector was a plain HTML <select>.
This commit rebuilds the visual layer around three corrections:
- Status column removed entirely. Status is conveyed by the 8 px dot
and the bar color; the redundant Chinese label that was wrapping
vertically is gone. Header subtitle now reads "总耗时 6.2s · ✓ 已完成"
via knowledgeStages.total + knowledgeStages.status.<value>.
- Inline row-detail replaced by a right-side drawer absolutely
positioned inside the timeline shell (overflow: hidden). Clicking a
row no longer reorders later rows beneath it. The drawer slides via
CSS transform, ESC and × close it, clicking the selected row toggles.
- Attempt <select> dropdown replaced by a horizontal pill tab strip
with a per-attempt status glyph (✓ / ✗ / ●). attemptStatuses Map
populates lazily — one /spans?attempt=n fetch per missing tab on
mount — so multi-attempt history doesn't block the initial render.
Drawer body shows the rich span data the backend just started
emitting: timing (started / finished / duration), an error block when
failed/cancelled, and Input / Output / Metadata as a 2-column
humanized key/value table. Numbers use toLocaleString, booleans render
as ✓/✗, arrays/objects collapse to a summary with a per-key "Show
JSON" toggle. Existing copySpan retains the raw JSON export path.
Root span name is now localized via knowledgeStages.root ("Knowledge
processing" / "知识处理") instead of leaking the raw identifier
"knowledge_processing" — which previously truncated as
"knowledge_process…".
i18n: added knowledgeStages.total and knowledgeStages.detail.{started,
finished, duration, input, output, metadata, error, showJson, hideJson}
to en-US, zh-CN, ko-KR, ru-RU. Compact mode (used by the card hover
popover) is untouched.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -398,6 +398,18 @@ export default {
|
||||
copied: 'Copied to clipboard',
|
||||
noActivity: 'No parsing activity yet',
|
||||
totalDuration: 'Total: {d}',
|
||||
total: 'Total {d}',
|
||||
detail: {
|
||||
started: 'Started',
|
||||
finished: 'Finished',
|
||||
duration: 'Duration',
|
||||
input: 'Input',
|
||||
output: 'Output',
|
||||
metadata: 'Metadata',
|
||||
error: 'Error',
|
||||
showJson: 'Show JSON',
|
||||
hideJson: 'Hide JSON',
|
||||
},
|
||||
stage: {
|
||||
docreader: 'Document parsing',
|
||||
chunking: 'Chunking',
|
||||
|
||||
@@ -404,6 +404,18 @@ export default {
|
||||
copied: "클립보드에 복사됨",
|
||||
noActivity: "파싱 활동 없음",
|
||||
totalDuration: "총 소요시간: {d}",
|
||||
total: "총 {d}",
|
||||
detail: {
|
||||
started: "시작",
|
||||
finished: "종료",
|
||||
duration: "소요시간",
|
||||
input: "입력",
|
||||
output: "출력",
|
||||
metadata: "메타데이터",
|
||||
error: "오류",
|
||||
showJson: "JSON 표시",
|
||||
hideJson: "JSON 숨기기",
|
||||
},
|
||||
stage: {
|
||||
docreader: "문서 파싱",
|
||||
chunking: "청킹",
|
||||
|
||||
@@ -368,6 +368,18 @@ export default {
|
||||
copied: 'Скопировано в буфер обмена',
|
||||
noActivity: 'Нет активности парсинга',
|
||||
totalDuration: 'Всего: {d}',
|
||||
total: 'Всего {d}',
|
||||
detail: {
|
||||
started: 'Начало',
|
||||
finished: 'Окончание',
|
||||
duration: 'Длительность',
|
||||
input: 'Вход',
|
||||
output: 'Выход',
|
||||
metadata: 'Метаданные',
|
||||
error: 'Ошибка',
|
||||
showJson: 'Показать JSON',
|
||||
hideJson: 'Скрыть JSON',
|
||||
},
|
||||
stage: {
|
||||
docreader: 'Парсинг документа',
|
||||
chunking: 'Разбиение',
|
||||
|
||||
@@ -401,6 +401,18 @@ export default {
|
||||
copied: "已复制到剪贴板",
|
||||
noActivity: "暂无解析记录",
|
||||
totalDuration: "总耗时:{d}",
|
||||
total: "总耗时 {d}",
|
||||
detail: {
|
||||
started: "开始",
|
||||
finished: "结束",
|
||||
duration: "耗时",
|
||||
input: "输入",
|
||||
output: "输出",
|
||||
metadata: "元数据",
|
||||
error: "错误",
|
||||
showJson: "显示 JSON",
|
||||
hideJson: "隐藏 JSON",
|
||||
},
|
||||
stage: {
|
||||
docreader: "文档解析",
|
||||
chunking: "分块",
|
||||
|
||||
Reference in New Issue
Block a user