Repository navigation
feat(components): flash checked components, add a Pangular Performance track and profiling toggle - #385
Merged
Conversation
…e track and profiling toggle Adds three live change detection views, toggled from the panel and through new flash, track and angularProfiling arguments on the change-detection tool: a flash overlay over each checked component, a Pangular track in the Chrome Performance panel through console.timeStamp, and ng.enableProfiling(). Each costs nothing while off. Refs #341
Rebuilds extension/ui for the live change detection views.
Contributor
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
|
View your CI Pipeline Execution ↗ for commit 67a11e4
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
15 tasks done
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.
Refs #341. This PR does the last two "Change detection profiling" items of phase 2.
What it adds
Three live change detection views. Each one is toggled from a new Live views group under Record in the Components change detection section, or by agents through new
flash,trackandangularProfilingarguments on thechange-detectiontool. None of them attaches a profiler listener while it is off.cd-flash.ts)pointer-events: none,aria-hiddencanvas in its own shadow root and never changes the app's own DOM.devicePixelRatio, resizing and page scrolling, and shows a still outline instead of the fade underprefers-reduced-motion.cd-perf-track.ts)console.timeStamp, with one entry per component check, lifecycle hook and output listener.console.timeStampis missing.ng.enableProfiling()when the page has it. This can't be undone, so the toggle stays on until the page reloads, and the panel and the tool say so.cd-live.tsconnects the three views to the page. The page reports their state asoptionsin the change detection report. The newrequest-change-detection-optionsRPC is registered inRPC_INSPECTOR.change-detectionwas already anactiontool, so I added arguments to it rather than a new tool. In read-only mode the new arguments are hidden and refused, the same asrecord. The views can be combined withrecordbut not withexport.Tests
cd-flash.test.ts(12): nothing attached while off, measuring once per frame, the label count, fading, reduced motion, the box cap,devicePixelRatio, resizing and scrolling, and that the app's own DOM stays untouched.cd-live.test.ts(10): the exactconsole.timeStampcalls against a stubbed console,enableProfilingcalled once, the three views sharing one Angular profiler, and that page events are filtered bypageId.cd-views-tool.test.ts(6): the tool arguments and the RPC.app/src/__tests__/cd-views.test.ts(8): the panel toggles.config.test.tsandhub-messages.test.ts: read-only handling and hub messages.Docs
inspectors/components.md: new "Watch checks live" section.agents/tools.md: the new arguments.Checks
pnpm format:check,pnpm typecheck,pnpm docs:buildandpnpm skills:check: pass.pnpm test:devtools: 2284 passed.pnpm test:panel: 521 passed.pnpm extension:build: done;extension/uiis in its own commit.Not covered
ng.enableProfiling()returns a function that turns profiling off again. The toggle ignores it and treats profiling as one-way.Generated by Claude Code
Summary by CodeRabbit