You need to review changes in a small Angular 20 standalone draft status panel. The panel runs in the browser, uses ChangeDetectionStrategy.OnPush, zoneless change detection, and Angular signals. On input draftId, the component requests the draft status from the API and shows the title, phase, and number of comments. In addition, a global Escape hotkey is supported to clear the current result.
Feature requirements:
Given:
You need to find defects in the after-version diff and propose fixes.
Reproduction steps:
draftId="A-100" and wait for a successful load.draftId=" " — no request should be sent, the screen should be cleared.A-100, change the input to draftId="missing" — an error should appear without data from the previous draft.Assumptions:
@if in a parent;ok: false for a missing draft and ok: true with a status object for an existing one;Node.js 22.14.0, Angular CLI 20.0.0, Angular 20.0.0, RxJS 7.8.1, TypeScript 5.9.2. The build runs in JIT/dev mode via ng serve. The application must be configured with provideZonelessChangeDetection() and without Zone.js. No additional dependencies.
Use line comments to explain the problem, its impact, the fix and how to test it.