690 Commits

Author SHA1 Message Date
Alan Agius 29f9dd5e77 refactor(devtools): update angular optimization plugin for JavaScriptTransformer API
Update createEsbuildAngularOptimizePlugin to use the new options object signature for JavaScriptTransformer.transformFile, and update the @angular/build dependency to 22.2.0-next.7.
2026-09-10 15:06:43 -07:00
Edu ef09d108f2 fix(devtools): safely handle foreign root elements in feature detection
Prevent Angular DevTools from crashing when elements matching [ng-version] in the DOM do not belong to the host application (such as third-party custom elements or browser extensions). ng.getComponent returns null for these elements, which previously caused ng.getDirectiveMetadata to throw.
2026-09-09 22:26:00 +02:00
Angular Robot 25317c3837 build: update dependency cypress to v16
See associated pull request for more information.
2026-09-09 16:33:56 +02:00
Kam d6d51a0ef8 test(devtools): run the orphaned app component spec
`app.component.spec.ts` has been in the tree since the initial DevTools commit
in 2020, but no revision of `shell-browser/src/app/BUILD.bazel` has ever listed
it, and that file has no globs. Two of the three specs in the directory are
wired up; this one has never run.

It could not run as written. The setup declared `AppComponent` and imported
`RouterModule.forRoot([])`, neither of which applies now that the component is
standalone and injects `MessageBus` and `DEEP_LINK_INSTANCE_ID`.

It now stubs the `chrome.devtools` surface that `ngOnInit` reads and covers
both lifecycle hooks: the listeners registered on init, the two performance
track emits, the three guards on the deep link listener, and the listeners
removed on destroy.

Follow-up to #70570, which fixed the same problem in ng-devtools-backend.
2026-09-09 16:11:01 +02:00
hawkgs 635ef1bd80 refactor(devtools): contain hydration overlays functionality on the be
Move the refresh mechanism of the hydration overlays to the backend,
delegating only the feature toggling to the frontend.
2026-09-09 16:10:25 +02:00
Kam 3dfc855381 test(devtools): run the orphaned supported-apis spec
`supported-apis.spec.ts` was added in #60585, in a commit that also edited the
`ts_test_library` three lines below the `srcs` it was left out of. No revision
of that BUILD file has ever listed it, so it has not run since March 2025. The
target goes from 12 specs to 14.

Wiring it up alone would not have worked. Every `*IsSupported` helper calls
`ngDebugClient()`, which throws when `window.ng` is undefined, and the old
`expect(supported).toBeTruthy()` set no `ng` at all. It now stubs `ng` and
checks the flag set and that each flag tracks its own debug API.

`ng-debug-api.spec.ts` adds an `[ng-version]` root and did not remove it, which
`getAppRoots()` then picks up in the other file under jasmine's random
ordering, so it now clears the DOM in its own `afterEach`.

