Skip to content

build(api-goldens): skip Angular internals, leave other protected members#1246

Merged
spike-rabbit merged 4 commits intomainfrom
build/sane-goldens
Jan 12, 2026
Merged

build(api-goldens): skip Angular internals, leave other protected members#1246
spike-rabbit merged 4 commits intomainfrom
build/sane-goldens

Conversation

@dr-itz
Copy link
Copy Markdown
Member

@dr-itz dr-itz commented Dec 27, 2025

This is a follow-up to #1237 to be more complete and less buggy:

  • skips also the static Angular internals
  • skips Angular life cycle hooks
  • leaves protected stuff of non-Angular classes alone

Summary

Refines API-goldens generation to more completely exclude Angular internals while preserving non-Angular protected members.

Key changes:

  • tools/api-goldens/index.ts: support per-package runs via CLI (colon-separated package list).
  • tools/api-goldens/test_api_report.ts: add Angular filtering (skip static Ivy fields like ɵcmp/ɵfac/ɵdir/ɵinj/ɵmod/ɵprov, lifecycle hooks such as ngOnInit/ngOnDestroy/ngOnChanges/ngAfterViewInit, and static Angular internals) by patching ApiReportGenerator._shouldIncludeDeclaration; retains protected members for non-Angular classes and removes the previous Collector monkey-patch.
  • Regenerated api-goldens across many packages (charts-ng, dashboards-ng, element-ng, element-translate-ng, live-preview, native-charts-ng, …), removing Angular compiler/runtime metadata and lifecycle method signatures from the public API reports.

Impact: reduces noise from Angular-generated symbols in API reports while keeping intended public and protected API surfaces. Contributor followed contribution guidelines.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 27, 2025

📝 Walkthrough

Walkthrough

Removes many Angular Ivy compiler metadata fields (ɵcmp, ɵfac, ɵdir, ɵinj, ɵmod, ɵprov) and numerous public lifecycle method signatures (ngOnInit, ngOnDestroy, ngOnChanges, etc.) from multiple API-goldens files across feature packages. Updates API-goldens tooling: tools/api-goldens/index.ts gains a runtime-overridable package list (reads an argv packages argument) and tools/api-goldens/test_api_report.ts centralizes Angular-specific filtering by patching ApiReportGenerator._shouldIncludeDeclaration to skip Angular static fields, protected members, and lifecycle hooks during API report generation.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant CLI as CLI / script
  participant Tool as tools/api-goldens/index.ts
  participant Patcher as tools/api-goldens/test_api_report.ts
  participant ApiGen as ApiReportGenerator
  participant Exporter as ExportAnalyzer
  participant Files as API goldens output

  CLI->>Tool: run api-goldens (optional package arg)
  Note right of Tool: determine actualPackages\n(from argv or default list)
  Tool->>Patcher: initialize patches & helpers (skipAngular)
  Patcher->>ApiGen: monkey-patch _shouldIncludeDeclaration
  Note right of Patcher: skipAngular filters:\n- Angular static fields\n- lifecycle hooks\n- protected members
  Tool->>ApiGen: invoke extraction per package
  ApiGen->>Exporter: collect declarations for package
  Exporter->>ApiGen: call _shouldIncludeDeclaration for each decl
  ApiGen->>Exporter: return false for Angular-specific decls
  Exporter->>Files: write filtered API golden files
  Files-->>CLI: generation complete
Loading

Possibly related PRs

Suggested labels

core-team-discussion

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: skipping Angular internals from API golden files while preserving protected members.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bad5e7a and 5d548ae.

📒 Files selected for processing (102)
  • api-goldens/charts-ng/index.api.md
  • api-goldens/dashboards-ng/index.api.md
  • api-goldens/element-ng/about/index.api.md
  • api-goldens/element-ng/accordion/index.api.md
  • api-goldens/element-ng/action-modal/index.api.md
  • api-goldens/element-ng/application-header/index.api.md
  • api-goldens/element-ng/auto-collapsable-list/index.api.md
  • api-goldens/element-ng/autocomplete/index.api.md
  • api-goldens/element-ng/avatar/index.api.md
  • api-goldens/element-ng/badge/index.api.md
  • api-goldens/element-ng/breadcrumb-router/index.api.md
  • api-goldens/element-ng/breadcrumb/index.api.md
  • api-goldens/element-ng/card/index.api.md
  • api-goldens/element-ng/chat-messages/index.api.md
  • api-goldens/element-ng/circle-status/index.api.md
  • api-goldens/element-ng/color-picker/index.api.md
  • api-goldens/element-ng/column-selection-dialog/index.api.md
  • api-goldens/element-ng/common/index.api.md
  • api-goldens/element-ng/connection-strength/index.api.md
  • api-goldens/element-ng/content-action-bar/index.api.md
  • api-goldens/element-ng/copyright-notice/index.api.md
  • api-goldens/element-ng/dashboard/index.api.md
  • api-goldens/element-ng/datatable/index.api.md
  • api-goldens/element-ng/date-range-filter/index.api.md
  • api-goldens/element-ng/datepicker/index.api.md
  • api-goldens/element-ng/electron-titlebar/index.api.md
  • api-goldens/element-ng/empty-state/index.api.md
  • api-goldens/element-ng/file-uploader/index.api.md
  • api-goldens/element-ng/filter-bar/index.api.md
  • api-goldens/element-ng/filtered-search/index.api.md
  • api-goldens/element-ng/footer/index.api.md
  • api-goldens/element-ng/form/index.api.md
  • api-goldens/element-ng/formly/index.api.md
  • api-goldens/element-ng/header-dropdown/index.api.md
  • api-goldens/element-ng/help-button/index.api.md
  • api-goldens/element-ng/icon-status/index.api.md
  • api-goldens/element-ng/icon/index.api.md
  • api-goldens/element-ng/info-page/index.api.md
  • api-goldens/element-ng/inline-notification/index.api.md
  • api-goldens/element-ng/ip-input/index.api.md
  • api-goldens/element-ng/landing-page/index.api.md
  • api-goldens/element-ng/language-switcher/index.api.md
  • api-goldens/element-ng/link/index.api.md
  • api-goldens/element-ng/list-details/index.api.md
  • api-goldens/element-ng/loading-spinner/index.api.md
  • api-goldens/element-ng/localization/index.api.md
  • api-goldens/element-ng/main-detail-container/index.api.md
  • api-goldens/element-ng/markdown-renderer/index.api.md
  • api-goldens/element-ng/menu/index.api.md
  • api-goldens/element-ng/modal/index.api.md
  • api-goldens/element-ng/navbar-vertical/index.api.md
  • api-goldens/element-ng/navbar/index.api.md
  • api-goldens/element-ng/notification-item/index.api.md
  • api-goldens/element-ng/number-input/index.api.md
  • api-goldens/element-ng/pagination/index.api.md
  • api-goldens/element-ng/password-strength/index.api.md
  • api-goldens/element-ng/password-toggle/index.api.md
  • api-goldens/element-ng/phone-number/index.api.md
  • api-goldens/element-ng/photo-upload/index.api.md
  • api-goldens/element-ng/pills-input/index.api.md
  • api-goldens/element-ng/popover-legacy/index.api.md
  • api-goldens/element-ng/popover/index.api.md
  • api-goldens/element-ng/progressbar/index.api.md
  • api-goldens/element-ng/resize-observer/index.api.md
  • api-goldens/element-ng/result-details-list/index.api.md
  • api-goldens/element-ng/search-bar/index.api.md
  • api-goldens/element-ng/select/index.api.md
  • api-goldens/element-ng/shadow-root/index.api.md
  • api-goldens/element-ng/side-panel/index.api.md
  • api-goldens/element-ng/skip-links/index.api.md
  • api-goldens/element-ng/slider/index.api.md
  • api-goldens/element-ng/sort-bar/index.api.md
  • api-goldens/element-ng/split/index.api.md
  • api-goldens/element-ng/status-bar/index.api.md
  • api-goldens/element-ng/status-counter/index.api.md
  • api-goldens/element-ng/status-toggle/index.api.md
  • api-goldens/element-ng/summary-chip/index.api.md
  • api-goldens/element-ng/summary-widget/index.api.md
  • api-goldens/element-ng/system-banner/index.api.md
  • api-goldens/element-ng/tabs-legacy/index.api.md
  • api-goldens/element-ng/tabs/index.api.md
  • api-goldens/element-ng/theme/index.api.md
  • api-goldens/element-ng/threshold/index.api.md
  • api-goldens/element-ng/toast-notification/index.api.md
  • api-goldens/element-ng/tooltip/index.api.md
  • api-goldens/element-ng/tour/index.api.md
  • api-goldens/element-ng/tree-view/index.api.md
  • api-goldens/element-ng/typeahead/index.api.md
  • api-goldens/element-ng/unauthorized-page/index.api.md
  • api-goldens/element-ng/wizard/index.api.md
  • api-goldens/element-translate-ng/angular-localize/index.api.md
  • api-goldens/element-translate-ng/ngx-translate/index.api.md
  • api-goldens/live-preview/index.api.md
  • api-goldens/live-preview/webcomponents/index.api.md
  • api-goldens/native-charts-ng/gauge/index.api.md
  • api-goldens/native-charts-ng/index.api.md
  • api-goldens/native-charts-ng/microchart-bar/index.api.md
  • api-goldens/native-charts-ng/microchart-donut/index.api.md
  • api-goldens/native-charts-ng/microchart-line/index.api.md
  • api-goldens/native-charts-ng/microchart-progress/index.api.md
  • tools/api-goldens/index.ts
  • tools/api-goldens/test_api_report.ts
