refactor(frontend): redesign parsing timeline as Langfuse-style waterfall

The five-circle pipeline conveyed only "which stage we're on" — operators
asked for the actual span tree (root → stages → batches/images), the time
each span took relative to the whole run, and the recorded JSON in/out.
This commit rebuilds the visual layer to match Langfuse's trace view
without touching the data layer (polling, attempt selector, retry,
copy-span and watchers all unchanged).

- Three-column grid (name | status+duration | bar): each span is one
  row, indented by depth. Status dot 8px, name monospace, duration
  right-aligned. Bars are absolutely-positioned inside a shared
  timeline lane, left/width computed from each span's
  started_at / duration_ms relative to trace.started_at and the run's
  end (or "now" while running).
- Time ruler with five ticks (0% → 100%) above the bars; total
  duration label on the right.
- Sub-spans (embedding.batch[i], multimodal.image[i]) collapsed
  under each stage by default behind a chevron toggle. Click any
  row to expand an inline detail panel showing ISO timestamps,
  status, error_code/message when failed, and input/output/metadata
  JSON blocks plus a "Copy span JSON" action.
- Removed the parse_status gate in doc-content: the timeline is now
  always rendered when a knowledge detail is open, so completed
  documents also expose their recorded pipeline for audit. The
  KnowledgeBase hover popover stays compact-mode-only and still
  gates on parse_status (popover height matters there).
- Running bars grow visibly via a 1s ticker (cleared on unmount).
- Last-error block restricted to parse_status === failed.
- Added knowledgeStages.totalDuration to en-US / zh-CN / ko-KR / ru-RU.
This commit is contained in:
wizardchen
2026-05-27 16:14:38 +08:00
committed by lyingbug
parent 1d8ac301c2
commit c5722234ef
6 changed files with 697 additions and 174 deletions
+1 -1
View File
@@ -790,7 +790,7 @@ const handleDetailsScroll = () => {
<!-- 解析阶段时间线(仅在解析中/失败时显示) -->
<div
v-if="details.id && (details.parse_status === 'processing' || details.parse_status === 'pending' || details.parse_status === 'failed')"
v-if="details.id"
class="parse_timeline_box"
>
<KnowledgeProcessingTimeline
File diff suppressed because it is too large Load Diff
+1
View File
@@ -396,6 +396,7 @@ export default {
copyDetails: 'Copy details',
copied: 'Copied to clipboard',
noActivity: 'No parsing activity yet',
totalDuration: 'Total: {d}',
stage: {
docreader: 'Document parsing',
chunking: 'Chunking',
+1
View File
@@ -402,6 +402,7 @@ export default {
copyDetails: "세부정보 복사",
copied: "클립보드에 복사됨",
noActivity: "파싱 활동 없음",
totalDuration: "총 소요시간: {d}",
stage: {
docreader: "문서 파싱",
chunking: "청킹",
+1
View File
@@ -366,6 +366,7 @@ export default {
copyDetails: 'Скопировать детали',
copied: 'Скопировано в буфер обмена',
noActivity: 'Нет активности парсинга',
totalDuration: 'Всего: {d}',
stage: {
docreader: 'Парсинг документа',
chunking: 'Разбиение',
+1
View File
@@ -399,6 +399,7 @@ export default {
copyDetails: "复制详情",
copied: "已复制到剪贴板",
noActivity: "暂无解析记录",
totalDuration: "总耗时:{d}",
stage: {
docreader: "文档解析",
chunking: "分块",