This is an automated email from the ASF dual-hosted git repository.
aglinxinyuan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
The following commit(s) were added to refs/heads/main by this push:
new 321855cc0b fix: change detection scheduling regression (#4537)
321855cc0b is described below
commit 321855cc0bb41e76dc8e9de3ef467b8fafb9c0a0
Author: Xinyuan Lin <[email protected]>
AuthorDate: Mon Apr 27 17:33:18 2026 -0700
fix: change detection scheduling regression (#4537)
### What changes were proposed in this PR?
- enable Angular ZoneJS change detection scheduling during bootstrap
- remove local dashboard/search-result change detection workarounds
- restore Angular 20-style async UI refresh behavior after the Angular
21 upgrade
### Any related issues, documentation, discussions?
Closes #4536
### How was this PR tested?
- yarn lint
- yarn test:ci --include
src/app/dashboard/component/dashboard.component.spec.ts --include
src/app/dashboard/component/user/search-results/search-results.component.spec.ts
--include src/app/workspace/component/menu/menu.component.spec.ts
--include
src/app/workspace/component/left-panel/versions-list/versions-list.component.spec.ts
- yarn build:ci
### Was this PR authored or co-authored using generative AI tooling?
generated by Codex
---
.../src/app/dashboard/component/dashboard.component.ts | 12 +++---------
.../user/search-results/search-results.component.ts | 17 +++++------------
frontend/src/main.ts | 6 ++++--
3 files changed, 12 insertions(+), 23 deletions(-)
diff --git a/frontend/src/app/dashboard/component/dashboard.component.ts
b/frontend/src/app/dashboard/component/dashboard.component.ts
index f42c9baf2c..97b84b2e5b 100644
--- a/frontend/src/app/dashboard/component/dashboard.component.ts
+++ b/frontend/src/app/dashboard/component/dashboard.component.ts
@@ -147,18 +147,14 @@ export class DashboardComponent implements OnInit {
.getSetting("logo")
.pipe(untilDestroyed(this))
.subscribe(dataUri => {
- this.ngZone.run(() => {
- this.logo = dataUri;
- });
+ this.logo = dataUri;
});
this.adminSettingsService
.getSetting("mini_logo")
.pipe(untilDestroyed(this))
.subscribe(dataUri => {
- this.ngZone.run(() => {
- this.miniLogo = dataUri;
- });
+ this.miniLogo = dataUri;
});
this.adminSettingsService
@@ -175,9 +171,7 @@ export class DashboardComponent implements OnInit {
.getSetting(tab)
.pipe(untilDestroyed(this))
.subscribe(value => {
- this.ngZone.run(() => {
- this.sidebarTabs[tab] = value === "true";
- });
+ this.sidebarTabs[tab] = value === "true";
});
});
}
diff --git
a/frontend/src/app/dashboard/component/user/search-results/search-results.component.ts
b/frontend/src/app/dashboard/component/user/search-results/search-results.component.ts
index eb747dc0c6..ed9c4c6d64 100644
---
a/frontend/src/app/dashboard/component/user/search-results/search-results.component.ts
+++
b/frontend/src/app/dashboard/component/user/search-results/search-results.component.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { Component, EventEmitter, Input, NgZone, Output } from "@angular/core";
+import { Component, EventEmitter, Input, Output } from "@angular/core";
import { DashboardEntry } from "../../../type/dashboard-entry";
import { UserService } from "../../../../common/service/user/user.service";
@@ -47,10 +47,7 @@ export class SearchResultsComponent {
@Output() notifyWorkflow = new EventEmitter<void>();
@Output() refresh = new EventEmitter<void>();
- constructor(
- private userService: UserService,
- private ngZone: NgZone
- ) {}
+ constructor(private userService: UserService) {}
getUid(): number | undefined {
return this.userService.getCurrentUser()?.uid;
@@ -73,14 +70,10 @@ export class SearchResultsComponent {
if (this.resetCounter !== originalResetCounter) {
return;
}
- this.ngZone.run(() => {
- this.entries = [...this.entries, ...results.entries];
- this.more = results.more;
- });
+ this.entries = [...this.entries, ...results.entries];
+ this.more = results.more;
} finally {
- this.ngZone.run(() => {
- this.loading = false;
- });
+ this.loading = false;
}
}
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index 4dbf2897a1..c9e9738394 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { enableProdMode } from "@angular/core";
+import { enableProdMode, provideZoneChangeDetection } from "@angular/core";
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
import { AppModule } from "./app/app.module";
@@ -28,7 +28,9 @@ if (environment.production) {
}
platformBrowserDynamic()
- .bootstrapModule(AppModule)
+ .bootstrapModule(AppModule, {
+ applicationProviders: [provideZoneChangeDetection()],
+ })
.then(() => {
console.log("Texera application bootstrap completed successfully");
})