Skip to content

[Dashboard] Fix readonly tool trace access in record detail#1707

Merged
Xunzhuo merged 4 commits intomainfrom
vsr/tool-trace-access-ui
Apr 3, 2026
Merged

[Dashboard] Fix readonly tool trace access in record detail#1707
Xunzhuo merged 4 commits intomainfrom
vsr/tool-trace-access-ui

Conversation

@Xunzhuo
Copy link
Copy Markdown
Member

@Xunzhuo Xunzhuo commented Apr 3, 2026

Purpose

  • Preserve readonly visibility for tool trace structure while continuing to redact per-step inputs and outputs.
  • Fix tool trace success-rate calculation for readonly users by carrying a redacted success/failure status through the dashboard backend and frontend.
  • Simplify record-detail signal/projection tags and map tool-trace source labels to User, LLM, and Agent in the dashboard UI.
  • Affected module(s): Dashboard

Test Plan

  • go test ./router/... (cwd: dashboard/backend)
  • npm --prefix dashboard/frontend run type-check
  • make dashboard-check
  • make 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

  • All commands above passed.
  • make agent-smoke-local was attempted, but it did not produce a result within the current session window, so local stack smoke is not included in the validated set.
  • Existing dashboard lint/build warnings from unrelated files are still present, but there were no new errors from this change.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 3, 2026

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit 6980023
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/69cf423b9734b20008943678
😎 Deploy Preview https://deploy-preview-1707--vllm-semantic-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Xunzhuo Xunzhuo marked this pull request as ready for review April 3, 2026 03:00
@Xunzhuo Xunzhuo requested a review from rootfs as a code owner April 3, 2026 03:00
Copilot AI review requested due to automatic review settings April 3, 2026 03:00
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

✅ Supply Chain Security Report — All Clear

Scanner Status Findings
AST Codebase Scan (Py, Go, JS/TS, Rust) 29 finding(s) — MEDIUM: 23 · LOW: 6
AST PR Diff Scan No issues detected
Regex Fallback Scan No issues detected

Scanned at 2026-04-03T04:30:16.975Z · View full workflow logs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

👥 vLLM Semantic Team Notification

The following members have been identified for the changed files in this PR and have been automatically assigned:

📁 Root Directory

Owners: @rootfs, @Xunzhuo
Files changed:

  • .github/workflows/pre-commit.yml
  • .pre-commit-config.yaml
  • CONTRIBUTING.md

📁 dashboard

Owners: @Xunzhuo, @JaredforReal, @haowu1234, @szedan-rh, @yehuditkerido, @henschwartz
Files changed:

  • dashboard/backend/mcp/types.go
  • dashboard/backend/router/router_replay_redaction.go
  • dashboard/backend/router/router_replay_redaction_test.go
  • dashboard/frontend/e2e/auth-flow.spec.ts
  • dashboard/frontend/src/components/ChatComponent.tsx
  • dashboard/frontend/src/components/ChatComponentToolCards.tsx
  • dashboard/frontend/src/components/ChatComponentTypes.ts
  • dashboard/frontend/src/pages/InsightsPage.module.css
  • dashboard/frontend/src/pages/insightsPageSupport.tsx
  • dashboard/frontend/src/pages/insightsPageToolTrace.tsx
  • dashboard/frontend/src/pages/insightsPageTypes.ts
  • dashboard/frontend/src/tools/mcp/api.ts
  • dashboard/frontend/src/tools/mcp/index.ts
  • dashboard/frontend/src/tools/mcp/mcpToolBridge.ts

📁 docs

Owners: @Xunzhuo
Files changed:

  • docs/agent/tech-debt/td-006-structural-rule-target-vs-legacy-hotspots.md
  • docs/agent/testing-strategy.md

📁 src/semantic-router

