Skip to content

[feat] agent: show all turns of a conversation on one Trace page #407

Open

Description

@yefuyou

Context

Follow-up to merged PR #374 (Agent turn → tool call → generation Job lineage), requested by @FayeSpica in the approving review:

Tested manually. LGTM!

As a follow-up, could we show all turns in a conversation on one trace page, like DSH does?

Today, AssistantPanel.tsx opens a separate Trace page for each turn (traceProject + turn + runtime). Investigating a multi-turn conversation means opening several pages, even though the conversation already stores its messages and the per-turn Trace page can display native/model events and the linked Jobs added by #374.

Goal

Show all executed turns belonging to one conversation in a single, read-only Trace page, organized in conversation order, with each turn's existing execution records and linked Jobs inspectable in place. Take inspiration from DeepSeek Harness's turn-grouped trajectory UI without adopting a new event store or trace framework.

Expected behavior

  • Open a conversation-level Trace view from the assistant UI. Each turn is identifiable by its user request, runtime, and execution status.
  • Group turns in conversation order; expand/collapse a turn to inspect its existing Trace entries, tool activity, raw model requests where supported, and [feat] agent: persist Agent turn and tool-call lineage for generation Jobs #374 linked Jobs (status, results, errors).
  • Preserve deep links: a link from an individual assistant reply opens the conversation view at the corresponding turn. Existing traceProject + turn URLs remain usable.
  • Load historical turn details on demand. An active turn can update without repeatedly polling every completed turn.
  • Support conversations reopened from history, mixed runtimes across turns, and empty/missing per-turn trace files with an accurate state rather than inventing events.
  • Keep the view read-only: no editing lease, generation, recovery, replay, or project mutations merely to inspect history; preserve en-US/zh-CN behavior.

Implementation boundaries

Reuse the current AssistantTracePage.tsx renderers/normalizers and existing per-turn Trace and /assistant/turns/{turn_id}/jobs endpoints. If needed, add a small read-only conversation → turns metadata projection from persisted conversation history; avoid aggregating all JSONL bodies in one response.

The mapping must respect persisted turn identity, not assume every user message is followed by exactly one assistant reply. Coordinate data shape with:

Out of scope: implementing edit/resend, queueing or steering, Agent continuation/recovery, a new tracing schema/store, global search, virtualized timeline, inspector panel, or replay/fork controls.

Acceptance criteria

  • A conversation with multiple executed turns is inspectable on one page; turn order and per-turn identity are correct.
  • Existing turn-level tool/model trace presentation and linked Job details are preserved.
  • A deep link to a specific turn and existing single-turn URLs continue to work.
  • Historic/archived conversations and mixed runtimes do not leak or mix records across conversations.
  • Unexecuted queued/cancelled messages or inserted messages are not misrepresented as independent completed turns.
  • Historical details load on demand; only the active turn needs live updates.
  • The view performs no writes or provider calls; targeted backend/frontend tests, browser check, and bilingual checks pass.

Refs #374, #372, #261.

Activity

  1. yefuyou commented on Nov 19, 2026

    @yefuyou
    ContributorAuthor

    I'd like to take this follow-up to #374. I'll keep it scoped to the read-only, conversation-wide Trace view and reuse the existing per-turn trace and Job rendering, without changing edit/resend or message-queue execution.

    Since this is part of the Q4 Agent roadmap, could a maintainer please assign #407 to @yefuyou and add it as a sub-issue of #261? I tried self-assignment, but the GitHub integration returned a permissions error. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentAgent runtime, assistant chat and tools

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions