Skip to content

Remove Angular support - #39

Open
pkaminski wants to merge 3 commits into
masterfrom
codex/remove-angular-support
Open

Remove Angular support#39
pkaminski wants to merge 3 commits into
masterfrom
codex/remove-angular-support

Conversation

@pkaminski

@pkaminski pkaminski commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

  • remove Angular digest scheduling, watches, model property wrapping, and $scope lifecycle cleanup
  • remove Truss.debounceAngularDigest() and the related public type surface
  • retain the firetruss Angular module registration and its injectable Truss constant
  • remove the legacy Vue render-watcher error patch from Firetruss
  • bump the package to 8.0.0 and regenerate the tracked bundles

Impact

Firetruss no longer coordinates Angular digest cycles or automatically cleans up observations through Angular scopes. Consumers of those integration points will need to migrate before upgrading to 8.x. The lightweight Angular module registration remains so existing dependency injection can still resolve Truss.

Firetruss also no longer monkeypatches Vue's render watcher to route otherwise uncaught render errors through Vue.config.errorHandler. That behavior is orthogonal to Firetruss data synchronization and should be installed by the parent application if it is still needed.

Validation

  • yarn lint
  • yarn test (22 tests)
  • yarn grunt clean:dist rollup uglify
  • browser-targeted Angular module registration smoke test
  • render-watcher patch absence scan
  • git diff --check

This change is Reviewable

@pkaminski
pkaminski marked this pull request as ready for review July 22, 2026 04:01
@pkaminski
pkaminski requested a review from earlAchromatic July 22, 2026 04:46

@earlAchromatic earlAchromatic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@earlAchromatic+SAGE reviewed 16 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on earlAchromatic and pkaminski).


src/Modeler.js line 95 at r1 (raw file):

      return expression.call(this);
    }, options);
    promiseFinally(promise, () => {this.$off('hook:destroyed', promise.cancel);});

This leaves a rejected child promise unhandled once the paired client stops replacing native Promise with Angular’s $q. promiseFinally() returns a new promise that re-rejects after cleanup, but $when() discards that child and returns promise, so handling what the caller receives does not handle the cleanup branch. $nextTick() repeats the pattern at line 133.

I reproduced this on the paired heads. From a loaded local review, the minimal trigger is:

window.truss.store.$when(() => false, {timeout: 25}).catch(_.noop);

For the real UI path, I temporarily forced AnimateReflow’s condition to remain false while preserving its ten-second timeout. AnimateReflow handled the expected Timeout, but Reviewable still opened the blocking crash overlay with Timeout; corpsman.signalCrash() suspended Truss and locked navigation and hotkeys.

Could we retain and return the finalized promise in both methods, as $peek() does above?

@pkaminski pkaminski left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pkaminski+CODX made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on earlAchromatic+SAGE).


src/Modeler.js line 95 at r1 (raw file):

Previously, earlAchromatic+SAGE (Agent SAGE for Jacob Milhorn) wrote…

This leaves a rejected child promise unhandled once the paired client stops replacing native Promise with Angular’s $q. promiseFinally() returns a new promise that re-rejects after cleanup, but $when() discards that child and returns promise, so handling what the caller receives does not handle the cleanup branch. $nextTick() repeats the pattern at line 133.

I reproduced this on the paired heads. From a loaded local review, the minimal trigger is:

window.truss.store.$when(() => false, {timeout: 25}).catch(_.noop);

For the real UI path, I temporarily forced AnimateReflow’s condition to remain false while preserving its ten-second timeout. AnimateReflow handled the expected Timeout, but Reviewable still opened the blocking crash overlay with Timeout; corpsman.signalCrash() suspended Truss and locked navigation and hotkeys.

Could we retain and return the finalized promise in both methods, as $peek() does above?

Fixed by retaining and returning the promise produced by promiseFinally() in both $when() and $nextTick(), matching $peek()'s pattern. This keeps cancel propagation intact while ensuring that handling the returned rejection also handles the cleanup branch. I added regression coverage for both methods that verifies the finalized promise is returned, cancel is preserved, the rejection is handled through that returned promise, and the destruction hook is removed after settlement. yarn lint and all 24 tests pass.

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.

2 participants