Owners: @rootfs, @Xunzhuo, @szedan-rh, @yehuditkerido, @abdallahsamabd, @asaadbalum, @liavweiss, @noalimoy
Files changed:

  • src/semantic-router/pkg/cache/hybrid_cache.go
  • src/semantic-router/pkg/cache/inmemory_cache.go
  • src/semantic-router/pkg/classification/classifier_model_select.go
  • src/semantic-router/pkg/classification/complexity_classifier.go
  • src/semantic-router/pkg/classification/embedding_classifier.go
  • src/semantic-router/pkg/classification/fact_check_classifier.go
  • src/semantic-router/pkg/classification/feedback_detector.go
  • src/semantic-router/pkg/classification/hallucination_detector.go
  • src/semantic-router/pkg/classification/keyword_classifier.go
  • src/semantic-router/pkg/classification/mcp_classifier.go
  • src/semantic-router/pkg/classification/prototype_scoring_logging.go
  • src/semantic-router/pkg/classification/unified_classifier.go
  • src/semantic-router/pkg/extproc/processor_res_body_streaming.go
  • src/semantic-router/pkg/extproc/processor_res_body_streaming_test.go
  • src/semantic-router/pkg/extproc/processor_res_cache.go
  • src/semantic-router/pkg/extproc/processor_res_cache_test.go
  • src/semantic-router/pkg/extproc/req_filter_looper.go
  • src/semantic-router/pkg/extproc/router_selection.go
  • src/semantic-router/pkg/looper/base.go
  • src/semantic-router/pkg/looper/client.go
  • src/semantic-router/pkg/looper/confidence.go
  • src/semantic-router/pkg/looper/ratings.go
  • src/semantic-router/pkg/looper/rl_driven.go
  • src/semantic-router/pkg/memory/milvus_store.go
  • src/semantic-router/pkg/modelselection/selector.go
  • src/semantic-router/pkg/responsestore/redis_store.go
  • src/semantic-router/pkg/selection/automix.go
  • src/semantic-router/pkg/selection/elo.go
  • src/semantic-router/pkg/selection/factory.go
  • src/semantic-router/pkg/selection/gmtrouter.go
  • src/semantic-router/pkg/selection/hybrid.go
  • src/semantic-router/pkg/selection/ml_adapter.go
  • src/semantic-router/pkg/selection/rl_driven.go
  • src/semantic-router/pkg/selection/router_dc.go
  • src/semantic-router/pkg/selection/static.go
  • src/semantic-router/pkg/selection/storage.go
  • src/semantic-router/pkg/tools/tools.go

📁 tools

Owners: @Xunzhuo, @yuluo-yx, @samzong
Files changed:

  • tools/agent/structure-rules.yaml
  • tools/linter/go/.golangci.agent.yml
  • tools/make/pre-commit.mk

vLLM

🎉 Thanks for your contributions!

This comment was automatically generated based on the OWNER files in the repository.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-result status plus a content_redacted marker.
  • 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.

Comment on lines 25 to +29
tool_name?: string
tool_call_id?: string
arguments?: string
status?: string
content_redacted?: boolean
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines 188 to +193
{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}
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Signed-off-by: xunzhuo <xunzhuo@vllm-semantic-router.ai>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Performance Benchmark Results

Component benchmarks completed successfully.

Summary

  • Classification benchmarks: ✅
  • Decision engine benchmarks: ✅
  • Cache benchmarks: ✅

Details

See attached benchmark artifacts for detailed results and profiles.


Performance testing powered by vLLM Semantic Router

@Xunzhuo Xunzhuo force-pushed the vsr/tool-trace-access-ui branch from 7db140d to c05da21 Compare April 3, 2026 03:39
Xunzhuo added 3 commits April 3, 2026 12:00
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>
@Xunzhuo Xunzhuo merged commit 43ad22f into main Apr 3, 2026
33 checks passed
@Xunzhuo Xunzhuo deleted the vsr/tool-trace-access-ui branch April 3, 2026 06:36
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.