💤 Files with no reviewable changes (99)
  • api-goldens/element-ng/column-selection-dialog/index.api.md
  • api-goldens/element-ng/action-modal/index.api.md
  • api-goldens/element-ng/help-button/index.api.md
  • api-goldens/element-ng/summary-chip/index.api.md
  • api-goldens/native-charts-ng/microchart-donut/index.api.md
  • api-goldens/element-ng/tour/index.api.md
  • api-goldens/element-ng/inline-notification/index.api.md
  • api-goldens/element-ng/file-uploader/index.api.md
  • api-goldens/element-ng/popover/index.api.md
  • api-goldens/element-ng/footer/index.api.md
  • api-goldens/element-ng/datatable/index.api.md
  • api-goldens/element-ng/toast-notification/index.api.md
  • api-goldens/element-ng/electron-titlebar/index.api.md
  • api-goldens/element-ng/modal/index.api.md
  • api-goldens/element-ng/filtered-search/index.api.md
  • api-goldens/element-ng/system-banner/index.api.md
  • api-goldens/element-ng/circle-status/index.api.md
  • api-goldens/element-ng/color-picker/index.api.md
  • api-goldens/native-charts-ng/index.api.md
  • api-goldens/element-ng/icon-status/index.api.md
  • api-goldens/element-ng/sort-bar/index.api.md
  • api-goldens/element-ng/result-details-list/index.api.md
  • api-goldens/element-ng/content-action-bar/index.api.md
  • api-goldens/element-ng/date-range-filter/index.api.md
  • api-goldens/element-ng/photo-upload/index.api.md
  • api-goldens/element-ng/navbar/index.api.md
  • api-goldens/element-ng/tabs/index.api.md
  • api-goldens/element-ng/navbar-vertical/index.api.md
  • api-goldens/element-ng/connection-strength/index.api.md
  • api-goldens/element-ng/localization/index.api.md
  • api-goldens/element-ng/wizard/index.api.md
  • api-goldens/element-translate-ng/ngx-translate/index.api.md
  • api-goldens/element-ng/main-detail-container/index.api.md
  • api-goldens/native-charts-ng/microchart-bar/index.api.md
  • api-goldens/element-ng/pagination/index.api.md
  • api-goldens/element-ng/threshold/index.api.md
  • api-goldens/element-ng/ip-input/index.api.md
  • api-goldens/element-ng/landing-page/index.api.md
  • api-goldens/element-ng/common/index.api.md
  • api-goldens/element-ng/breadcrumb/index.api.md
  • api-goldens/element-ng/number-input/index.api.md
  • api-goldens/element-ng/about/index.api.md
  • api-goldens/element-ng/status-toggle/index.api.md
  • api-goldens/element-ng/accordion/index.api.md
  • api-goldens/element-ng/theme/index.api.md
  • api-goldens/element-ng/chat-messages/index.api.md
  • api-goldens/element-ng/password-toggle/index.api.md
  • api-goldens/element-ng/pills-input/index.api.md
  • api-goldens/element-ng/header-dropdown/index.api.md
  • api-goldens/element-ng/avatar/index.api.md
  • api-goldens/live-preview/webcomponents/index.api.md
  • api-goldens/element-ng/tabs-legacy/index.api.md
  • api-goldens/element-ng/shadow-root/index.api.md
  • api-goldens/element-ng/breadcrumb-router/index.api.md
  • api-goldens/element-ng/datepicker/index.api.md
  • api-goldens/element-ng/tooltip/index.api.md
  • api-goldens/element-ng/empty-state/index.api.md
  • api-goldens/element-ng/status-counter/index.api.md
  • api-goldens/element-ng/autocomplete/index.api.md
  • api-goldens/element-ng/popover-legacy/index.api.md
  • api-goldens/element-ng/formly/index.api.md
  • api-goldens/element-ng/language-switcher/index.api.md
  • api-goldens/element-ng/skip-links/index.api.md
  • api-goldens/element-ng/phone-number/index.api.md
  • api-goldens/element-ng/resize-observer/index.api.md
  • api-goldens/element-ng/slider/index.api.md
  • api-goldens/element-ng/auto-collapsable-list/index.api.md
  • api-goldens/element-ng/markdown-renderer/index.api.md
  • api-goldens/element-ng/progressbar/index.api.md
  • api-goldens/element-ng/summary-widget/index.api.md
  • api-goldens/element-ng/copyright-notice/index.api.md
  • api-goldens/element-ng/unauthorized-page/index.api.md
  • api-goldens/element-ng/badge/index.api.md
  • api-goldens/element-ng/info-page/index.api.md
  • api-goldens/element-ng/select/index.api.md
  • api-goldens/element-ng/split/index.api.md
  • api-goldens/native-charts-ng/microchart-line/index.api.md
  • api-goldens/element-ng/menu/index.api.md
  • api-goldens/element-ng/icon/index.api.md
  • api-goldens/element-ng/search-bar/index.api.md
  • api-goldens/element-ng/link/index.api.md
  • api-goldens/native-charts-ng/microchart-progress/index.api.md
  • api-goldens/element-ng/dashboard/index.api.md
  • api-goldens/element-translate-ng/angular-localize/index.api.md
  • api-goldens/element-ng/typeahead/index.api.md
  • api-goldens/element-ng/filter-bar/index.api.md
  • api-goldens/element-ng/notification-item/index.api.md
  • api-goldens/element-ng/status-bar/index.api.md
  • api-goldens/element-ng/loading-spinner/index.api.md
  • api-goldens/live-preview/index.api.md
  • api-goldens/element-ng/list-details/index.api.md
  • api-goldens/element-ng/card/index.api.md
  • api-goldens/element-ng/application-header/index.api.md
  • api-goldens/native-charts-ng/gauge/index.api.md
  • api-goldens/charts-ng/index.api.md
  • api-goldens/element-ng/form/index.api.md
  • api-goldens/element-ng/password-strength/index.api.md
  • api-goldens/element-ng/tree-view/index.api.md
  • api-goldens/element-ng/side-panel/index.api.md
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: spike-rabbit
Repo: siemens/element PR: 1220
File: projects/element-ng/filtered-search/si-filtered-search.component.spec.ts:2602-2733
Timestamp: 2025-12-19T10:37:57.083Z
Learning: For the siemens/element repository, when reviewing PRs, do not duplicate or re-report issues that are already mentioned in the PR comments or objectives. Focus on new findings from the code changes only.
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/module-federation/index.api.md:7-11
Timestamp: 2025-12-23T09:24:44.630Z
Learning: In the siemens/element repository, do not review files in the `api-goldens/` directory as they are auto-generated API reports created by API Extractor.
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/index.api.md:324-325
Timestamp: 2025-12-23T09:25:02.458Z
Learning: In the siemens/element repository, do not review files in the `api-goldens/` directory as they are auto-generated API reports created by API Extractor.
Learnt from: spike-rabbit
Repo: siemens/element PR: 1237
File: tools/api-goldens/test_api_report.ts:19-23
Timestamp: 2025-12-22T13:26:40.908Z
Learning: In the siemens/element repository, the team intentionally uses internal APIs from `microsoft/api-extractor` (such as `AstDeclaration`, `AstModule`, `ExportAnalyzer`, `ApiItemMetadata`, and `Collector` from `/lib/analyzer` and `/lib/collector` paths) in `tools/api-goldens/test_api_report.ts` to customize API extraction behavior (e.g., marking protected members as internal). This is an accepted practice because the required functionality is not available through the public API, and the version is pinned to mitigate risks.
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/translate/index.api.md:12-84
Timestamp: 2025-12-23T09:24:43.561Z
Learning: Do not review files in the `api-goldens/` directory in the siemens/element repository as they are auto-generated by API Extractor.
📚 Learning: 2025-12-22T13:26:40.908Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1237
File: tools/api-goldens/test_api_report.ts:19-23
Timestamp: 2025-12-22T13:26:40.908Z
Learning: In the siemens/element repository, the team intentionally uses internal APIs from `microsoft/api-extractor` (such as `AstDeclaration`, `AstModule`, `ExportAnalyzer`, `ApiItemMetadata`, and `Collector` from `/lib/analyzer` and `/lib/collector` paths) in `tools/api-goldens/test_api_report.ts` to customize API extraction behavior (e.g., marking protected members as internal). This is an accepted practice because the required functionality is not available through the public API, and the version is pinned to mitigate risks.

