Skip to content

fix: skip optimize_save_restore_view for Animation handler_ops#3

Merged
Brooooooklyn merged 1 commit intomainfrom
02-04-fix_animation_restore_view_optimization
Feb 4, 2026
Merged

fix: skip optimize_save_restore_view for Animation handler_ops#3
Brooooooklyn merged 1 commit intomainfrom
02-04-fix_animation_restore_view_optimization

Conversation

@Brooooooklyn
Copy link
Copy Markdown
Member

@Brooooooklyn Brooooooklyn commented Feb 4, 2026

Angular's ngtsc keeps restoreView/resetView in animation callbacks even when the return value doesn't reference the view context (e.g., return "animate-in"). OXC was incorrectly removing these via optimize_save_restore_view, causing 37 ClickUp component mismatches.


Note

Medium Risk
Changes variable optimization behavior for animation callbacks, which can affect generated template JS and runtime view/context handling in embedded views. Risk is moderate because it alters codegen semantics for animations but is narrowly scoped and covered by new integration snapshots.

Overview
Aligns codegen with Angular’s ngtsc by skipping optimize_save_restore_view for CreateOp::Animation handler ops, preserving restoreView/resetView even when the animation callback returns a simple literal.

Adds integration coverage and snapshots for embedded-view (@if) animations (both with and without a companion (click) listener) to ensure getCurrentView and the appropriate restoreView/resetView calls remain in the output and _unnamed_ references don’t appear.

Written by Cursor Bugbot for commit 5070286. This will update automatically on new commits. Configure here.

Angular's ngtsc keeps restoreView/resetView in animation callbacks even
when the return value doesn't reference the view context (e.g.,
`return "animate-in"`). OXC was incorrectly removing these via
optimize_save_restore_view, causing 37 ClickUp component mismatches.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Brooooooklyn Brooooooklyn merged commit c14c90b into main Feb 4, 2026
3 checks passed
@Brooooooklyn Brooooooklyn deleted the 02-04-fix_animation_restore_view_optimization branch February 4, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant