Repository navigation
feat(desktop): rebuild session trace as PiTraceLedger - #93
Merged
Merged
Conversation
Replace the card/badge timeline in session-detail with the ledger form validated in the chain-of-thought prototype round: a monospace grid (status glyph / kind / name / target / right-aligned tabular-nums duration) grouped by turn, with inline payload expansion. - New shared/ui component pi-trace-ledger, purely presentational; entry fields (status/name/target/duration/payload) are the abstraction the historical parser and the live runtime pipeline share, so the live trace can adopt it later without reshaping. - Detail stays unmounted until a row expands — sessions carry megabyte-scale tool outputs and the page virtualizes by turn group. - session-detail pairs toolCall/toolResult parts into single rows via toolCallId (order fallback), surfacing the isError/durationMs fields PR #92 unlocked; annotation turns render as config rows. - Registered on /design with all row states plus the empty variant. Second slice of #82; verified against real sessions (174-event and 8MB JSONL — first ledger row in 146ms) over CDP.
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.
#82 的第二个切片(台账组件切片,TDD 先行)。
改动
shared/ui/pi-trace-ledger:等宽五列网格(状态字形 ✓/✕/● / kind / 名称 / target 截断 / 右对齐 tabular-nums 时长),轮次分组分隔头(label + 时间 + 成本·token 元信息),行内展开 payload。纯展示型;entry 字段(status/name/target/duration/payload)即历史与 live 两条链路共通的抽象,将来 live trace 可直接换用,本切片不接。toolCallId配对(顺序兜底)合成单行,消费 feat(backend): surface toolResult isError, duration, and raw payload #92 打通的isError/durationMs;annotation 轮次渲染为 config 行(值进名称列,避免和组头重复)。target 提取与时长格式化复用chat-tool.tsx的toolTargetFromArgs/formatToolDuration(原型记号要求)。验证
bun run test64 文件 526 用例全绿;typecheck 干净。后续:PR 3 会话列表台账化 + 整页布局统一 + roster 措辞更新。