Applied to files:

  • tools/api-goldens/test_api_report.ts
  • tools/api-goldens/index.ts
📚 Learning: 2025-12-23T09:25:02.406Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/index.api.md:414-414
Timestamp: 2025-12-23T09:25:02.406Z
Learning: Do not review files in the `api-goldens/` directory in the siemens/element repository as they are auto-generated API reports created by API Extractor.

Applied to files:

  • tools/api-goldens/test_api_report.ts
  • tools/api-goldens/index.ts
📚 Learning: 2025-12-23T09:24:43.561Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/translate/index.api.md:12-84
Timestamp: 2025-12-23T09:24:43.561Z
Learning: Do not review files in the `api-goldens/` directory in the siemens/element repository as they are auto-generated by API Extractor.

Applied to files:

  • tools/api-goldens/test_api_report.ts
  • tools/api-goldens/index.ts
📚 Learning: 2025-12-23T09:25:02.458Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/index.api.md:324-325
Timestamp: 2025-12-23T09:25:02.458Z
Learning: In the siemens/element repository, do not review files in the `api-goldens/` directory as they are auto-generated API reports created by API Extractor.

Applied to files:

  • tools/api-goldens/test_api_report.ts
  • tools/api-goldens/index.ts
📚 Learning: 2025-12-19T10:37:57.083Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1220
File: projects/element-ng/filtered-search/si-filtered-search.component.spec.ts:2602-2733
Timestamp: 2025-12-19T10:37:57.083Z
Learning: For the siemens/element repository, when reviewing PRs, do not duplicate or re-report issues that are already mentioned in the PR comments or objectives. Focus on new findings from the code changes only.

Applied to files:

  • tools/api-goldens/test_api_report.ts
📚 Learning: 2025-12-17T04:34:55.597Z
Learnt from: chintankavathia
Repo: siemens/element PR: 1173
File: src/app/examples/si-charts/interactive/interactive.ts:5-5
Timestamp: 2025-12-17T04:34:55.597Z
Learning: Guideline: In Angular projects using OnPush change detection (zoneless mode), you only need to call ChangeDetectorRef.markForCheck() for asynchronous operations (e.g., setTimeout, setInterval, Promises, Observables) where a change is not automatically detected. Event handlers triggered by Angular template bindings (click, input, etc.) will trigger change detection automatically and do not require explicit markForCheck() calls. Apply this broadly to TS files within Angular components/services that use OnPush; use markForCheck() selectively for async work where change detection wouldn’t run otherwise.

Applied to files:

  • tools/api-goldens/test_api_report.ts
  • tools/api-goldens/index.ts
📚 Learning: 2025-12-17T06:59:51.485Z
Learnt from: chintankavathia
Repo: siemens/element PR: 1036
File: projects/dashboards-ng/src/widget-loader.ts:176-182
Timestamp: 2025-12-17T06:59:51.485Z
Learning: In projects/dashboards-ng/src/widget-loader.ts, when checking `factory.moduleName`, there's no need to also check for `factory.moduleLoader` because the TypeScript type system (ModuleOptions type) enforces that `moduleLoader` must be present whenever `moduleName` is provided.

Applied to files:

  • api-goldens/dashboards-ng/index.api.md
📚 Learning: 2025-11-25T15:07:09.316Z
Learnt from: dr-itz
Repo: siemens/element PR: 1059
File: projects/charts-ng/src/components/si-chart-cartesian/si-chart-cartesian.component.ts:345-352
Timestamp: 2025-11-25T15:07:09.316Z
Learning: In the charts-ng project, the `SubchartGrid` interface includes a `categoryId` property that is part of the public API and is used on the consumer side. This property is not part of the ECharts `GridComponentOption` type, but the cast is safe because ECharts ignores extra properties at runtime.

Applied to files:

  • api-goldens/dashboards-ng/index.api.md
📚 Learning: 2025-12-15T07:17:06.981Z
Learnt from: chintankavathia
Repo: siemens/element PR: 1191
File: projects/dashboards-ng/src/components/widget-instance-editor-dialog/si-widget-instance-editor-dialog.component.spec.ts:37-49
Timestamp: 2025-12-15T07:17:06.981Z
Learning: In widget-instance-editor-dialog component tests (projects/dashboards-ng/src/components/widget-instance-editor-dialog/si-widget-instance-editor-dialog.component.spec.ts), real setTimeout waits (e.g., `await new Promise(resolve => setTimeout(resolve, 0))`) must be used instead of `fixture.whenStable()` when testing component initialization. This is likely due to the component's lifecycle behavior or modal initialization timing that fixture.whenStable() cannot properly wait for in zoneless mode.

