-
Notifications
You must be signed in to change notification settings - Fork 638
Description
Description
This task tracks the migration of src/app/pages/evaluations/components/dataset-details-page/dataset-details-page.component.ts to OnPush change detection in preparation for zoneless Angular. (Parent Issue: #4106).
Tooling & Setup
This repository is configured for the Gemini CLI with the Angular MCP server. Please ensure your environment is set up according to .gemini/settings.json.
Task
Migrate the component to OnPush using the provided AI tooling and ensure strict adherence to modern Angular testing and style patterns.
Steps
-
Run Migration Tool:
Use theonpush_zoneless_migrationtool via the Gemini CLI. This tool analyzes the component and provides iterative steps to safely convert it toOnPush.- Prompt: "Run onpush_zoneless_migration on src/app/pages/evaluations/components/dataset-details-page/dataset-details-page.component.ts"
-
Update Tests for Zoneless:
Refactor unit tests to rely on the framework's change detection scheduling rather than manual forcing.- Replace:
fixture.detectChanges() - With:
await fixture.whenStable() - Note:
fixture.detectChanges()forces a check synchronously (Zone.js behavior), whereaswhenStable()waits for the framework to settle, simulating how a zoneless application behaves.
- Replace:
-
Enforce Styleguide Access Patterns:
Review the component members and ensure they follow the project's strict visibility rules:private: For internal state/logic not used in the template.protected: For state/methods accessed by the template.public: ONLY for API boundaries (inputs/outputs) or methods accessed by parent components via@ViewChild.
-
Verification:
- Ensure the UI updates correctly during interaction.
- Run unit tests to ensure no regressions.
Resources
Acceptance Criteria
- Component uses
ChangeDetectionStrategy.OnPush. -
onpush_zoneless_migrationreports no further actions needed. - Tests use
await fixture.whenStable()instead of manual change detection. - Member visibility (private/protected/public) adheres to the styleguide.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status