[Dashboard] Fix readonly tool trace access in record detail#1707
[Dashboard] Fix readonly tool trace access in record detail#1707
Conversation
✅ Deploy Preview for vllm-semantic-router ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Supply Chain Security Report — All Clear
Scanned at |
👥 vLLM Semantic Team NotificationThe following members have been identified for the changed files in this PR and have been automatically assigned: 📁
|
There was a problem hiding this comment.
Pull request overview
Updates the Dashboard replay record detail view so read-only users can see the tool-trace structure (step timeline + flow) while still redacting step payloads, and ensures tool-call success rate can be computed from a redacted trace.
Changes:
- Backend redaction now preserves tool-trace structure while blanking per-step
text/arguments, and injects a redacted tool-resultstatusplus acontent_redactedmarker. - Frontend tool-trace rendering now conditionally hides step payloads for read-only users while still rendering the timeline and computing success-rate from the redacted
status. - Insights tag/tint rendering is simplified (removes per-signal tint mapping) and E2E coverage is updated for the new read-only experience.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| dashboard/frontend/src/pages/insightsPageTypes.ts | Extends tool-trace step shape to carry redacted status + redaction marker. |
| dashboard/frontend/src/pages/insightsPageToolTrace.tsx | Renders tool-trace structure for read-only users, hides payloads, and fixes success-rate via status. |
| dashboard/frontend/src/pages/insightsPageSupport.tsx | Simplifies projection/signal tag rendering by removing tint-key plumbing and tint map. |
| dashboard/frontend/src/pages/InsightsPage.module.css | Adds dedicated .modalSignalPill styling after removing inline tint styles. |
| dashboard/frontend/e2e/auth-flow.spec.ts | Updates read-only replay assertions to expect structural tool trace + redaction messaging and success rate. |
| dashboard/backend/router/router_replay_redaction.go | Preserves tool trace flow, redacts step payloads, and injects status + content_redacted for read-only responses. |
| dashboard/backend/router/router_replay_redaction_test.go | Updates/extends tests to validate preserved flow and newly added redaction fields/status logic. |
| tool_name?: string | ||
| tool_call_id?: string | ||
| arguments?: string | ||
| status?: string | ||
| content_redacted?: boolean |
There was a problem hiding this comment.
ToolTraceStep.status is typed as a plain string, but the UI logic only accepts 'succeeded' | 'failed' (and otherwise falls back to inferring from text). Narrowing this to a string-literal union (and/or introducing a dedicated ToolResultStatus type) would prevent accidental propagation of unexpected values and make getToolResultStatus fully type-safe.
| {step.tool_name ? ( | ||
| <span className={styles.signalPillCompact}>{step.tool_name}</span> | ||
| ) : null} | ||
| {step.source ? <span className={styles.costSubtle}>Source: {step.source}</span> : null} | ||
| {formatToolTraceSource(step) ? ( | ||
| <span className={styles.costSubtle}>Source: {formatToolTraceSource(step)}</span> | ||
| ) : null} |
There was a problem hiding this comment.
formatToolTraceSource(step) is invoked twice in this JSX branch (once for the conditional check and again for rendering). Store the formatted value in a local variable so it’s computed once per step render and so the conditional and rendered value can’t diverge if the formatter changes.
Signed-off-by: xunzhuo <xunzhuo@vllm-semantic-router.ai>
Performance Benchmark ResultsComponent benchmarks completed successfully. Summary
DetailsSee attached benchmark artifacts for detailed results and profiles. Performance testing powered by vLLM Semantic Router |
7db140d to
c05da21
Compare
Signed-off-by: xunzhuo <xunzhuo@vllm-semantic-router.ai>
Signed-off-by: xunzhuo <xunzhuo@vllm-semantic-router.ai> (cherry picked from commit 39facba4e64c8272351d0b351a7e185fffea6800)
Signed-off-by: xunzhuo <xunzhuo@vllm-semantic-router.ai>

Purpose
User,LLM, andAgentin the dashboard UI.DashboardTest Plan
go test ./router/...(cwd:dashboard/backend)npm --prefix dashboard/frontend run type-checkmake dashboard-checkmake agent-ci-gate CHANGED_FILES='dashboard/backend/router/router_replay_redaction.go,dashboard/backend/router/router_replay_redaction_test.go,dashboard/frontend/src/pages/insightsPageTypes.ts,dashboard/frontend/src/pages/insightsPageToolTrace.tsx,dashboard/frontend/src/pages/insightsPageSupport.tsx,dashboard/frontend/src/pages/InsightsPage.module.css,dashboard/frontend/e2e/auth-flow.spec.ts'npx playwright test e2e/auth-flow.spec.ts -g 'replay flow'(cwd:dashboard/frontend)Test Result
make agent-smoke-localwas attempted, but it did not produce a result within the current session window, so local stack smoke is not included in the validated set.