Applied to files:

  • api-goldens/dashboards-ng/index.api.md
📚 Learning: 2025-12-23T09:24:35.163Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/translate/index.api.md:12-84
Timestamp: 2025-12-23T09:24:35.163Z
Learning: In the siemens/element repository, do not review files under the api-goldens/ directory (e.g., api-goldens/**/index.api.md) since they are auto-generated by API Extractor. Exclude these from review checks and focus on source files that are not auto-generated.

Applied to files:

  • api-goldens/dashboards-ng/index.api.md
📚 Learning: 2025-12-23T09:24:57.843Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/index.api.md:324-325
Timestamp: 2025-12-23T09:24:57.843Z
Learning: Do not review files in the api-goldens directory, as they are auto-generated API reports produced by API Extractor.

Applied to files:

  • api-goldens/dashboards-ng/index.api.md
📚 Learning: 2025-12-23T09:24:40.395Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/module-federation/index.api.md:7-11
Timestamp: 2025-12-23T09:24:40.395Z
Learning: In the siemens/element repository, do not review any files under the api-goldens directory, as they are auto-generated API reports produced by API Extractor. These MD files should be excluded from review unless explicitly overridden.

Applied to files:

  • api-goldens/dashboards-ng/index.api.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (4)
tools/api-goldens/index.ts (1)

10-26: LGTM! Clean implementation of runtime package selection.

The package list extraction and nullish coalescing pattern is straightforward and achieves the goal of enabling selective package processing at runtime without requiring config changes.

tools/api-goldens/test_api_report.ts (3)

38-50: Well-defined constants for Angular filtering.

The _angularStaticFields and _angularLifecycleHooks arrays comprehensively cover Angular Ivy metadata and lifecycle methods. This centralizes the filtering criteria making future updates straightforward.


58-80: Logic correctly implements the PR objectives.

The skipAngular function properly:

  1. Detects Angular classes via ɵfac presence in parent
  2. Skips static Angular metadata fields only within Angular classes
  3. Skips protected members only within Angular classes (preserving them for non-Angular classes)
  4. Skips lifecycle hooks only within Angular classes

This achieves the stated goal of filtering Angular internals while preserving protected members of non-Angular classes. Based on learnings, the use of internal api-extractor APIs is an accepted practice in this repository.


188-201: Clean monkey-patch approach for Angular filtering.

The patch correctly delegates to the original _shouldIncludeDeclaration when skipAngular returns false, preserving all existing behavior while adding the Angular-specific filtering. This is a cleaner solution than patching Collector.prototype.fetchApiItemMetadata as it operates at the right abstraction level (report generation vs. metadata collection).


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 82a6dac and 27fc23b.

📒 Files selected for processing (102)
  • api-goldens/charts-ng/index.api.md
  • api-goldens/dashboards-ng/index.api.md
  • api-goldens/element-ng/about/index.api.md
  • api-goldens/element-ng/accordion/index.api.md
  • api-goldens/element-ng/action-modal/index.api.md
  • api-goldens/element-ng/application-header/index.api.md
  • api-goldens/element-ng/auto-collapsable-list/index.api.md
  • api-goldens/element-ng/autocomplete/index.api.md
  • api-goldens/element-ng/avatar/index.api.md
  • api-goldens/element-ng/badge/index.api.md
  • api-goldens/element-ng/breadcrumb-router/index.api.md
  • api-goldens/element-ng/breadcrumb/index.api.md
  • api-goldens/element-ng/card/index.api.md
  • api-goldens/element-ng/chat-messages/index.api.md
  • api-goldens/element-ng/circle-status/index.api.md
  • api-goldens/element-ng/color-picker/index.api.md
  • api-goldens/element-ng/column-selection-dialog/index.api.md
  • api-goldens/element-ng/common/index.api.md
  • api-goldens/element-ng/connection-strength/index.api.md
  • api-goldens/element-ng/content-action-bar/index.api.md
  • api-goldens/element-ng/copyright-notice/index.api.md
  • api-goldens/element-ng/dashboard/index.api.md
  • api-goldens/element-ng/datatable/index.api.md
  • api-goldens/element-ng/date-range-filter/index.api.md
  • api-goldens/element-ng/datepicker/index.api.md
  • api-goldens/element-ng/electron-titlebar/index.api.md
  • api-goldens/element-ng/empty-state/index.api.md
  • api-goldens/element-ng/file-uploader/index.api.md
  • api-goldens/element-ng/filter-bar/index.api.md
  • api-goldens/element-ng/filtered-search/index.api.md
  • api-goldens/element-ng/footer/index.api.md
  • api-goldens/element-ng/form/index.api.md
  • api-goldens/element-ng/formly/index.api.md
  • api-goldens/element-ng/header-dropdown/index.api.md
  • api-goldens/element-ng/help-button/index.api.md
  • api-goldens/element-ng/icon-status/index.api.md
  • api-goldens/element-ng/icon/index.api.md
  • api-goldens/element-ng/info-page/index.api.md
  • api-goldens/element-ng/inline-notification/index.api.md
  • api-goldens/element-ng/ip-input/index.api.md
  • api-goldens/element-ng/landing-page/index.api.md
  • api-goldens/element-ng/language-switcher/index.api.md
  • api-goldens/element-ng/link/index.api.md
  • api-goldens/element-ng/list-details/index.api.md
  • api-goldens/element-ng/loading-spinner/index.api.md
  • api-goldens/element-ng/localization/index.api.md
  • api-goldens/element-ng/main-detail-container/index.api.md
  • api-goldens/element-ng/markdown-renderer/index.api.md
  • api-goldens/element-ng/menu/index.api.md
  • api-goldens/element-ng/modal/index.api.md
  • api-goldens/element-ng/navbar-vertical/index.api.md
  • api-goldens/element-ng/navbar/index.api.md
  • api-goldens/element-ng/notification-item/index.api.md
  • api-goldens/element-ng/number-input/index.api.md
  • api-goldens/element-ng/pagination/index.api.md
  • api-goldens/element-ng/password-strength/index.api.md
  • api-goldens/element-ng/password-toggle/index.api.md
  • api-goldens/element-ng/phone-number/index.api.md
  • api-goldens/element-ng/photo-upload/index.api.md
  • api-goldens/element-ng/pills-input/index.api.md
  • api-goldens/element-ng/popover-legacy/index.api.md
  • api-goldens/element-ng/popover/index.api.md
  • api-goldens/element-ng/progressbar/index.api.md
  • api-goldens/element-ng/resize-observer/index.api.md
  • api-goldens/element-ng/result-details-list/index.api.md
  • api-goldens/element-ng/search-bar/index.api.md
  • api-goldens/element-ng/select/index.api.md
  • api-goldens/element-ng/shadow-root/index.api.md
  • api-goldens/element-ng/side-panel/index.api.md
  • api-goldens/element-ng/skip-links/index.api.md
  • api-goldens/element-ng/slider/index.api.md
  • api-goldens/element-ng/sort-bar/index.api.md
  • api-goldens/element-ng/split/index.api.md
  • api-goldens/element-ng/status-bar/index.api.md
  • api-goldens/element-ng/status-counter/index.api.md
  • api-goldens/element-ng/status-toggle/index.api.md
  • api-goldens/element-ng/summary-chip/index.api.md
  • api-goldens/element-ng/summary-widget/index.api.md
  • api-goldens/element-ng/system-banner/index.api.md
  • api-goldens/element-ng/tabs-legacy/index.api.md
  • api-goldens/element-ng/tabs/index.api.md
  • api-goldens/element-ng/theme/index.api.md
  • api-goldens/element-ng/threshold/index.api.md
  • api-goldens/element-ng/toast-notification/index.api.md
  • api-goldens/element-ng/tooltip/index.api.md
  • api-goldens/element-ng/tour/index.api.md
  • api-goldens/element-ng/tree-view/index.api.md
  • api-goldens/element-ng/typeahead/index.api.md
  • api-goldens/element-ng/unauthorized-page/index.api.md
  • api-goldens/element-ng/wizard/index.api.md
  • api-goldens/element-translate-ng/angular-localize/index.api.md
  • api-goldens/element-translate-ng/ngx-translate/index.api.md
  • api-goldens/live-preview/index.api.md
  • api-goldens/live-preview/webcomponents/index.api.md
  • api-goldens/native-charts-ng/gauge/index.api.md
  • api-goldens/native-charts-ng/index.api.md
  • api-goldens/native-charts-ng/microchart-bar/index.api.md
  • api-goldens/native-charts-ng/microchart-donut/index.api.md
  • api-goldens/native-charts-ng/microchart-line/index.api.md
  • api-goldens/native-charts-ng/microchart-progress/index.api.md
  • tools/api-goldens/index.ts
  • tools/api-goldens/test_api_report.ts
