Ma77Ball opened a new issue, #5323: URL: https://github.com/apache/texera/issues/5323
menu.component.ts uses untilDestroyed(this) for subscription teardown throughout, but also keeps two leftover manual Subscription fields, making the cleanup contract inconsistent and harder to reason about: - computingUnitStatusSubscription only aggregates a stream that is already piped through untilDestroyed(this), so the field, its .add() wrapper, and the ngOnDestroy unsubscribe are redundant. - durationUpdateSubscription is used to imperatively stop and restart the 1-second elapsed-time timer on each ExecutionDurationUpdateEvent (a manual switch), which RxJS switchMap expresses declaratively. Proposed cleanup (behavior-preserving): - Remove computingUnitStatusSubscription entirely and rely on untilDestroyed(this) for teardown. - Replace durationUpdateSubscription with a switchMap pipe so the timer reset is handled by the operator chain. - Drop the now-unused Subscription import, leaving the component on a single consistent cleanup style. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
