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:
@@ -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: 'Разбиение',
|
||||
|
||||
Reference in New Issue
Block a user