💤 Files with no reviewable changes (87)
  • api-goldens/element-ng/modal/index.api.md
  • api-goldens/element-ng/progressbar/index.api.md
  • api-goldens/element-ng/toast-notification/index.api.md
  • api-goldens/element-ng/summary-chip/index.api.md
  • api-goldens/element-ng/unauthorized-page/index.api.md
  • api-goldens/element-ng/action-modal/index.api.md
  • api-goldens/element-ng/status-counter/index.api.md
  • api-goldens/element-ng/filtered-search/index.api.md
  • api-goldens/element-translate-ng/angular-localize/index.api.md
  • api-goldens/element-ng/pagination/index.api.md
  • api-goldens/element-ng/help-button/index.api.md
  • api-goldens/element-ng/badge/index.api.md
  • api-goldens/element-ng/shadow-root/index.api.md
  • api-goldens/element-translate-ng/ngx-translate/index.api.md
  • api-goldens/element-ng/markdown-renderer/index.api.md
  • api-goldens/element-ng/theme/index.api.md
  • api-goldens/element-ng/system-banner/index.api.md
  • api-goldens/element-ng/accordion/index.api.md
  • api-goldens/native-charts-ng/index.api.md
  • api-goldens/element-ng/file-uploader/index.api.md
  • api-goldens/element-ng/icon-status/index.api.md
  • api-goldens/element-ng/about/index.api.md
  • api-goldens/element-ng/datatable/index.api.md
  • api-goldens/native-charts-ng/microchart-progress/index.api.md
  • api-goldens/element-ng/common/index.api.md
  • api-goldens/element-ng/circle-status/index.api.md
  • api-goldens/element-ng/empty-state/index.api.md
  • api-goldens/element-ng/breadcrumb-router/index.api.md
  • api-goldens/element-ng/breadcrumb/index.api.md
  • api-goldens/element-ng/result-details-list/index.api.md
  • api-goldens/native-charts-ng/microchart-bar/index.api.md
  • api-goldens/element-ng/ip-input/index.api.md
  • api-goldens/element-ng/status-bar/index.api.md
  • api-goldens/element-ng/notification-item/index.api.md
  • api-goldens/element-ng/split/index.api.md
  • api-goldens/element-ng/pills-input/index.api.md
  • api-goldens/element-ng/formly/index.api.md
  • api-goldens/element-ng/slider/index.api.md
  • api-goldens/native-charts-ng/microchart-donut/index.api.md
  • api-goldens/element-ng/avatar/index.api.md
  • api-goldens/element-ng/color-picker/index.api.md
  • api-goldens/element-ng/wizard/index.api.md
  • api-goldens/element-ng/connection-strength/index.api.md
  • api-goldens/element-ng/language-switcher/index.api.md
  • api-goldens/element-ng/date-range-filter/index.api.md
  • api-goldens/element-ng/footer/index.api.md
  • api-goldens/element-ng/main-detail-container/index.api.md
  • api-goldens/element-ng/inline-notification/index.api.md
  • api-goldens/element-ng/column-selection-dialog/index.api.md
  • api-goldens/element-ng/number-input/index.api.md
  • api-goldens/native-charts-ng/microchart-line/index.api.md
  • api-goldens/element-ng/copyright-notice/index.api.md
  • api-goldens/element-ng/threshold/index.api.md
  • api-goldens/element-ng/resize-observer/index.api.md
  • api-goldens/live-preview/webcomponents/index.api.md
  • api-goldens/element-ng/electron-titlebar/index.api.md
  • api-goldens/element-ng/status-toggle/index.api.md
  • api-goldens/element-ng/form/index.api.md
  • api-goldens/element-ng/localization/index.api.md
  • api-goldens/element-ng/password-toggle/index.api.md
  • api-goldens/element-ng/info-page/index.api.md
  • api-goldens/element-ng/sort-bar/index.api.md
  • api-goldens/element-ng/tour/index.api.md
  • api-goldens/element-ng/phone-number/index.api.md
  • api-goldens/element-ng/tabs-legacy/index.api.md
  • api-goldens/element-ng/tabs/index.api.md
  • api-goldens/element-ng/typeahead/index.api.md
  • api-goldens/element-ng/filter-bar/index.api.md
  • api-goldens/element-ng/link/index.api.md
  • api-goldens/element-ng/navbar/index.api.md
  • api-goldens/charts-ng/index.api.md
  • api-goldens/element-ng/list-details/index.api.md
  • api-goldens/element-ng/photo-upload/index.api.md
  • api-goldens/element-ng/loading-spinner/index.api.md
  • api-goldens/element-ng/summary-widget/index.api.md
  • api-goldens/element-ng/autocomplete/index.api.md
  • api-goldens/element-ng/password-strength/index.api.md
  • api-goldens/element-ng/auto-collapsable-list/index.api.md
  • api-goldens/element-ng/skip-links/index.api.md
  • api-goldens/element-ng/search-bar/index.api.md
  • api-goldens/element-ng/datepicker/index.api.md
  • api-goldens/element-ng/landing-page/index.api.md
  • api-goldens/element-ng/select/index.api.md
  • api-goldens/native-charts-ng/gauge/index.api.md
  • api-goldens/element-ng/application-header/index.api.md
  • api-goldens/element-ng/tree-view/index.api.md
  • api-goldens/live-preview/index.api.md
