Skip to content

Color trace lines by diagnostic thresholds#82

Open
wndzph9jkb-create wants to merge 1 commit into
tsperf:mainfrom
wndzph9jkb-create:issue-40-threshold-colors
Open

Color trace lines by diagnostic thresholds#82
wndzph9jkb-create wants to merge 1 commit into
tsperf:mainfrom
wndzph9jkb-create:issue-40-threshold-colors

Conversation

@wndzph9jkb-create

Copy link
Copy Markdown

Summary

Closes #40.

This adds diagnostic-threshold coloring to the trace tree UI:

  • colors trace node durations using traceTimeThresholds
  • colors local type counts using traceTypeThresholds
  • colors total type counts using traceTotalTypeThresholds
  • colors type-row durations using traceTimeThresholds
  • uses VS Code diagnostic theme colors for error/warning/info states

Notes

Severity is annotated before sending trace data to the webview, as suggested in the issue. The shared message schema now includes the severity fields so they are preserved during Zod parsing on the UI side.

I also fixed the trace tree duration display so the microsecond-to-ms conversion happens before rounding.

A regression test covers showTree message parsing so severity fields do not get stripped from tree nodes or type rows.

Verification

  • corepack pnpm exec vitest run
  • corepack pnpm typecheck
  • corepack pnpm lint
  • corepack pnpm run generate:contributes
  • cd srcDev && corepack pnpm exec rollup -c
  • corepack pnpm exec nuxt build ui
  • corepack pnpm exec rollup -c

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.

use colors to help readability of trace lines

1 participant