feat(trace): always-on client-side tracing with admin trace-review page#14
Merged
Conversation
…review page Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…te revival Adds serializeTrace, reviveTraceDates (revives ISO strings to Date recursively), and SessionRecorder.fromTrace static factory for round-tripping traces as JSON. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…o dialog Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…at evaluator tab - Extract EVALUATOR_PROMPT to ui/src/traces/evaluator-prompt.ts (shared module for future use) - SessionRecorder is now always instantiated (no sessionStorage flag required) - Remove evaluator tab, evaluatorChat instance, and all active* computed proxies - Rename debug prop to isAdmin across AgentChat, AgentChatHeader, and chat.vue - AgentChatHeader: replace evaluation tabs + bug icon with plain title + info icon (admin-gated) - Fix AgentChatDebugDialog binding: add :is-admin, :account-type, :account-id; drop :tracing-enabled Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Carries the Task 4 rename into the _dev harness pages (which pass the prop to AgentChat) and the e2e specs that click the renamed header button. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…load validation Final-review cleanups: remove the now-unused `debug` option from useAgentChat and the dead `agent-chat--debug` class binding; require toolChanges/toolSnapshots arrays in the trace-review upload validator so a malformed file is rejected cleanly instead of crashing buildCache. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The collapsed trace line repeated the entry type (chip + title) and the expanded panel showed the preview twice (flat, then JSON-escaped). Now: - recorder labels carry only the distinguishing detail (tool name, model role, sub-agent name), not a type prefix the chip already shows; plain type-only entries get an empty label. Single source of truth, so the evaluator overview is de-duplicated too. - collapsed line shows chip + optional label + the content's first chars as a truncated text-label-small muted caption + time. - expanded panel drops the duplicated preview; string content renders as-is (real newlines) via formatContent instead of JSON-escaped. Tests updated for the new label semantics. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts: # ui/src/components/agent-chat/AgentChatDebugDialog.vue
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.
Rework agent-chat tracing to be always-on, client-only, and ephemeral, and add an admin trace-review workflow.
What changed:
SessionRecordertrace (no opt-in flag, no server persistence)./{type}/{id}/trace-review: aTraceViewpanel beside an AI evaluator chat, fed by JSON upload or a transient localStorage handoff (consumed once, quota-fallback to download).TraceView.vue; trace lines de-duplicated (type chip + distinguishing label + inline truncated content preview; full content on expand).main: its moderation trace entry is integrated into the newTraceViewrenderer.Why: keep the trace footprint bounded and avoid privacy/storage decisions — tracing stays in the browser, shared only via explicit download/upload or a one-shot handoff. Single source of truth for entry labels (also de-duplicates the evaluator's overview).
Regression risks:
debugprop renamed toisAdminacross AgentChat and dev pages; an external caller passing:debugwould break (all in-repo call sites updated).onMounted); the page exposes no server data.Verified: type-check, lint, and the trace + moderation test suites pass (27 specs).