🧰 Additional context used
🧠 Learnings (15)
📓 Common learnings
Learnt from: spike-rabbit
Repo: siemens/element PR: 1237
File: tools/api-goldens/test_api_report.ts:19-23
Timestamp: 2025-12-22T13:26:32.786Z
Learning: In the siemens/element repository, the team intentionally uses internal APIs from `microsoft/api-extractor` (such as `AstDeclaration`, `AstModule`, `ExportAnalyzer`, `ApiItemMetadata`, and `Collector` from `/lib/analyzer` and `/lib/collector` paths) in `tools/api-goldens/test_api_report.ts` to customize API extraction behavior (e.g., marking protected members as internal). This is an accepted practice because the required functionality is not available through the public API, and the version is pinned to mitigate risks.
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/index.api.md:324-325
Timestamp: 2025-12-23T09:24:57.843Z
Learning: In the siemens/element repository, do not review files in the `api-goldens/` directory as they are auto-generated API reports created by API Extractor.
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/module-federation/index.api.md:7-11
Timestamp: 2025-12-23T09:24:40.395Z
Learning: In the siemens/element repository, do not review files in the `api-goldens/` directory as they are auto-generated API reports created by API Extractor.
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/translate/index.api.md:12-84
Timestamp: 2025-12-23T09:24:35.163Z
Learning: Do not review files in the `api-goldens/` directory in the siemens/element repository as they are auto-generated by API Extractor.
📚 Learning: 2025-12-17T04:34:55.597Z
Learnt from: chintankavathia
Repo: siemens/element PR: 1173
File: src/app/examples/si-charts/interactive/interactive.ts:5-5
Timestamp: 2025-12-17T04:34:55.597Z
Learning: Guideline: In Angular projects using OnPush change detection (zoneless mode), you only need to call ChangeDetectorRef.markForCheck() for asynchronous operations (e.g., setTimeout, setInterval, Promises, Observables) where a change is not automatically detected. Event handlers triggered by Angular template bindings (click, input, etc.) will trigger change detection automatically and do not require explicit markForCheck() calls. Apply this broadly to TS files within Angular components/services that use OnPush; use markForCheck() selectively for async work where change detection wouldn’t run otherwise.

Applied to files:

  • tools/api-goldens/index.ts
  • tools/api-goldens/test_api_report.ts
📚 Learning: 2025-12-11T14:44:11.278Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1185
File: projects/element-ng/navbar/si-navbar-item/si-navbar-item.component.html:11-11
Timestamp: 2025-12-11T14:44:11.278Z
Learning: The si-icon component in siemens/element-ng/icon automatically applies aria-hidden="true" to its content. Do not suggest adding aria-hidden="true" to si-icon elements, as accessibility is already handled internally by the component.

Applied to files:

  • api-goldens/element-ng/content-action-bar/index.api.md
  • api-goldens/element-ng/chat-messages/index.api.md
  • api-goldens/element-ng/icon/index.api.md
📚 Learning: 2025-12-22T13:04:20.883Z
Learnt from: mistrykaran91
Repo: siemens/element PR: 1234
File: src/app/examples/ag-grid/ag-grid-empty-state.ts:20-24
Timestamp: 2025-12-22T13:04:20.883Z
Learning: The SiEmptyStateComponent in siemens/element-ng accepts icon names in kebab-case format (e.g., 'element-technical-operator') that may not be directly exported as constants in the element-icons.ts file. Do not flag these as errors if they render correctly at runtime.

Applied to files:

  • api-goldens/element-ng/content-action-bar/index.api.md
  • api-goldens/element-ng/navbar-vertical/index.api.md
  • api-goldens/element-ng/header-dropdown/index.api.md
  • api-goldens/element-ng/icon/index.api.md
  • api-goldens/element-ng/dashboard/index.api.md
📚 Learning: 2025-12-23T09:24:35.163Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/translate/index.api.md:12-84
Timestamp: 2025-12-23T09:24:35.163Z
Learning: In the siemens/element repository, do not review files under the api-goldens/ directory (e.g., api-goldens/**/index.api.md) since they are auto-generated by API Extractor. Exclude these from review checks and focus on source files that are not auto-generated.

Applied to files:

  • api-goldens/element-ng/content-action-bar/index.api.md
  • api-goldens/element-ng/tooltip/index.api.md
  • api-goldens/element-ng/navbar-vertical/index.api.md
  • api-goldens/element-ng/popover-legacy/index.api.md
  • api-goldens/element-ng/popover/index.api.md
  • api-goldens/element-ng/side-panel/index.api.md
  • api-goldens/element-ng/header-dropdown/index.api.md
  • api-goldens/dashboards-ng/index.api.md
  • api-goldens/element-ng/chat-messages/index.api.md
  • api-goldens/element-ng/menu/index.api.md
  • api-goldens/element-ng/icon/index.api.md
  • api-goldens/element-ng/card/index.api.md
  • api-goldens/element-ng/dashboard/index.api.md
📚 Learning: 2025-12-23T09:24:57.843Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/index.api.md:324-325
Timestamp: 2025-12-23T09:24:57.843Z
Learning: Do not review files in the api-goldens directory, as they are auto-generated API reports produced by API Extractor.

Applied to files:

  • api-goldens/element-ng/content-action-bar/index.api.md
  • api-goldens/element-ng/tooltip/index.api.md
  • api-goldens/element-ng/navbar-vertical/index.api.md
  • api-goldens/element-ng/popover-legacy/index.api.md
  • api-goldens/element-ng/popover/index.api.md
  • api-goldens/element-ng/side-panel/index.api.md
  • api-goldens/element-ng/header-dropdown/index.api.md
  • api-goldens/dashboards-ng/index.api.md
  • api-goldens/element-ng/chat-messages/index.api.md
  • api-goldens/element-ng/menu/index.api.md
  • api-goldens/element-ng/icon/index.api.md
  • api-goldens/element-ng/card/index.api.md
  • api-goldens/element-ng/dashboard/index.api.md
📚 Learning: 2025-12-23T09:24:40.395Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/module-federation/index.api.md:7-11
Timestamp: 2025-12-23T09:24:40.395Z
Learning: In the siemens/element repository, do not review any files under the api-goldens directory, as they are auto-generated API reports produced by API Extractor. These MD files should be excluded from review unless explicitly overridden.

Applied to files:

  • api-goldens/element-ng/content-action-bar/index.api.md
  • api-goldens/element-ng/tooltip/index.api.md
  • api-goldens/element-ng/navbar-vertical/index.api.md
  • api-goldens/element-ng/popover-legacy/index.api.md
  • api-goldens/element-ng/popover/index.api.md
  • api-goldens/element-ng/side-panel/index.api.md
  • api-goldens/element-ng/header-dropdown/index.api.md
  • api-goldens/dashboards-ng/index.api.md
  • api-goldens/element-ng/chat-messages/index.api.md
  • api-goldens/element-ng/menu/index.api.md
  • api-goldens/element-ng/icon/index.api.md
  • api-goldens/element-ng/card/index.api.md
  • api-goldens/element-ng/dashboard/index.api.md
📚 Learning: 2025-12-22T13:26:32.786Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1237
File: tools/api-goldens/test_api_report.ts:19-23
Timestamp: 2025-12-22T13:26:32.786Z
Learning: In the siemens/element repository, the team intentionally uses internal APIs from `microsoft/api-extractor` (such as `AstDeclaration`, `AstModule`, `ExportAnalyzer`, `ApiItemMetadata`, and `Collector` from `/lib/analyzer` and `/lib/collector` paths) in `tools/api-goldens/test_api_report.ts` to customize API extraction behavior (e.g., marking protected members as internal). This is an accepted practice because the required functionality is not available through the public API, and the version is pinned to mitigate risks.

Applied to files:

  • tools/api-goldens/test_api_report.ts
  • api-goldens/dashboards-ng/index.api.md
📚 Learning: 2025-12-17T14:01:05.705Z
Learnt from: dauriamarco
Repo: siemens/element PR: 908
File: projects/element-ng/side-panel/si-side-panel.component.ts:70-74
Timestamp: 2025-12-17T14:01:05.705Z
Learning: In the Element side-panel component (projects/element-ng/side-panel/si-side-panel.component.ts), the `xxxlMinimum` breakpoint (1920px) is intentionally hardcoded as a private static constant rather than being part of the configurable `Breakpoints` interface. This design preserves full Bootstrap compatibility (which only defines breakpoints up to xxl/1400px) while allowing Element to handle ultra-wide screens explicitly without affecting the standard breakpoint configuration.

