Skip to content

feat(desktop): fix trace layout as sidebar finder + fluid reading pane - #94

Merged
bubbleptr merged 7 commits into
mainfrom
feat/trace-page-layout-82
Aug 9, 2026
Merged

bubbleptr merged 7 commits into
mainfrom
feat/trace-page-layout-82

Conversation

@bubbleptr

Copy link
Copy Markdown
Owner

#82 的第三个切片(整页布局),stacked 在 #93 之上(base 指向其分支,#93 合并后再 retarget 到 main)。

布局判定依据

按 Astryx layout 文档的 App Archetypes,Trace 页是 Messaging 原型的 sidebar + stream 变体:左列表是查找器,右回放是主阅读面。原实现的三个问题(等宽可拖分栏 / 左卡右裸 / 整体居中)全部违背该原型的容器策略("Rows only, no cards"、sidebar 固定像素预算)。

改动

验证

  • TDD:trace/session-list 测试先改先红;全量 527 用例绿,typecheck 干净。
  • 真实数据截图(CDP):列表页(项目分组 + 空态)、Pig session 回放页,布局均成立。

The trace page previously split the viewport nearly 50/50 with a
draggable divider, wrapped the list in a Card while the detail pane sat
bare, and centered the whole frame. Per the messaging archetype (Astryx
layout doc): the session list is a finder, not a work surface.

- Fixed 320px sidebar, hairline separator, no resizer — extra viewport
  width all goes to the reading pane; TraceSplitView/useResizable/
  getTraceResizableSizes and the large/small layout fork are deleted.
- Session list flattened (no Card) and regrouped by project with
  ledger-style divider headers (name + count); cost/tokens right-aligned
  tabular-nums; rows tightened, per-row project line dropped.
- Session detail drops the Card shell around the ledger — dense data
  sits flat, group dividers carry the structure; reading width stays
  capped inside the pane.
- Roster docs/self-built-ui.md reconciled: pi-trace-ledger into table
  one, #82 in-progress, #84/#81 marked future.

Third slice of #82; verified with real-session screenshots over CDP.
… link

The detail pane nested two scrollers — the page scroll body plus the
ledger's own max-h viewport — so the wheel behaved differently depending
on where the cursor sat. The virtualizer now tracks the page's one
scroll body (SessionTimeline takes a scrollRef, falling back to its own
wrapper for standalone renders).

The back-to-index link is gone: the sidebar list is always visible in
the fixed frame, so navigating back to the empty state served nothing.

Verified over CDP on the 174-event session: mid-scroll keeps ~46 rows
mounted and virtual rows follow the outer scroll.
Group headers and rows previously shared the same border weight and
near-identical type, so groups blurred together. Headers are now sticky
uppercase micro-labels (loosened tracking, muted, opaque background)
that pin while their group scrolls; groups separate with whitespace,
intra-group row dividers drop to the lighter separator token, and rows
indent one step under their header.
The pt-3 group gap sat outside the sticky header band and read as an
empty white row between groups. The opaque header band alone carries
the group separation.
…l option

'All projects' pretended to be an option in the project Selector while
actually meaning 'no filter', which read as a broken entry once a real
project was chosen. The filter now lists only projects, shows 'All
projects' as the placeholder, and clears via the Selector's hasClear
button (onChange null).
Replace the single-select project Selector with the Astryx Tokenizer:
chosen projects render as removable token chips, sessions filter to the
union of selections, and the clear-all button (or an empty set) means
all projects. filterByProject(single) becomes filterByProjects(set).
Each selected project chip gets a deterministic Token palette color
hashed from its name — the same project is always the same color, so
chips read as identity rather than decoration. Red is excluded from the
palette to keep it free for error states.
Base automatically changed from feat/trace-ledger-component-82 to main August 9, 2026 10:58
@bubbleptr
bubbleptr merged commit 8b760d5 into main Aug 9, 2026
@bubbleptr
bubbleptr deleted the feat/trace-page-layout-82 branch August 9, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant