build(api-goldens): skip Angular internals, leave other protected members#1246
build(api-goldens): skip Angular internals, leave other protected members#1246spike-rabbit merged 4 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughRemoves 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
Possibly related PRs
Suggested labels
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (102)
💤 Files with no reviewable changes (99)
🧰 Additional context used🧠 Learnings (13)📓 Common learnings📚 Learning: 2025-12-22T13:26:40.908ZApplied to files:
📚 Learning: 2025-12-23T09:25:02.406ZApplied to files:
📚 Learning: 2025-12-23T09:24:43.561ZApplied to files:
📚 Learning: 2025-12-23T09:25:02.458ZApplied to files:
📚 Learning: 2025-12-19T10:37:57.083ZApplied to files:
📚 Learning: 2025-12-17T04:34:55.597ZApplied to files:
📚 Learning: 2025-12-17T06:59:51.485ZApplied to files:
📚 Learning: 2025-11-25T15:07:09.316ZApplied to files:
📚 Learning: 2025-12-15T07:17:06.981ZApplied to files:
📚 Learning: 2025-12-23T09:24:35.163ZApplied to files:
📚 Learning: 2025-12-23T09:24:57.843ZApplied to files:
📚 Learning: 2025-12-23T09:24:40.395ZApplied to files:
⏰ 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)
🔇 Additional comments (4)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (102)
api-goldens/charts-ng/index.api.mdapi-goldens/dashboards-ng/index.api.mdapi-goldens/element-ng/about/index.api.mdapi-goldens/element-ng/accordion/index.api.mdapi-goldens/element-ng/action-modal/index.api.mdapi-goldens/element-ng/application-header/index.api.mdapi-goldens/element-ng/auto-collapsable-list/index.api.mdapi-goldens/element-ng/autocomplete/index.api.mdapi-goldens/element-ng/avatar/index.api.mdapi-goldens/element-ng/badge/index.api.mdapi-goldens/element-ng/breadcrumb-router/index.api.mdapi-goldens/element-ng/breadcrumb/index.api.mdapi-goldens/element-ng/card/index.api.mdapi-goldens/element-ng/chat-messages/index.api.mdapi-goldens/element-ng/circle-status/index.api.mdapi-goldens/element-ng/color-picker/index.api.mdapi-goldens/element-ng/column-selection-dialog/index.api.mdapi-goldens/element-ng/common/index.api.mdapi-goldens/element-ng/connection-strength/index.api.mdapi-goldens/element-ng/content-action-bar/index.api.mdapi-goldens/element-ng/copyright-notice/index.api.mdapi-goldens/element-ng/dashboard/index.api.mdapi-goldens/element-ng/datatable/index.api.mdapi-goldens/element-ng/date-range-filter/index.api.mdapi-goldens/element-ng/datepicker/index.api.mdapi-goldens/element-ng/electron-titlebar/index.api.mdapi-goldens/element-ng/empty-state/index.api.mdapi-goldens/element-ng/file-uploader/index.api.mdapi-goldens/element-ng/filter-bar/index.api.mdapi-goldens/element-ng/filtered-search/index.api.mdapi-goldens/element-ng/footer/index.api.mdapi-goldens/element-ng/form/index.api.mdapi-goldens/element-ng/formly/index.api.mdapi-goldens/element-ng/header-dropdown/index.api.mdapi-goldens/element-ng/help-button/index.api.mdapi-goldens/element-ng/icon-status/index.api.mdapi-goldens/element-ng/icon/index.api.mdapi-goldens/element-ng/info-page/index.api.mdapi-goldens/element-ng/inline-notification/index.api.mdapi-goldens/element-ng/ip-input/index.api.mdapi-goldens/element-ng/landing-page/index.api.mdapi-goldens/element-ng/language-switcher/index.api.mdapi-goldens/element-ng/link/index.api.mdapi-goldens/element-ng/list-details/index.api.mdapi-goldens/element-ng/loading-spinner/index.api.mdapi-goldens/element-ng/localization/index.api.mdapi-goldens/element-ng/main-detail-container/index.api.mdapi-goldens/element-ng/markdown-renderer/index.api.mdapi-goldens/element-ng/menu/index.api.mdapi-goldens/element-ng/modal/index.api.mdapi-goldens/element-ng/navbar-vertical/index.api.mdapi-goldens/element-ng/navbar/index.api.mdapi-goldens/element-ng/notification-item/index.api.mdapi-goldens/element-ng/number-input/index.api.mdapi-goldens/element-ng/pagination/index.api.mdapi-goldens/element-ng/password-strength/index.api.mdapi-goldens/element-ng/password-toggle/index.api.mdapi-goldens/element-ng/phone-number/index.api.mdapi-goldens/element-ng/photo-upload/index.api.mdapi-goldens/element-ng/pills-input/index.api.mdapi-goldens/element-ng/popover-legacy/index.api.mdapi-goldens/element-ng/popover/index.api.mdapi-goldens/element-ng/progressbar/index.api.mdapi-goldens/element-ng/resize-observer/index.api.mdapi-goldens/element-ng/result-details-list/index.api.mdapi-goldens/element-ng/search-bar/index.api.mdapi-goldens/element-ng/select/index.api.mdapi-goldens/element-ng/shadow-root/index.api.mdapi-goldens/element-ng/side-panel/index.api.mdapi-goldens/element-ng/skip-links/index.api.mdapi-goldens/element-ng/slider/index.api.mdapi-goldens/element-ng/sort-bar/index.api.mdapi-goldens/element-ng/split/index.api.mdapi-goldens/element-ng/status-bar/index.api.mdapi-goldens/element-ng/status-counter/index.api.mdapi-goldens/element-ng/status-toggle/index.api.mdapi-goldens/element-ng/summary-chip/index.api.mdapi-goldens/element-ng/summary-widget/index.api.mdapi-goldens/element-ng/system-banner/index.api.mdapi-goldens/element-ng/tabs-legacy/index.api.mdapi-goldens/element-ng/tabs/index.api.mdapi-goldens/element-ng/theme/index.api.mdapi-goldens/element-ng/threshold/index.api.mdapi-goldens/element-ng/toast-notification/index.api.mdapi-goldens/element-ng/tooltip/index.api.mdapi-goldens/element-ng/tour/index.api.mdapi-goldens/element-ng/tree-view/index.api.mdapi-goldens/element-ng/typeahead/index.api.mdapi-goldens/element-ng/unauthorized-page/index.api.mdapi-goldens/element-ng/wizard/index.api.mdapi-goldens/element-translate-ng/angular-localize/index.api.mdapi-goldens/element-translate-ng/ngx-translate/index.api.mdapi-goldens/live-preview/index.api.mdapi-goldens/live-preview/webcomponents/index.api.mdapi-goldens/native-charts-ng/gauge/index.api.mdapi-goldens/native-charts-ng/index.api.mdapi-goldens/native-charts-ng/microchart-bar/index.api.mdapi-goldens/native-charts-ng/microchart-donut/index.api.mdapi-goldens/native-charts-ng/microchart-line/index.api.mdapi-goldens/native-charts-ng/microchart-progress/index.api.mdtools/api-goldens/index.tstools/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.tstools/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.mdapi-goldens/element-ng/chat-messages/index.api.mdapi-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.mdapi-goldens/element-ng/navbar-vertical/index.api.mdapi-goldens/element-ng/header-dropdown/index.api.mdapi-goldens/element-ng/icon/index.api.mdapi-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.mdapi-goldens/element-ng/tooltip/index.api.mdapi-goldens/element-ng/navbar-vertical/index.api.mdapi-goldens/element-ng/popover-legacy/index.api.mdapi-goldens/element-ng/popover/index.api.mdapi-goldens/element-ng/side-panel/index.api.mdapi-goldens/element-ng/header-dropdown/index.api.mdapi-goldens/dashboards-ng/index.api.mdapi-goldens/element-ng/chat-messages/index.api.mdapi-goldens/element-ng/menu/index.api.mdapi-goldens/element-ng/icon/index.api.mdapi-goldens/element-ng/card/index.api.mdapi-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.mdapi-goldens/element-ng/tooltip/index.api.mdapi-goldens/element-ng/navbar-vertical/index.api.mdapi-goldens/element-ng/popover-legacy/index.api.mdapi-goldens/element-ng/popover/index.api.mdapi-goldens/element-ng/side-panel/index.api.mdapi-goldens/element-ng/header-dropdown/index.api.mdapi-goldens/dashboards-ng/index.api.mdapi-goldens/element-ng/chat-messages/index.api.mdapi-goldens/element-ng/menu/index.api.mdapi-goldens/element-ng/icon/index.api.mdapi-goldens/element-ng/card/index.api.mdapi-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.mdapi-goldens/element-ng/tooltip/index.api.mdapi-goldens/element-ng/navbar-vertical/index.api.mdapi-goldens/element-ng/popover-legacy/index.api.mdapi-goldens/element-ng/popover/index.api.mdapi-goldens/element-ng/side-panel/index.api.mdapi-goldens/element-ng/header-dropdown/index.api.mdapi-goldens/dashboards-ng/index.api.mdapi-goldens/element-ng/chat-messages/index.api.mdapi-goldens/element-ng/menu/index.api.mdapi-goldens/element-ng/icon/index.api.mdapi-goldens/element-ng/card/index.api.mdapi-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.tsapi-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 intools/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 intools/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
skipAngularfunction correctly identifies Angular components/directives by checking for the presence ofɵfacand 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.fetchApiItemMetadatapatch properly uses theskipAngularhelper 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.
|
Documentation. Coverage Reports: |
27fc23b to
0f995ce
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yml
Review profile: ASSERTIVE
Plan: Pro
📒 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-extractorwith pinned versions to customize API extraction behavior.
188-201: LGTM: Patching logic correctly integrates Angular filtering.The monkey-patching implementation properly:
- Calls
skipAngularfirst to filter Angular-specific declarations- Defers to the original
_shouldIncludeDeclarationfor other cases- Uses
applycorrectly 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.
bad5e7a to
5d548ae
Compare
|
@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
5d548ae to
8b6837a
Compare
This is a follow-up to #1237 to be more complete and less buggy:
Summary
Refines API-goldens generation to more completely exclude Angular internals while preserving non-Angular protected members.
Key changes:
Impact: reduces noise from Angular-generated symbols in API reports while keeping intended public and protected API surfaces. Contributor followed contribution guidelines.