Applied to files:

  • api-goldens/element-ng/side-panel/index.api.md
📚 Learning: 2025-12-17T06:59:51.485Z
Learnt from: chintankavathia
Repo: siemens/element PR: 1036
File: projects/dashboards-ng/src/widget-loader.ts:176-182
Timestamp: 2025-12-17T06:59:51.485Z
Learning: In projects/dashboards-ng/src/widget-loader.ts, when checking `factory.moduleName`, there's no need to also check for `factory.moduleLoader` because the TypeScript type system (ModuleOptions type) enforces that `moduleLoader` must be present whenever `moduleName` is provided.

Applied to files:

  • api-goldens/dashboards-ng/index.api.md
📚 Learning: 2025-11-25T15:07:09.316Z
Learnt from: dr-itz
Repo: siemens/element PR: 1059
File: projects/charts-ng/src/components/si-chart-cartesian/si-chart-cartesian.component.ts:345-352
Timestamp: 2025-11-25T15:07:09.316Z
Learning: In the charts-ng project, the `SubchartGrid` interface includes a `categoryId` property that is part of the public API and is used on the consumer side. This property is not part of the ECharts `GridComponentOption` type, but the cast is safe because ECharts ignores extra properties at runtime.

Applied to files:

  • api-goldens/dashboards-ng/index.api.md
📚 Learning: 2025-12-09T14:31:33.543Z
Learnt from: Killusions
Repo: siemens/element PR: 998
File: projects/element-ng/chat-messages/si-ai-chat-container.component.html:14-50
Timestamp: 2025-12-09T14:31:33.543Z
Learning: In projects/element-ng/chat-messages/si-ai-chat-container.component.html, message IDs can change, so tracking by message.id is not appropriate. The component uses `track message` (object identity) which is the correct approach for this use case.

Applied to files:

  • api-goldens/element-ng/chat-messages/index.api.md
📚 Learning: 2025-12-09T14:32:34.036Z
Learnt from: Killusions
Repo: siemens/element PR: 998
File: projects/element-ng/chat-messages/si-ai-chat-container.component.html:21-47
Timestamp: 2025-12-09T14:32:34.036Z
Learning: In projects/element-ng/chat-messages, nested if blocks are preferred over switch statements for branching on message types in Angular templates.

Applied to files:

  • api-goldens/element-ng/chat-messages/index.api.md
📚 Learning: 2025-11-18T12:37:30.510Z
Learnt from: Killusions
Repo: siemens/element PR: 1040
File: projects/element-ng/chat-messages/si-chat-input.component.ts:338-349
Timestamp: 2025-11-18T12:37:30.510Z
Learning: In projects/element-ng/chat-messages/si-chat-input.component.ts, the interrupt behavior is intentionally different for button clicks vs Enter key: the button can emit interrupt even without content, but pressing Enter requires content or attachments (canSend() must be true) to emit interrupt.

Applied to files:

  • api-goldens/element-ng/chat-messages/index.api.md
📚 Learning: 2025-12-04T11:54:31.132Z
Learnt from: chintankavathia
Repo: siemens/element PR: 1133
File: projects/element-ng/tour/si-tour.service.spec.ts:21-26
Timestamp: 2025-12-04T11:54:31.132Z
Learning: In the siemens/element repository, all components are standalone by default and do not require the explicit `standalone: true` flag. Components should be added to the `imports` array in TestBed configuration, not the `declarations` array.

Applied to files:

  • api-goldens/element-ng/chat-messages/index.api.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (11)
api-goldens/element-ng/menu/index.api.md (1)

1-141: Skipping review of auto-generated API golden file.

As per established learnings from previous reviews, files in the api-goldens/ directory are auto-generated by API Extractor and should not be manually reviewed. The changes in this file reflect the re-generated goldens following the PR's updates to the API extraction tooling to filter out Angular Ivy metadata.

api-goldens/element-ng/side-panel/index.api.md (1)

1-121: Skip review — auto-generated API report file.

This file is auto-generated by API Extractor and should not be reviewed in detail. The changes reflect the updated extraction tooling that filters out Angular Ivy metadata (ɵcmp, ɵfac, ɵinj, ɵmod, ɵprov) and lifecycle hook signatures, as configured in the build process described in the PR commit messages.

api-goldens/element-ng/card/index.api.md (1)

1-36: Skip review — auto-generated file.

This file is auto-generated by API Extractor and should not be reviewed. The changes (removal of Angular Ivy metadata declarations like ɵcmp, ɵfac, ɵinj, ɵmod, and reordering of union types) are expected consequences of the tooling updates to filter Angular internals.

Focus code review on the actual tooling changes in tools/api-goldens/ that perform the filtering logic, not the regenerated output.

api-goldens/element-ng/tooltip/index.api.md (1)

1-32: This file is auto-generated and should not be reviewed.

Per team learnings from prior PRs (1235, 1237), files in the api-goldens/ directory are automatically generated by API Extractor and should be excluded from code review. The changes you see here (e.g., InputSignal signature updates at lines 20–21, removal of lifecycle hook declarations) are expected consequences of the build tool modifications that filter out Angular internals and lifecycle hooks.

Review focus: Instead, ensure the review concentrates on the source tooling changes in the build configuration and API extraction logic that drive these golden file regenerations, not on the golden files themselves.

api-goldens/element-ng/navbar-vertical/index.api.md (1)

1-116: Auto-generated file — skip review.

This file is auto-generated by API Extractor and should not be reviewed manually. The changes reflect the expected output from the tooling updates mentioned in the PR objectives (filtering Angular Ivy metadata and lifecycle hooks).

api-goldens/element-ng/popover/index.api.md (1)

1-48: Auto-generated file — skipping review.

Per established learnings in this repository, files under api-goldens/ are auto-generated by API Extractor and should not be reviewed. Review should focus on the source tooling changes in tools/api-goldens/ that implement the filtering logic to skip Angular internals.

api-goldens/element-ng/popover-legacy/index.api.md (1)

1-38: Auto-generated file — skipping review.

Per established learnings in this repository, files under api-goldens/ are auto-generated by API Extractor and should not be reviewed. Review should focus on the source tooling changes in tools/api-goldens/ that implement the filtering logic to skip Angular internals.

tools/api-goldens/test_api_report.ts (2)

59-81: LGTM! Angular-specific filtering logic is well-structured.

The skipAngular function correctly identifies Angular components/directives by checking for the presence of ɵfac and appropriately filters out:

  • Angular Ivy static metadata (ɵcmp, ɵdir, ɵfac, ɵmod, ɵinj, ɵprov)
  • Protected members (used for component↔template interaction)
  • Lifecycle hooks (by name matching)

This aligns with the PR objective to slim the public API surface by removing Angular internals.


194-205: LGTM! Metadata filtering correctly applies Angular skip logic.

The updated Collector.prototype.fetchApiItemMetadata patch properly uses the skipAngular helper to mark Angular-specific declarations as internal, preventing them from appearing in API reports.

api-goldens/dashboards-ng/index.api.md (1)

1-378: Skipping review of auto-generated API report.

This file is auto-generated by API Extractor and should not be reviewed. The changes reflect the output of the updated API extraction logic implemented in tools/api-goldens/test_api_report.ts.

