Skip to content

feat: comprehensive v1 - inline decorations, visualizations, sidebar, monorepo support - #81

Open
eddy5885 wants to merge 1 commit into
tsperf:mainfrom
eddy5885:feat/comprehensive-v1
Open

feat: comprehensive v1 - inline decorations, visualizations, sidebar, monorepo support#81
eddy5885 wants to merge 1 commit into
tsperf:mainfrom
eddy5885:feat/comprehensive-v1

Conversation

@eddy5885

@eddy5885 eddy5885 commented Jun 3, 2026

Copy link
Copy Markdown

Summary

This PR delivers a comprehensive v1 upgrade to tsperf/tracer, addressing multiple open issues in a single cohesive implementation. Built for the Algora TSPerf Type Challenge.

New Features

  • Inline Decorations (addresses visualizations #46, Add trace line visual tones #59): Severity-based heatmap overlays showing type complexity directly in the editor — red/yellow/green with gutter icons, overview ruler markers, and hover messages showing duration and type counts
  • Sidebar Panel (addresses 🚨 unwelcome pr from bot 🚨 #80): Activity bar sidebar with file-level summaries and hot spots tree view — click to navigate to problematic positions
  • Flame Chart Visualization (addresses visualizations #46, Add hot path trace visualization #53): Interactive flame chart in the trace viewer with click-to-navigate and hover tooltips
  • Bar Chart Visualization: Top 20 slowest checks bar chart with color-coded duration bars
  • Tree Node Visual Tones (addresses Add trace line visual tones #59): Color-coded duration backgrounds and inline duration bars on tree nodes
  • Trace Expression Command: Select an expression and instantly measure its type complexity (QuickInfo + Completions timing) — shows inline result that auto-clears after 5s
  • Monorepo/tsconfig Selection (addresses Monorepo support #33, fix: choose containing tsconfig for monorepo files #79): Select tsconfig command for workspaces with multiple tsconfig.json files — auto-detects all configs and lets user switch
  • Incremental Metrics Cache: Persistent measurement cache that avoids re-measuring unchanged files and positions — includes "Show Metrics Overview" command for top hot spots
  • Code Action Suggestions (addresses Trace analysis and suggestions #42): QuickFix suggestions for simplifying complex types — extract type alias, use satisfies, add explicit annotations

Bug Fixes

  • Fixed typo: clearTaceDiagnosticsclearTraceDiagnostics (in traceDiagnostics.ts and commands.ts)
  • Updated generate-contributes.ts to properly generate all new commands, settings, and view registrations

Configuration

  • New setting: tsperf.tracer.enableInlineDecorations (default: true)

Commands Added

  • Tracer: Trace expression at cursor
  • Tracer: Select tsconfig for tracing
  • Tracer: Show metrics overview

Test Plan

  • Open a TypeScript project with complex types
  • Run Tracer: tsc trace and verify flame chart + bar chart render in trace viewer
  • Verify inline decorations appear with correct severity colors
  • Verify sidebar panel shows hot spots and clicking navigates to position
  • Select an expression → Tracer: Trace expression at cursor → verify inline duration appears
  • In a monorepo workspace, run Tracer: Select tsconfig for tracing → verify QuickPick shows all tsconfigs
  • Run Tracer: Show metrics overview → verify QuickPick shows top hot spots
  • Verify code action suggestions appear on slow type positions
  • Verify enableInlineDecorations setting toggles decorations on/off

🤖 Generated with Claude Code

… monorepo support, incremental metrics

- Add inline decorations with severity-based heatmap (error/warning/info) and gutter icons
- Add sidebar panel with hot spots tree view and file-level summaries
- Add flame chart and bar chart visualizations in webview
- Add visual tone colors and duration bars to tree nodes
- Add trace expression command for measuring type complexity at cursor
- Add tsconfig selection for monorepo support
- Add incremental metrics cache for real-time measurement optimization
- Add code action suggestions for simplifying complex types
- Fix typo: clearTaceDiagnostics -> clearTraceDiagnostics
- Update generate-contributes.ts to support new commands, settings, and views

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@eddy5885
eddy5885 requested a review from danielroe as a code owner June 3, 2026 07:38
@eddy5885

Copy link
Copy Markdown
Author

Hi! 👋

I submitted this comprehensive PR about two weeks ago and haven't received any feedback yet. I'd love to know:

  1. Is this PR still under consideration?
  2. Are there any specific areas you'd like me to improve or clarify?

I'm happy to iterate on this based on your feedback. Thanks for your time!

Comment thread package.json
"dev": "nr build --watch --sourcemap",
"ui:dev": "nuxt dev ui",
"ui:build": "nuxt build ui",
"ui:build": "npx nuxt build ui",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this should not be needed

Comment thread package.json
"d3": "^7.9.0",
"d3-flame-graph": "^4.1.3",
"eslint": "^9.3.0",
"jiti": "^2.7.0",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what was this for?

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.

2 participants