The project uses Angular 20.0.x with standalone components, RxJS 7.8.x, ChangeDetectionStrategy.OnPush, and the app in normal zoned mode (Zone.js enabled, without experimental zoneless). You need to review a PR for a message draft preview panel. The panel accepts a title input, loads a server preview on changes, and shows the publication status of the selected draft. The API contract is as follows: DraftPreviewService.fetchPreview(title: string): Observable<PreviewVm> returns a preview for the passed string; DraftStatusService.watchStatus(draftId: string): Observable<DraftStatus> starts a stream of updates for a specific draft status and must be switchable when the selected id changes. Assumptions: an empty string or one containing only spaces must not be sent to the server; when draftId changes in the component, only the current draft’s statuses should appear on screen; with rapid title edits, the panel should match the latest entered value. To reproduce, it is enough to create the component, assign draftId, then quickly change the input field and/or change draftId on an already created component.
Angular 20.0.0, TypeScript 5.8, RxJS 7.8.1. Standalone component. ChangeDetectionStrategy.OnPush. Zoned execution with Zone.js enabled. The template uses Angular signals (signal) for state. No additional libraries are present.
Use line comments to explain the problem, its impact, the fix and how to test it.