Based on learnings, files in the api-goldens/ directory are auto-generated reports and should be excluded from review.

api-goldens/element-ng/dashboard/index.api.md (1)

1-231: Skipping review of auto-generated API report.

This file is auto-generated by API Extractor and should not be reviewed. The changes reflect the output of the updated API extraction logic implemented in tools/api-goldens/test_api_report.ts.

Based on learnings, files in the api-goldens/ directory are auto-generated reports and should be excluded from review.

Comment thread tools/api-goldens/index.ts
@github-actions
Copy link
Copy Markdown

@dr-itz dr-itz force-pushed the build/sane-goldens branch from 27fc23b to 0f995ce Compare December 27, 2025 19:33
Comment thread tools/api-goldens/test_api_report.ts
@kfenner kfenner assigned dr-itz and unassigned timowolf Dec 29, 2025
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0f995ce and bad5e7a.

📒 Files selected for processing (1)
  • tools/api-goldens/test_api_report.ts
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: spike-rabbit
Repo: siemens/element PR: 1237
File: tools/api-goldens/test_api_report.ts:19-23
Timestamp: 2025-12-22T13:26:40.908Z
Learning: In the siemens/element repository, the team intentionally uses internal APIs from `microsoft/api-extractor` (such as `AstDeclaration`, `AstModule`, `ExportAnalyzer`, `ApiItemMetadata`, and `Collector` from `/lib/analyzer` and `/lib/collector` paths) in `tools/api-goldens/test_api_report.ts` to customize API extraction behavior (e.g., marking protected members as internal). This is an accepted practice because the required functionality is not available through the public API, and the version is pinned to mitigate risks.
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/module-federation/index.api.md:7-11
Timestamp: 2025-12-23T09:24:44.630Z
Learning: In the siemens/element repository, do not review files in the `api-goldens/` directory as they are auto-generated API reports created by API Extractor.
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/index.api.md:324-325
Timestamp: 2025-12-23T09:25:02.458Z
Learning: In the siemens/element repository, do not review files in the `api-goldens/` directory as they are auto-generated API reports created by API Extractor.
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/translate/index.api.md:12-84
Timestamp: 2025-12-23T09:24:43.561Z
Learning: Do not review files in the `api-goldens/` directory in the siemens/element repository as they are auto-generated by API Extractor.
📚 Learning: 2025-12-22T13:26:40.908Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1237
File: tools/api-goldens/test_api_report.ts:19-23
Timestamp: 2025-12-22T13:26:40.908Z
Learning: In the siemens/element repository, the team intentionally uses internal APIs from `microsoft/api-extractor` (such as `AstDeclaration`, `AstModule`, `ExportAnalyzer`, `ApiItemMetadata`, and `Collector` from `/lib/analyzer` and `/lib/collector` paths) in `tools/api-goldens/test_api_report.ts` to customize API extraction behavior (e.g., marking protected members as internal). This is an accepted practice because the required functionality is not available through the public API, and the version is pinned to mitigate risks.

Applied to files:

  • tools/api-goldens/test_api_report.ts
📚 Learning: 2025-12-23T09:25:02.406Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/index.api.md:414-414
Timestamp: 2025-12-23T09:25:02.406Z
Learning: Do not review files in the `api-goldens/` directory in the siemens/element repository as they are auto-generated API reports created by API Extractor.

Applied to files:

  • tools/api-goldens/test_api_report.ts
📚 Learning: 2025-12-23T09:25:02.458Z
Learnt from: spike-rabbit
Repo: siemens/element PR: 1235
File: api-goldens/dashboards-ng/index.api.md:324-325
Timestamp: 2025-12-23T09:25:02.458Z
Learning: In the siemens/element repository, do not review files in the `api-goldens/` directory as they are auto-generated API reports created by API Extractor.

Applied to files:

  • tools/api-goldens/test_api_report.ts
📚 Learning: 2025-12-17T04:34:55.597Z
Learnt from: chintankavathia
Repo: siemens/element PR: 1173
File: src/app/examples/si-charts/interactive/interactive.ts:5-5
Timestamp: 2025-12-17T04:34:55.597Z
Learning: Guideline: In Angular projects using OnPush change detection (zoneless mode), you only need to call ChangeDetectorRef.markForCheck() for asynchronous operations (e.g., setTimeout, setInterval, Promises, Observables) where a change is not automatically detected. Event handlers triggered by Angular template bindings (click, input, etc.) will trigger change detection automatically and do not require explicit markForCheck() calls. Apply this broadly to TS files within Angular components/services that use OnPush; use markForCheck() selectively for async work where change detection wouldn’t run otherwise.

Applied to files:

  • tools/api-goldens/test_api_report.ts
🔇 Additional comments (5)
tools/api-goldens/test_api_report.ts (5)

10-10: LGTM: Import additions support the new filtering logic.

The new imports (ApiReportVariant, ApiReportGenerator, ModifierFlags) are correctly used in the skipAngular function and the ApiReportGenerator patching logic.

Also applies to: 23-23, 27-27


41-50: LGTM: Complete list of Angular lifecycle hooks.

The lifecycle hooks array correctly includes all standard Angular lifecycle methods that should be filtered from API reports.


52-56: LGTM: Proper storage of original method for patching.

Storing the original private static method is appropriate for the monkey-patching approach, consistent with the team's accepted practice of using internal API extractor APIs.

Based on learnings, the team intentionally uses internal APIs from microsoft/api-extractor with pinned versions to customize API extraction behavior.


188-201: LGTM: Patching logic correctly integrates Angular filtering.

The monkey-patching implementation properly:

  • Calls skipAngular first to filter Angular-specific declarations
  • Defers to the original _shouldIncludeDeclaration for other cases
  • Uses apply correctly to preserve context and arguments

68-71: This exclusion of protected members is an intentional design decision.

The blanket exclusion of protected members in Angular classes is by design. The siemens/element team deliberately customizes the API extraction behavior using internal microsoft/api-extractor APIs to mark protected members of Angular components/directives/modules as internal in the API report. This approach is an accepted practice in the repository, and the version pinning mitigates any associated risks with using internal APIs.

Comment thread tools/api-goldens/test_api_report.ts
Comment thread tools/api-goldens/test_api_report.ts
@dr-itz dr-itz requested a review from kfenner December 30, 2025 14:06
@dr-itz dr-itz force-pushed the build/sane-goldens branch from bad5e7a to 5d548ae Compare December 30, 2025 15:10
@spike-rabbit
Copy link
Copy Markdown
Member

@dr-itz please regenerate all goldens. With ng21 something changed.

For Angular components/directives, these are now skipped:
- generated Angular static fields
- Angular life cycle hooks
- protected members as those are for component <-> template interaction
- no life cycle hooks
- no generated internal static functions
- restores protected method in non-Angular class
@dr-itz dr-itz force-pushed the build/sane-goldens branch from 5d548ae to 8b6837a Compare January 10, 2026 22:23
@github-actions
Copy link
Copy Markdown

Code Coverage

@spike-rabbit spike-rabbit enabled auto-merge (rebase) January 12, 2026 09:56
Copy link
Copy Markdown
Member

@spike-rabbit spike-rabbit left a comment

Choose a reason for hiding this comment

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

👍

@spike-rabbit spike-rabbit merged commit 7508be7 into main Jan 12, 2026
11 checks passed
@spike-rabbit spike-rabbit deleted the build/sane-goldens branch January 12, 2026 09:57
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.

4 participants