You need to conduct a code review of a small Angular panel for checking the availability of a public handle.
Context:
ChangeDetectionStrategy.OnPush.provideZoneChangeDetection({ eventCoalescing: true })), not zoneless.Functional requirements:
handle field is required.checkHandle(handle) returns an Observable with an object { handle: string; available: boolean; suggestion?: string }.What to verify during the review:
checking/result/error state in an OnPush component.Reproduction steps:
alex, then quickly delete the field contents or replace them with several spaces.maria, wait for the check, then close the component.Assumptions:
Angular 20.0.0 standalone components, TypeScript 5.8, RxJS 7.8.1, ChangeDetectionStrategy.OnPush, zone-based change detection via provideZoneChangeDetection({ eventCoalescing: true }). To run, a standard Angular CLI dev server is sufficient; no additional libraries beyond @angular/forms are needed.
Use line comments to explain the problem, its impact, the fix and how to test it.