Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

2.7 KB
Raw Blame

Trace review workspace

Trace owns the trace data and selection providers. Desktop peek and full trace views create one TraceReviewPanelProvider per project and trace, above the selected detail view. Header actions send annotation/comment targets to its local store; they do not own the opened panel or its lifetime.

  • traceReviewPanelStore owns the active mode, retained target sessions, comment draft guards, and trigger focus restoration. Query data stays in React Query.
  • TraceReviewPanel mounts the comment thread and annotation form once per target session, hides inactive content, and gates keyboard/mention behavior. Closing the panel preserves the draft while this trace remains mounted.
  • TraceReviewLayout owns the responsive review split. Automatic navigation is visible when the available display can fit three comfortable columns. An explicit tree toggle overrides that default and is remembered. The review pane stacks below the trace when minimum column widths cannot fit; both editors stay mounted.
  • TraceLayoutDesktop owns the tree/detail split. Its temporary review sizes do not overwrite the normal saved layout. Closing review restores that layout after the outer panel and its resize observer settle. Navigation stays mounted while collapsed, preserving tree scroll and timeline zoom.
  • Peek content advertises its temporary minimum width with data-peek-layout. The shell caps it at the sidebar edge and restores its saved width on close.
  • Comment and annotation controllers use the workspace when present. Other surfaces, including the queue workspace with its own score pane, retain their existing overlay presentation and permission checks.

Changing comment targets confirms discarding an unsent draft. Selecting another trace destroys the workspace; drafts are not shared between traces or projects.

Same-target annotation reopening passes the fresh header snapshot through the mounted form's imperative refresh handle. The form action reconciles by target and config, updating clean fields in place while preserving pending writes, invalid inputs, and row-local comment drafts. An unchanged pre-save snapshot cannot undo a confirmed local save. This refresh belongs to the open action; query updates do not reset mounted editors.

Mobile detail headers compose review, Add to, and utility actions into one design-system dropdown. The feature controllers expose prepared items through renderMenu while retaining ownership of permissions, queries, and dialogs. Dialog controllers stay outside the menu's mount lifetime; selecting an action closes the menu without unmounting its destination. Review actions remember the stable More actions trigger for keyboard focus return.