`glob` matches the sibling `directive-forest/component-tree` target and keeps
the next spec in this directory from being dropped the same way.
2026-09-04 07:46:46 -07:00
hawkgs 00ec65546b refactor(devtools): fix signal details UI
Fix different action buttons and value preview container size.
2026-09-01 09:33:35 -07:00
Matthieu Riegler 9cf7b44f7c build: remove explicit strict options
Those options are enabled by default, they don't need to be explicit.
2026-08-31 13:17:00 -07:00
Kam ad22e89d4d refactor(devtools): point the .gitignore comment at live GitHub docs
help.github.com/ignore-files/ 404s since GitHub retired that domain.
2026-08-27 13:44:43 -07:00
hawkgs c1ac4b750a refactor(devtools): convert remaining console calls to the custom log
Convert the remaining calls introduced by the #70254.
2026-08-26 15:38:33 -07:00
Alan Agius 1d0945fa32 release: bump Angular DevTools version to 1.21.0 2026-08-26 09:56:48 +02:00
hawkgs 07605ba793 feat(devtools): implement CD analyzer (#70254)
Implement component highlighting on change detection cycles along with embedding
the component-specific data to the directive/component tree explorer.

Closes #59057

PR Close #70254
2026-08-25 10:35:42 -07:00
hawkgs 82882fae51 refactor(devtools): add TTL and outline style to the highlighting mechanism (#70254)
Add the ability to automatically destroy created highlights by a provided TTL;
Add the option for outline style of the highlight overlays;
Add `prefer-inset` label position;

PR Close #70254
2026-08-25 10:35:42 -07:00
Georgi Serev 1371c946aa refactor(devtools): use a custom logger and error
Use a custom logger that prefixes the messages with `[Angular DevTools]`;
Add ability for dev-only log messages;
Add Angular-DevTools-specific `Error`;
2026-08-25 09:55:04 -07:00
Cameron Smick 82a767535e feat(devtools): add "Watch signal" button to signal-details component
Add a "Watch signal" button to the signal-details component to allow users to "watch" changes to the associated signal.
2026-08-24 15:35:44 -07:00
Aleksander Bodurri 434acc506e refactor(devtools): update profiler instruction text for clearing recordings
I suspect this text used to be correct but became outdated after UI changes. These is no "refresh" button.
2026-08-24 10:34:37 -07:00
Doug Parker d609cf6e09 release: bump Angular DevTools version to 1.20.0 2026-08-19 13:22:03 -07:00
hawkgs 023a63df8c refactor(devtools): unsubs from profiler when the perf track is disabled
Avoid the leak by unsubscribing from the profiler when the performance track is disabled.
Additionally, drop the duplicated performance track state flag.
2026-08-19 08:26:01 -07:00
Kristiyan Kostadinov 732e505018 fix(core): replace all hasOwnProperty usages with Object.hasOwn
We keep getting PRs that target single usages of `hasOwnProperty` and we have ~100 of them. These changes aim to address the issue centrally by swapping out all the instances and adding a lint rule against introducing new ones.
2026-08-18 09:17:18 -07:00
splincode d35c17d393 refactor: correct typos in comments, docs, and error messages
Fix misspellings found across multiple packages:

- `paramters` → `parameters` (utils.spec.ts)
- `directve` → `directive` (typecheck/context.ts)
- `subscriper` → `subscriber` (zone.js rxjs test)
- `swich` → `switch` (adev animation parser test)
- `subscribtion` → `subscription` (forms/abstract_model.ts)
- `lifecyle` → `lifecycle` (ng-devtools-backend hooks)
- `compatability` → `compatibility` (tree-visualizer.ts)
- `indentifier(s)` → `identifier(s)` (compiler-cli shared.ts, i18n_helpers.ts, declaration_only_emission_spec.ts)
- `identifer` → `identifier` (platform-browser shared_styles_host.ts)
- `prcess` → `process` (standalone-migration to-standalone.ts)
2026-08-17 14:57:04 -07:00
hawkgs 9711e86f2a refactor(devtools): collapse injected services section in the side pane by default
Collapse the section since it takes a significant portion of the vertical space,
whereas most of the times users are exploring the properties leading them to scroll.

Addiotionally, introduce some other minor UI improvements.
2026-08-17 13:30:46 -07:00
hawkgs f746463caa fix(devtools): breadcrumbs missing nav arrows
Show the missing nav arrows when you select a deeply nested component where
the breadcrumbs path is longer than the container. The nav arrows used to
appear only when the split is resized. Add some other minor improvements.
2026-08-17 13:29:05 -07:00
Aleksander Bodurri 2a2585708a fix(devtools): clarify disabled View Source tooltip and update demo app
Before: The View Source button tooltip in signal details static ('View source') even when disabled.

After: The tooltip explains 'Source location is not available for this node' when disabled.
2026-08-17 13:28:27 -07:00
Aleksander Bodurri a3a7764975 fix(devtools): prevent duplicate highlightComponent listener in injector tree
Move the message bus subscription out of afterRenderEffect into constructor initialization and clean up the listener on destroy using DestroyRef.
2026-08-17 10:37:40 -07:00
Edu 12b0acd498 feat(devtools): implement persistent breakpoints on signal consumers using CDP
Implements persistent breakpoints for Angular signal consumers (computeds and effects) in Angular DevTools using Chrome DevTools Protocol (CDP).

- Adds debugger permission to Chrome and Firefox extension manifests.
- Implements CDP breakpoint orchestration in background script.
- Updates SignalDetailsComponent and SignalGraphPaneComponent with label icon toggle and persistent state sync across reloads.
2026-08-14 08:26:55 -07:00
Doug Parker 9810a3e33c release: bump Angular DevTools version to 1.19.1 2026-08-12 19:47:21 +00:00
Georgi Serev 66c5ea7544 refactor(devtools): improve profiler ux
- Add info tooltips that describe the visualizations and other
parts of the UI
- Improve the frame selector by adding axes labels and a
horizontal line for frames exceeding 60 fps
- Use a precise frame rate calculations instead of approximations
- Introduce improvements to the details panel
- Improve the bar chart visualization
- And more
2026-08-11 10:00:02 -07:00
Matthieu Riegler 03f1758e2a fix(devtools): fix regression for node serialization.
This fixes a regression introduced by #69309 where the format of `serializedId` from a coma separated string, to a JSON representation of an array.

fixes #70104
2026-08-07 16:30:22 -07:00
Alan Agius cf1844bcce refactor(devtools): use JavaScriptTransformer for Angular optimization esbuild plugin
Refactor the devtools optimization esbuild plugin to use JavaScriptTransformer from @angular/build/private.
2026-08-07 10:30:52 -07:00
Alan Agius 573145afb5 refactor(devtools): remove async-await downleveling as devtools is zoneless
Remove the supported 'async-await': false option in esbuild-base.config.mts as Angular DevTools is zoneless and does not require downleveling async/await syntax.
2026-08-07 10:30:52 -07:00
Alan Agius 07f58006c5 refactor(devtools): rely on esbuild to downlevel async generators
Configure esbuild with supported 'async-await': false in esbuild-base.config.mts so esbuild downlevels async functions and async generators natively.

This allows removing the custom Babel plugin @babel/plugin-transform-async-generator-functions and downlevelAsyncGeneratorsIfPresent option.
2026-08-07 10:30:52 -07:00
Matthieu Riegler 3a29329191 fix(devtools): Extension name for non googlers.
For corps urls the promise is actually resolved but returns a `status:0`.

fixes #70023
2026-07-31 11:18:21 -07:00
hawkgs e144e697ff refactor(devtools): substitute remaining Angie images with ng-angie
Substitute the remaining `<img>`s with the Angie component.
2026-07-31 08:36:09 -07:00
hawkgs 5124417370 refactor(devtools): hide search button when there is not a signal graph
The button is not functional when there isn't a graph. No need to keep it.
2026-07-30 08:49:56 -07:00
Georgi Serev 1113faf2df refactor(devtools): create Angie component
Introduce a component that provides shared styling for Angie illustrations and predefined sizes for ease of use.
2026-07-30 08:44:59 -07:00
Kam 4b83d09a94 fix(devtools): invoke selectedNode signal in directive tree keyboard guard
`isEditingDirectiveState` used `!this.selectedNode` (a bare signal
reference, always truthy) instead of `!this.selectedNode()`, so the
guard was dead and ArrowDown with no selection threw a TypeError.
2026-07-30 08:38:28 -07:00
Alan Agius 892ea7bec4 release: bump Angular DevTools version to 1.19.0 2026-07-30 09:33:55 +02:00
splincode 1a2bcb2295 fix(devtools): avoid initializing profiler in production mode
Defer the timing hook subscription until the timing API is explicitly enabled. Keep production module loading and development initialization covered by isolated browser test targets.
2026-07-29 16:51:09 -07:00
Kam 3d09713386 feat(devtools): show Angie on the remaining empty-state screens
Extend the Angie illustrations to the empty states that were still plain
text: the injector providers "No such providers" result, the injector tree
unsupported-version notice, the two profiler timeline placeholders, and the
router tree unsupported-version notice.

Adds the magnifying-glass and question poses as assets; the orthos-back
and sad poses are already in the tree.
2026-07-29 09:40:42 -07:00
Edu 1b09130640 feat(devtools): rename DevTools tab to "Angular & Wiz" for Googlers
Conditionally update the browser DevTools tab name to "Angular & Wiz" if the user is identified as a Google employee via internal corp network detection.
2026-07-29 08:41:07 -07:00
Georgi Serev 184c4797b8 refactor(devtools): rename timing API to performance track
Rename Timing API to Performance Track to better reflect the purpose of the actual feature;
Migrate the settings data object to match the new name and drop some redundant keys.
2026-07-29 08:38:39 -07:00
Doug Parker e779309930 release: bump Angular DevTools version to 1.18.0 2026-07-23 12:02:11 -07:00
Kam 00699f3e66 refactor(devtools): add alt text to the empty-state screen illustrations
The Angie illustrations on the DevTools empty-state screens (added in
#69786) shipped with an empty `alt` and `aria-hidden="true"`. Give them
descriptive alt text and drop `aria-hidden` to improve accessibility.
2026-07-20 14:25:17 +02:00
Kam b26c1abe07 feat(devtools): show Angie on tab empty states
The Transfer State and signal-graph tabs render bare-text placeholders
when there's nothing to show. Add the Angie mascot to both, matching the
pattern already shipped on the top-level DevTools screens (#69786):

- Transfer State "isn't using Transfer State" card: replace the
  swap_horiz icon with the teaching pose.
- Signal graph "No signals in this component": add the orthos-back pose
  above the message.
2026-07-20 11:50:05 +02:00
hawkgs a7ebf1cd69 refactor(devtools): reorganize backend code
Organize code into domain/feature-specific folders and a shared API folder.
2026-07-20 11:15:53 +02:00
hawkgs 2aecfb0f38 refactor(devtools): format code
Format DevTools TypeScript files.
2026-07-20 10:48:28 +02:00
Georgi Serev 075ed05480 docs(devtools): add a settings doc
Add a doc describing the settings mechanism and the process of updating the settings options.
2026-07-20 10:46:50 +02:00
Kam d4f2313e4d feat(devtools): show Angie on the empty-state screens
The DevTools state screens (Angular not detected, unsupported version,
production build) showed a plain Material icon above the message. Show
the Angie mascot instead, matching the treatment already used across
angular.dev (the 404 page, empty search, the preview error state).

Each screen uses a pose that fits its message: the dizzy `error` pose for
"application not detected", `coding-01` for the version-upgrade prompt,
and `sad` for the production build notice.
2026-07-15 14:48:01 -07:00
Doug Parker d7a13b989a release: bump Angular DevTools version to 1.17.0 2026-07-15 13:25:23 -07:00
Georgi Serev 98115e8137 refactor(devtools): revamp highlighter
Revamp the highlighter by introducing a completely new mechanism.
2026-07-15 11:59:04 -07:00