This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] 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 f030df12b7 refactor(frontend): remove unused imports, modules, and
state (#9538)
f030df12b7 is described below
commit f030df12b73c2c6a8f2e8b325c6e762d54fead7f
Author: Xinyuan Lin <[email protected]>
AuthorDate: Sat Nov 21 06:51:24 2026 +0000
refactor(frontend): remove unused imports, modules, and state (#9538)
### What changes were proposed in this PR?
Remove unused imports, redundant standalone module imports, dead
helper/stub methods, unmatched SCSS rules, unused template refs, and
unread component/service fields across the Angular frontend with no
observable UI or runtime behavior change:
- **User/auth services and test stubs:** Remove unused
`GuiConfigService` injection in `AuthGuardService`, unused `HttpClient`
injection and `AppSettings` import in `UserService`, unused `Input`
import in `RegistrationRequestModalComponent`, and dead
`checkAffiliation`/`updateAffiliation` methods on `StubUserService`.
- **Dashboard search, unread state, and dataset helpers:** Remove unused
`#searchInput` template references in `SearchBarComponent`,
`UserDatasetComponent`, and `UserModelComponent`, unmatched
`.nz-input-group`/`.nz-prefix-icon` SCSS rules in `SearchBarComponent`,
unused `getUid()` and `UserService` injection in
`SearchResultsComponent` (with its `getUid`-only unit tests), unread
`isLogin`/`currentUid` state and `UserService` subscription in
`UserComputingUnitComponent` (with its paired unit test), unread
`isLogin` in `LandingPageComponent` (retaining `currentUid` and its
assertions), unread `map` in `MiniMapComponent`, unread `coeditorStates`
in `CoeditorPresenceService`, unread `viewPort` `@ViewChild` in
`ConsoleFrameComponent`, unused `DICT_PREFIX` and `of` import in
`PresetService`, and spec-only `getPathsUnderOrEqualDatasetFileNode`
(with its unit tests).
- **Standalone and duplicate imports:** Remove redundant `FormsModule`
standalone imports alongside `ReactiveFormsModule` in
`AdminGmailComponent` (and its spec), `DatasetFileSelectorComponent`,
`DatasetVersionSelectorComponent`, `SettingsComponent`,
`PortPropertyEditFrameComponent`, and
`OperatorPropertyEditFrameComponent`, unused `NzTooltipModule` in
`HubSearchResultComponent`, unused `NzButtonModule` in
`JupyterNotebookPanelComponent`, and duplicate module imports in
`WarehouseActionsService`, `UserDatasetFileRendererComponent`, and
`UiUdfParametersParserService`.
### Any related issues, documentation, discussions?
Closes #9537.
### How was this PR tested?
Ran in `frontend/` on `5202d9582b` (Node 24, `node
.yarn/releases/yarn-4.14.1.cjs install --immutable --inline-builds`):
```bash
node .yarn/releases/yarn-4.14.1.cjs format:ci
node .yarn/releases/yarn-4.14.1.cjs exec tsc -p src/tsconfig.app.json
--noEmit
node .yarn/releases/yarn-4.14.1.cjs exec tsc -p src/tsconfig.spec.json
--noEmit
node .yarn/releases/yarn-4.14.1.cjs build
node .yarn/releases/yarn-4.14.1.cjs test
```
- `format:ci` (`prettier-eslint --list-different` and `eslint ./src`):
passed.
- `tsc --noEmit` (`src/tsconfig.app.json` and `src/tsconfig.spec.json`):
passed.
- `build` (production Angular AOT build): passed.
- `test` (Vitest): `255` suites passed (`7,379` passed, `0` failed, `1`
pre-existing skipped in untouched
`operator-property-edit-frame.component.spec.ts`).
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Antigravity (Gemini 4 Neon), Claude Code (Claude Opus 5.5)
---
.../app/common/service/user/auth-guard.service.ts | 4 +--
.../registration-request-modal.component.ts | 2 +-
.../app/common/service/user/stub-user.service.ts | 8 ------
.../src/app/common/service/user/user.service.ts | 5 +---
.../service/warehouse/warehouse-actions.service.ts | 3 +--
.../app/common/type/datasetVersionFileTree.spec.ts | 29 ----------------------
.../src/app/common/type/datasetVersionFileTree.ts | 15 -----------
.../admin/gmail/admin-gmail.component.spec.ts | 4 +--
.../component/admin/gmail/admin-gmail.component.ts | 3 +--
.../user/search-bar/search-bar.component.html | 3 +--
.../user/search-bar/search-bar.component.scss | 10 --------
.../search-results.component.spec.ts | 21 +---------------
.../search-results/search-results.component.ts | 7 ------
.../user-computing-unit.component.spec.ts | 16 +-----------
.../user-computing-unit.component.ts | 15 +----------
.../user-dataset-file-renderer.component.ts | 3 +--
.../user/user-dataset/user-dataset.component.html | 1 -
.../user/user-model/user-model.component.html | 1 -
.../hub-search-result.component.ts | 2 --
.../landing-page/landing-page.component.spec.ts | 5 +---
.../landing-page/landing-page.component.ts | 2 --
.../dataset-file-selector.component.ts | 3 +--
.../dataset-version-selector.component.ts | 3 +--
.../jupyter-notebook-panel.component.ts | 3 +--
.../left-panel/settings/settings.component.ts | 4 +--
.../operator-property-edit-frame.component.ts | 3 +--
.../port-property-edit-frame.component.ts | 3 +--
.../console-frame/console-frame.component.ts | 2 --
.../workflow-editor/mini-map/mini-map.component.ts | 2 --
.../ui-udf-parameters-parser.service.ts | 9 +++++--
.../app/workspace/service/preset/preset.service.ts | 3 +--
.../model/coeditor-presence.service.ts | 3 ---
32 files changed, 28 insertions(+), 169 deletions(-)
diff --git a/frontend/src/app/common/service/user/auth-guard.service.ts
b/frontend/src/app/common/service/user/auth-guard.service.ts
index b2ac79e6dc..dfcec3a46c 100644
--- a/frontend/src/app/common/service/user/auth-guard.service.ts
+++ b/frontend/src/app/common/service/user/auth-guard.service.ts
@@ -19,7 +19,6 @@
import { Injectable } from "@angular/core";
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot }
from "@angular/router";
-import { GuiConfigService } from "../gui-config.service";
import { UserService } from "./user.service";
import { LOGIN } from "../../../app-routing.constant";
@@ -31,8 +30,7 @@ import { LOGIN } from "../../../app-routing.constant";
export class AuthGuardService implements CanActivate {
constructor(
private userService: UserService,
- private router: Router,
- private config: GuiConfigService
+ private router: Router
) {}
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot):
boolean {
if (this.userService.isLogin()) {
diff --git
a/frontend/src/app/common/service/user/registration-request-modal/registration-request-modal.component.ts
b/frontend/src/app/common/service/user/registration-request-modal/registration-request-modal.component.ts
index f68042fd82..8e5303b8a3 100644
---
a/frontend/src/app/common/service/user/registration-request-modal/registration-request-modal.component.ts
+++
b/frontend/src/app/common/service/user/registration-request-modal/registration-request-modal.component.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { Component, Inject, Input, TemplateRef, ViewChild } from
"@angular/core";
+import { Component, Inject, TemplateRef, ViewChild } from "@angular/core";
import { NZ_MODAL_DATA } from "ng-zorro-antd/modal";
import { NzSpaceCompactItemDirective } from "ng-zorro-antd/space";
import { NzInputDirective } from "ng-zorro-antd/input";
diff --git a/frontend/src/app/common/service/user/stub-user.service.ts
b/frontend/src/app/common/service/user/stub-user.service.ts
index ab2296877e..365d3822be 100644
--- a/frontend/src/app/common/service/user/stub-user.service.ts
+++ b/frontend/src/app/common/service/user/stub-user.service.ts
@@ -98,12 +98,4 @@ export class StubUserService implements
PublicInterfaceOf<UserService> {
getAvatar(avatarUrl: string): Observable<string | undefined> {
return of(undefined);
}
-
- checkAffiliation(): Observable<Boolean> {
- return of(true);
- }
-
- updateAffiliation(_affiliation: string): Observable<void> {
- return of(void 0);
- }
}
diff --git a/frontend/src/app/common/service/user/user.service.ts
b/frontend/src/app/common/service/user/user.service.ts
index 1efaf2177b..d9f4194c67 100644
--- a/frontend/src/app/common/service/user/user.service.ts
+++ b/frontend/src/app/common/service/user/user.service.ts
@@ -18,8 +18,6 @@
*/
import { Injectable } from "@angular/core";
-import { HttpClient } from "@angular/common/http";
-import { AppSettings } from "../../app-setting";
import { Observable, of, ReplaySubject } from "rxjs";
import { Role, User } from "../../type/user";
import { AuthService } from "./auth.service";
@@ -42,8 +40,7 @@ export class UserService {
constructor(
private authService: AuthService,
- private config: GuiConfigService,
- private http: HttpClient
+ private config: GuiConfigService
) {
const user = this.authService.loginWithExistingToken();
this.changeUser(user);
diff --git
a/frontend/src/app/common/service/warehouse/warehouse-actions.service.ts
b/frontend/src/app/common/service/warehouse/warehouse-actions.service.ts
index bc8e06545e..893ea2b3db 100644
--- a/frontend/src/app/common/service/warehouse/warehouse-actions.service.ts
+++ b/frontend/src/app/common/service/warehouse/warehouse-actions.service.ts
@@ -19,8 +19,7 @@
import { Injectable } from "@angular/core";
import { NzModalService } from "ng-zorro-antd/modal";
-import { EMPTY, catchError, shareReplay } from "rxjs";
-import { Observable, firstValueFrom } from "rxjs";
+import { Observable, EMPTY, catchError, firstValueFrom, shareReplay } from
"rxjs";
import { NotificationService } from "../notification/notification.service";
import { DashboardWarehouse } from "../../type/warehouse";
import { extractErrorMessage } from "../../util/error";
diff --git a/frontend/src/app/common/type/datasetVersionFileTree.spec.ts
b/frontend/src/app/common/type/datasetVersionFileTree.spec.ts
index 1ee6b94da1..c732580753 100644
--- a/frontend/src/app/common/type/datasetVersionFileTree.spec.ts
+++ b/frontend/src/app/common/type/datasetVersionFileTree.spec.ts
@@ -19,7 +19,6 @@
import {
DatasetFileNode,
getFullPathFromDatasetFileNode,
- getPathsUnderOrEqualDatasetFileNode,
getRelativePathFromDatasetFileNode,
} from "./datasetVersionFileTree";
@@ -72,31 +71,3 @@ describe("getRelativePathFromDatasetFileNode", () => {
expect(getRelativePathFromDatasetFileNode(node)).toBe("sub/f.csv");
});
});
-
-describe("getPathsUnderOrEqualDatasetFileNode", () => {
- it("returns the single path for a file node", () => {
- const file: DatasetFileNode = { name: "a.txt", type: "file", parentDir:
"/dir" };
- expect(getPathsUnderOrEqualDatasetFileNode(file)).toEqual(["/dir/a.txt"]);
- });
-
- it("collects every file path under a directory", () => {
- const file1: DatasetFileNode = { name: "file1.txt", type: "file",
parentDir: "/dir" };
- const file2: DatasetFileNode = { name: "file2.txt", type: "file",
parentDir: "/dir" };
- const dir: DatasetFileNode = { name: "dir", type: "directory", parentDir:
"", children: [file1, file2] };
-
expect(getPathsUnderOrEqualDatasetFileNode(dir)).toEqual(["/dir/file1.txt",
"/dir/file2.txt"]);
- });
-
- it("recurses into nested directories", () => {
- const deepFile: DatasetFileNode = { name: "deep.txt", type: "file",
parentDir: "/a/b" };
- const subDir: DatasetFileNode = { name: "b", type: "directory", parentDir:
"/a", children: [deepFile] };
- const topDir: DatasetFileNode = { name: "a", type: "directory", parentDir:
"", children: [subDir] };
-
expect(getPathsUnderOrEqualDatasetFileNode(topDir)).toEqual(["/a/b/deep.txt"]);
- });
-
- it("returns an empty array for an empty directory", () => {
- const emptyChildren: DatasetFileNode = { name: "dir", type: "directory",
parentDir: "", children: [] };
- const noChildrenProp: DatasetFileNode = { name: "dir", type: "directory",
parentDir: "" };
- expect(getPathsUnderOrEqualDatasetFileNode(emptyChildren)).toEqual([]);
- expect(getPathsUnderOrEqualDatasetFileNode(noChildrenProp)).toEqual([]);
- });
-});
diff --git a/frontend/src/app/common/type/datasetVersionFileTree.ts
b/frontend/src/app/common/type/datasetVersionFileTree.ts
index 91160b38dd..5bf8734205 100644
--- a/frontend/src/app/common/type/datasetVersionFileTree.ts
+++ b/frontend/src/app/common/type/datasetVersionFileTree.ts
@@ -46,18 +46,3 @@ export function getRelativePathFromDatasetFileNode(node:
DatasetFileNode): strin
return pathSegments.slice(4).join("/"); // Join remaining segments as the
relative path
}
-
-export function getPathsUnderOrEqualDatasetFileNode(node: DatasetFileNode):
string[] {
- // Helper function to recursively gather paths
- const gatherPaths = (node: DatasetFileNode): string[] => {
- // Base case: if the node is a file, return its path
- if (node.type === "file") {
- return [getFullPathFromDatasetFileNode(node)];
- }
-
- // Recursive case: if the node is a directory, explore its children
- return node.children ? node.children.flatMap(child => gatherPaths(child))
: [];
- };
-
- return gatherPaths(node);
-}
diff --git
a/frontend/src/app/dashboard/component/admin/gmail/admin-gmail.component.spec.ts
b/frontend/src/app/dashboard/component/admin/gmail/admin-gmail.component.spec.ts
index 7c24b30f10..a1d38a21ba 100644
---
a/frontend/src/app/dashboard/component/admin/gmail/admin-gmail.component.spec.ts
+++
b/frontend/src/app/dashboard/component/admin/gmail/admin-gmail.component.spec.ts
@@ -18,7 +18,7 @@
*/
import { ComponentFixture, TestBed } from "@angular/core/testing";
-import { FormsModule, ReactiveFormsModule } from "@angular/forms";
+import { ReactiveFormsModule } from "@angular/forms";
import { NoopAnimationsModule } from "@angular/platform-browser/animations";
import { HttpClientTestingModule } from "@angular/common/http/testing";
import { Subject } from "rxjs";
@@ -50,7 +50,7 @@ describe("AdminGmailComponent", () => {
const gmailServiceStub = { getSenderEmail: getSenderEmailSpy, sendEmail:
sendEmailSpy };
await TestBed.configureTestingModule({
- imports: [AdminGmailComponent, FormsModule, ReactiveFormsModule,
NoopAnimationsModule, HttpClientTestingModule],
+ imports: [AdminGmailComponent, ReactiveFormsModule,
NoopAnimationsModule, HttpClientTestingModule],
providers: [{ provide: GmailService, useValue: gmailServiceStub },
...commonTestProviders],
}).compileComponents();
});
diff --git
a/frontend/src/app/dashboard/component/admin/gmail/admin-gmail.component.ts
b/frontend/src/app/dashboard/component/admin/gmail/admin-gmail.component.ts
index 04cf02e85f..cf32e0c1b0 100644
--- a/frontend/src/app/dashboard/component/admin/gmail/admin-gmail.component.ts
+++ b/frontend/src/app/dashboard/component/admin/gmail/admin-gmail.component.ts
@@ -19,7 +19,7 @@
import { Component, OnInit } from "@angular/core";
import { GmailService } from "../../../../common/service/gmail/gmail.service";
-import { FormBuilder, FormGroup, Validators, FormsModule, ReactiveFormsModule
} from "@angular/forms";
+import { FormBuilder, FormGroup, Validators, ReactiveFormsModule } from
"@angular/forms";
import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
import { NzCardComponent } from "ng-zorro-antd/card";
import { NzFormDirective, NzFormItemComponent, NzFormLabelComponent,
NzFormControlComponent } from "ng-zorro-antd/form";
@@ -36,7 +36,6 @@ import { ɵNzTransitionPatchDirective } from
"ng-zorro-antd/core/transition-patc
templateUrl: "./admin-gmail.component.html",
imports: [
NzCardComponent,
- FormsModule,
NzFormDirective,
ReactiveFormsModule,
NzRowDirective,
diff --git
a/frontend/src/app/dashboard/component/user/search-bar/search-bar.component.html
b/frontend/src/app/dashboard/component/user/search-bar/search-bar.component.html
index 4b66c6c131..f9d0ee411e 100644
---
a/frontend/src/app/dashboard/component/user/search-bar/search-bar.component.html
+++
b/frontend/src/app/dashboard/component/user/search-bar/search-bar.component.html
@@ -27,8 +27,7 @@
[(ngModel)]="searchParam"
(ngModelChange)="onSearchInputChange($event)"
(keydown.enter)="performSearch(searchParam)"
- [nzAutocomplete]="auto"
- #searchInput />
+ [nzAutocomplete]="auto" />
</nz-input-group>
<nz-autocomplete
class="autocomplete"
diff --git
a/frontend/src/app/dashboard/component/user/search-bar/search-bar.component.scss
b/frontend/src/app/dashboard/component/user/search-bar/search-bar.component.scss
index b05f70cc65..5ac4893878 100644
---
a/frontend/src/app/dashboard/component/user/search-bar/search-bar.component.scss
+++
b/frontend/src/app/dashboard/component/user/search-bar/search-bar.component.scss
@@ -17,19 +17,9 @@
* under the License.
*/
-.nz-input-group {
- display: flex;
- align-items: center;
- margin: 0;
-}
-
input[nz-input] {
border: none;
outline: none;
font-size: 17px;
padding: 0 5px;
}
-
-.nz-prefix-icon {
- color: #888;
-}
diff --git
a/frontend/src/app/dashboard/component/user/search-results/search-results.component.spec.ts
b/frontend/src/app/dashboard/component/user/search-results/search-results.component.spec.ts
index df98d5ebe6..7550356c7a 100644
---
a/frontend/src/app/dashboard/component/user/search-results/search-results.component.spec.ts
+++
b/frontend/src/app/dashboard/component/user/search-results/search-results.component.spec.ts
@@ -83,7 +83,7 @@ describe("SearchResultsComponent", () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [SearchResultsComponent, NoopAnimationsModule],
- providers: [{ provide: UserService, useClass: StubUserService },
...commonTestProviders],
+ providers: [...commonTestProviders],
}).compileComponents();
// ListItemComponent is heavy (needs a full service graph); swap it for a
@@ -106,25 +106,6 @@ describe("SearchResultsComponent", () => {
expect(component).toBeTruthy();
});
- describe("getUid", () => {
- it("returns the current user's uid when a user is logged in", () => {
- // StubUserService default user has uid = 1 (MOCK_USER_ID).
- expect(component.getUid()).toBe(1);
- });
-
- it("returns a spied uid", () => {
- const userService = TestBed.inject(UserService);
- vi.spyOn(userService, "getCurrentUser").mockReturnValue({ uid: 42 } as
any);
- expect(component.getUid()).toBe(42);
- });
-
- it("returns undefined when no user is logged in", () => {
- const userService = TestBed.inject(UserService);
- vi.spyOn(userService, "getCurrentUser").mockReturnValue(undefined);
- expect(component.getUid()).toBeUndefined();
- });
- });
-
describe("reset", () => {
it("clears entries and stores the provided loadMoreFunction", async () => {
component.entries = [makeEntry("workflow", 1), makeEntry("dataset", 2)];
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 4e122aa4fd..96eab4139a 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
@@ -19,7 +19,6 @@
import { Component, EventEmitter, Input, Output, TemplateRef } from
"@angular/core";
import { DashboardEntry } from "../../../type/dashboard-entry";
-import { UserService } from "../../../../common/service/user/user.service";
import { NzCardComponent } from "ng-zorro-antd/card";
import { ɵɵCdkVirtualScrollViewport, ɵɵCdkFixedSizeVirtualScroll } from
"@angular/cdk/overlay";
import { NzListComponent } from "ng-zorro-antd/list";
@@ -72,12 +71,6 @@ export class SearchResultsComponent {
@Output() notifyWorkflow = new EventEmitter<void>();
@Output() refresh = new EventEmitter<void>();
- constructor(private userService: UserService) {}
-
- getUid(): number | undefined {
- return this.userService.getCurrentUser()?.uid;
- }
-
reset(loadMoreFunction: LoadMoreFunction): void {
this.entries = [];
this.loadMoreFunction = loadMoreFunction;
diff --git
a/frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.spec.ts
b/frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.spec.ts
index de190dda42..05114c1757 100644
---
a/frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.spec.ts
+++
b/frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.spec.ts
@@ -27,8 +27,6 @@ import { NzIconModule } from "ng-zorro-antd/icon";
import { NzModalService } from "ng-zorro-antd/modal";
import { FileAddOutline } from "@ant-design/icons-angular/icons";
import { HttpClientTestingModule } from "@angular/common/http/testing";
-import { UserService } from "../../../../common/service/user/user.service";
-import { StubUserService } from
"../../../../common/service/user/stub-user.service";
import { commonTestProviders } from "../../../../common/testing/test-utils";
import { WorkflowComputingUnitManagingService } from
"../../../../common/service/computing-unit/workflow-computing-unit/workflow-computing-unit-managing.service";
import { ComputingUnitStatusService } from
"../../../../common/service/computing-unit/computing-unit-status/computing-unit-status.service";
@@ -59,7 +57,6 @@ describe("UserComputingUnitComponent", () => {
await TestBed.configureTestingModule({
providers: [
NzModalService,
- { provide: UserService, useClass: StubUserService },
{ provide: WorkflowComputingUnitManagingService, useValue:
mockComputingUnitService },
{ provide: ComputingUnitStatusService, useClass:
MockComputingUnitStatusService },
...commonTestProviders,
@@ -99,7 +96,7 @@ describe("UserComputingUnitComponent", () => {
expect(component.addComputeUnitModalVisible).toBe(false);
});
- describe("session, polling and termination", () => {
+ describe("fetching, polling and termination", () => {
function makeUnit(cuid: number): DashboardWorkflowComputingUnit {
return {
computingUnit: {
@@ -134,17 +131,6 @@ describe("UserComputingUnitComponent", () => {
fixture.destroy();
});
- it("follows the signed-in user when the session changes", () => {
- fixture.detectChanges();
- const stubUserService = TestBed.inject(UserService) as unknown as
StubUserService;
-
- stubUserService.user = undefined;
- stubUserService.userChangeSubject.next(undefined);
-
- expect(component.isLogin).toBe(false);
- expect(component.currentUid).toBeUndefined();
- });
-
it("maps the fetched computing units into dashboard entries", () => {
const statusService = TestBed.inject(ComputingUnitStatusService);
vi.spyOn(statusService,
"getAllComputingUnits").mockReturnValue(of([makeUnit(7)]));
diff --git
a/frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.ts
b/frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.ts
index 7f62d81540..5e58ca9c4f 100644
---
a/frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.ts
+++
b/frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.ts
@@ -23,7 +23,6 @@ import { DashboardEntry } from
"../../../type/dashboard-entry";
import { DashboardWorkflowComputingUnit } from
"../../../../common/type/workflow-computing-unit";
import { NotificationService } from
"../../../../common/service/notification/notification.service";
import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
-import { UserService } from "../../../../common/service/user/user.service";
import { ComputingUnitActionsService } from
"../../../../common/service/computing-unit/computing-unit-actions/computing-unit-actions.service";
import { interval } from "rxjs";
import { NzCardComponent } from "ng-zorro-antd/card";
@@ -59,9 +58,6 @@ import { ComputingUnitCreateModalComponent } from
"../../../../common/component/
})
export class UserComputingUnitComponent implements OnInit {
public entries: DashboardEntry[] = [];
- public isLogin = this.userService.isLogin();
- public currentUid = this.userService.getCurrentUser()?.uid;
-
allComputingUnits: DashboardWorkflowComputingUnit[] = [];
// visibility of the shared create-computing-unit modal
@@ -69,18 +65,9 @@ export class UserComputingUnitComponent implements OnInit {
constructor(
private notificationService: NotificationService,
- private userService: UserService,
private computingUnitStatusService: ComputingUnitStatusService,
private computingUnitActionsService: ComputingUnitActionsService
- ) {
- this.userService
- .userChanged()
- .pipe(untilDestroyed(this))
- .subscribe(() => {
- this.isLogin = this.userService.isLogin();
- this.currentUid = this.userService.getCurrentUser()?.uid;
- });
- }
+ ) {}
ngOnInit() {
this.computingUnitStatusService
diff --git
a/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-file-renderer/user-dataset-file-renderer.component.ts
b/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-file-renderer/user-dataset-file-renderer.component.ts
index 871ac4cf0d..d0e3c2716d 100644
---
a/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-file-renderer/user-dataset-file-renderer.component.ts
+++
b/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-file-renderer/user-dataset-file-renderer.component.ts
@@ -23,7 +23,6 @@ import { EntityType } from
"../../../../../../hub/service/hub.service";
import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
import { Subscription } from "rxjs";
import * as Papa from "papaparse";
-import { ParseResult } from "papaparse";
import { DomSanitizer, SafeUrl } from "@angular/platform-browser";
import readXlsxFile from "read-excel-file";
import { NotificationService } from
"../../../../../../common/service/notification/notification.service";
@@ -270,7 +269,7 @@ export class UserDatasetFileRendererComponent implements
OnInit, OnChanges, OnDe
this.displayCSV = true;
// Handle CSV display
Papa.parse(this.currentFile, {
- complete: (results: ParseResult<any>) => {
+ complete: (results: Papa.ParseResult<any>) => {
if (!isCurrent()) return;
if (results.data.length > 0) {
this.loadTabularFile(results.data);
diff --git
a/frontend/src/app/dashboard/component/user/user-dataset/user-dataset.component.html
b/frontend/src/app/dashboard/component/user/user-dataset/user-dataset.component.html
index 69061cb5ec..074a54c19f 100644
---
a/frontend/src/app/dashboard/component/user/user-dataset/user-dataset.component.html
+++
b/frontend/src/app/dashboard/component/user/user-dataset/user-dataset.component.html
@@ -67,7 +67,6 @@
<div class="section-search-bar">
<texera-filters-instructions></texera-filters-instructions>
<nz-select
- #searchInput
class="search-input-box"
name="search-input-box"
nzMode="tags"
diff --git
a/frontend/src/app/dashboard/component/user/user-model/user-model.component.html
b/frontend/src/app/dashboard/component/user/user-model/user-model.component.html
index 1bb1187b20..358e015747 100644
---
a/frontend/src/app/dashboard/component/user/user-model/user-model.component.html
+++
b/frontend/src/app/dashboard/component/user/user-model/user-model.component.html
@@ -67,7 +67,6 @@
<div class="section-search-bar">
<texera-filters-instructions></texera-filters-instructions>
<nz-select
- #searchInput
class="search-input-box"
name="search-input-box"
nzMode="tags"
diff --git
a/frontend/src/app/hub/component/hub-search-result/hub-search-result.component.ts
b/frontend/src/app/hub/component/hub-search-result/hub-search-result.component.ts
index 9efb913ae9..d6d1b993d6 100644
---
a/frontend/src/app/hub/component/hub-search-result/hub-search-result.component.ts
+++
b/frontend/src/app/hub/component/hub-search-result/hub-search-result.component.ts
@@ -22,7 +22,6 @@ import { ActivatedRoute } from "@angular/router";
import { NgIf } from "@angular/common";
import { NzButtonComponent } from "ng-zorro-antd/button";
import { NzIconDirective } from "ng-zorro-antd/icon";
-import { NzTooltipModule } from "ng-zorro-antd/tooltip";
import {
SearchResultsComponent,
SearchResultsViewMode,
@@ -50,7 +49,6 @@ const HUB_VIEW_MODE_STORAGE_KEY =
"texera.hub.dataset.viewMode";
NgIf,
NzButtonComponent,
NzIconDirective,
- NzTooltipModule,
SortButtonComponent,
FiltersComponent,
SearchResultsComponent,
diff --git
a/frontend/src/app/hub/component/landing-page/landing-page.component.spec.ts
b/frontend/src/app/hub/component/landing-page/landing-page.component.spec.ts
index 08fbee2955..f9ce48fa13 100644
--- a/frontend/src/app/hub/component/landing-page/landing-page.component.spec.ts
+++ b/frontend/src/app/hub/component/landing-page/landing-page.component.spec.ts
@@ -124,19 +124,17 @@ describe("LandingPageComponent", () => {
expect(component).toBeTruthy();
});
- it("updates isLogin and currentUid when userChanged() emits", () => {
+ it("updates currentUid when userChanged() emits", () => {
build();
// Emit a logged-out state.
userService.user = undefined;
userService.userChangeSubject.next(undefined);
- expect(component.isLogin).toBe(false);
expect(component.currentUid).toBeUndefined();
// Emit a logged-in state.
const newUser = { uid: 99, name: "x", email: "x@x", role: "REGULAR" } as
any;
userService.user = newUser;
userService.userChangeSubject.next(newUser);
- expect(component.isLogin).toBe(true);
expect(component.currentUid).toBe(99);
});
@@ -234,7 +232,6 @@ describe("LandingPageComponent", () => {
// The stub seeds a user in its constructor; clear it before the component
reads it.
userService.user = undefined;
build();
- expect(component.isLogin).toBe(false);
expect(component.currentUid).toBeUndefined();
});
diff --git
a/frontend/src/app/hub/component/landing-page/landing-page.component.ts
b/frontend/src/app/hub/component/landing-page/landing-page.component.ts
index d0f706ee1d..6cb792c6a4 100644
--- a/frontend/src/app/hub/component/landing-page/landing-page.component.ts
+++ b/frontend/src/app/hub/component/landing-page/landing-page.component.ts
@@ -36,7 +36,6 @@ import { BrowseSectionComponent } from
"../browse-section/browse-section.compone
imports: [BrowseSectionComponent],
})
export class LandingPageComponent implements OnInit {
- public isLogin = this.userService.isLogin();
public currentUid = this.userService.getCurrentUser()?.uid;
public workflowCount: number = 0;
public datasetCount: number = 0;
@@ -56,7 +55,6 @@ export class LandingPageComponent implements OnInit {
.userChanged()
.pipe(untilDestroyed(this))
.subscribe(() => {
- this.isLogin = this.userService.isLogin();
this.currentUid = this.userService.getCurrentUser()?.uid;
});
}
diff --git
a/frontend/src/app/workspace/component/dataset-file-selector/dataset-file-selector.component.ts
b/frontend/src/app/workspace/component/dataset-file-selector/dataset-file-selector.component.ts
index f434cd3f3c..1cf6bdd076 100644
---
a/frontend/src/app/workspace/component/dataset-file-selector/dataset-file-selector.component.ts
+++
b/frontend/src/app/workspace/component/dataset-file-selector/dataset-file-selector.component.ts
@@ -26,7 +26,7 @@ import { GuiConfigService } from
"../../../common/service/gui-config.service";
import { NgIf } from "@angular/common";
import { NzSpaceCompactItemDirective } from "ng-zorro-antd/space";
import { NzInputDirective } from "ng-zorro-antd/input";
-import { FormsModule, ReactiveFormsModule } from "@angular/forms";
+import { ReactiveFormsModule } from "@angular/forms";
import { NzButtonComponent } from "ng-zorro-antd/button";
import { NzWaveDirective } from "ng-zorro-antd/core/wave";
import { ɵNzTransitionPatchDirective } from
"ng-zorro-antd/core/transition-patch";
@@ -38,7 +38,6 @@ import { ɵNzTransitionPatchDirective } from
"ng-zorro-antd/core/transition-patc
NgIf,
NzSpaceCompactItemDirective,
NzInputDirective,
- FormsModule,
ReactiveFormsModule,
NzButtonComponent,
NzWaveDirective,
diff --git
a/frontend/src/app/workspace/component/dataset-version-selector/dataset-version-selector.component.ts
b/frontend/src/app/workspace/component/dataset-version-selector/dataset-version-selector.component.ts
index de00bc41f6..4badcc06d6 100644
---
a/frontend/src/app/workspace/component/dataset-version-selector/dataset-version-selector.component.ts
+++
b/frontend/src/app/workspace/component/dataset-version-selector/dataset-version-selector.component.ts
@@ -25,7 +25,7 @@ import { DatasetSelectionModalComponent } from
"../dataset-selection-modal/datas
import { NgIf } from "@angular/common";
import { NzSpaceCompactItemDirective } from "ng-zorro-antd/space";
import { NzInputDirective } from "ng-zorro-antd/input";
-import { FormsModule, ReactiveFormsModule } from "@angular/forms";
+import { ReactiveFormsModule } from "@angular/forms";
import { NzButtonComponent } from "ng-zorro-antd/button";
import { NzWaveDirective } from "ng-zorro-antd/core/wave";
import { ɵNzTransitionPatchDirective } from
"ng-zorro-antd/core/transition-patch";
@@ -37,7 +37,6 @@ import { ɵNzTransitionPatchDirective } from
"ng-zorro-antd/core/transition-patc
NgIf,
NzSpaceCompactItemDirective,
NzInputDirective,
- FormsModule,
ReactiveFormsModule,
NzButtonComponent,
NzWaveDirective,
diff --git
a/frontend/src/app/workspace/component/jupyter-notebook-panel/jupyter-notebook-panel.component.ts
b/frontend/src/app/workspace/component/jupyter-notebook-panel/jupyter-notebook-panel.component.ts
index 71b0411fd6..a78fc4e466 100644
---
a/frontend/src/app/workspace/component/jupyter-notebook-panel/jupyter-notebook-panel.component.ts
+++
b/frontend/src/app/workspace/component/jupyter-notebook-panel/jupyter-notebook-panel.component.ts
@@ -24,7 +24,6 @@ import { catchError, switchMap, takeUntil } from
"rxjs/operators";
import { DomSanitizer, SafeResourceUrl } from "@angular/platform-browser";
import { CommonModule } from "@angular/common";
import { DragDropModule } from "@angular/cdk/drag-drop";
-import { NzButtonModule } from "ng-zorro-antd/button";
import { NzIconModule } from "ng-zorro-antd/icon";
import { NzPopconfirmModule } from "ng-zorro-antd/popconfirm";
import { NzTooltipModule } from "ng-zorro-antd/tooltip";
@@ -33,7 +32,7 @@ import { NzTooltipModule } from "ng-zorro-antd/tooltip";
selector: "texera-jupyter-notebook-panel",
templateUrl: "./jupyter-notebook-panel.component.html",
styleUrls: ["./jupyter-notebook-panel.component.scss"],
- imports: [CommonModule, DragDropModule, NzButtonModule, NzIconModule,
NzPopconfirmModule, NzTooltipModule],
+ imports: [CommonModule, DragDropModule, NzIconModule, NzPopconfirmModule,
NzTooltipModule],
})
export class JupyterNotebookPanelComponent implements OnInit, AfterViewInit,
OnDestroy {
@ViewChild("iframeRef", { static: false }) iframeRef!:
ElementRef<HTMLIFrameElement>; // Use static: false
diff --git
a/frontend/src/app/workspace/component/left-panel/settings/settings.component.ts
b/frontend/src/app/workspace/component/left-panel/settings/settings.component.ts
index 74d35fa125..9dc4c7be81 100644
---
a/frontend/src/app/workspace/component/left-panel/settings/settings.component.ts
+++
b/frontend/src/app/workspace/component/left-panel/settings/settings.component.ts
@@ -18,7 +18,7 @@
*/
import { Component, OnInit } from "@angular/core";
-import { FormBuilder, FormGroup, Validators, FormsModule, ReactiveFormsModule
} from "@angular/forms";
+import { FormBuilder, FormGroup, Validators, ReactiveFormsModule } from
"@angular/forms";
import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
import { merge } from "rxjs";
import { WorkflowActionService } from
"../../../service/workflow-graph/model/workflow-action.service";
@@ -34,7 +34,7 @@ import { NgClass, NgIf } from "@angular/common";
selector: "texera-settings",
templateUrl: "./settings.component.html",
styleUrls: ["./settings.component.scss"],
- imports: [FormsModule, ReactiveFormsModule, NzRadioGroupComponent,
NzRadioComponent, NgClass, NgIf],
+ imports: [ReactiveFormsModule, NzRadioGroupComponent, NzRadioComponent,
NgClass, NgIf],
})
export class SettingsComponent implements OnInit {
settingsForm: FormGroup;
diff --git
a/frontend/src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.ts
b/frontend/src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.ts
index 17c3bc2458..8ba167585d 100644
---
a/frontend/src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.ts
+++
b/frontend/src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.ts
@@ -23,7 +23,7 @@ import { FormBindingService } from
"../../../service/form-binding/form-binding.s
import { ExecuteWorkflowService } from
"../../../service/execute-workflow/execute-workflow.service";
import { WorkflowStatusService } from
"../../../service/workflow-status/workflow-status.service";
import { Subject } from "rxjs";
-import { AbstractControl, FormGroup, FormsModule, ReactiveFormsModule } from
"@angular/forms";
+import { AbstractControl, FormGroup, ReactiveFormsModule } from
"@angular/forms";
import { FormlyFieldConfig, FormlyFormOptions, FormlyModule } from
"@ngx-formly/core";
import Ajv from "ajv";
import { FormlyJsonschema } from "@ngx-formly/core/json-schema";
@@ -173,7 +173,6 @@ export function conditionalRequiredRules(schema: unknown):
Map<string, Condition
NzTooltipDirective,
NzIconDirective,
NzPopoverDirective,
- FormsModule,
NzFormDirective,
ReactiveFormsModule,
FormlyModule,
diff --git
a/frontend/src/app/workspace/component/property-editor/port-property-edit-frame/port-property-edit-frame.component.ts
b/frontend/src/app/workspace/component/property-editor/port-property-edit-frame/port-property-edit-frame.component.ts
index e8808c2279..53e9b59517 100644
---
a/frontend/src/app/workspace/component/property-editor/port-property-edit-frame/port-property-edit-frame.component.ts
+++
b/frontend/src/app/workspace/component/property-editor/port-property-edit-frame/port-property-edit-frame.component.ts
@@ -25,7 +25,7 @@ import { WorkflowActionService } from
"../../../service/workflow-graph/model/wor
import { isEqual } from "lodash";
import { CustomJSONSchema7 } from
"../../../types/custom-json-schema.interface";
import { FormlyFieldConfig, FormlyFormOptions, FormlyModule } from
"@ngx-formly/core";
-import { FormGroup, FormsModule, ReactiveFormsModule } from "@angular/forms";
+import { FormGroup, ReactiveFormsModule } from "@angular/forms";
import { cloneDeep } from "lodash-es";
import { FormlyJsonschema } from "@ngx-formly/core/json-schema";
import { filter } from "rxjs/operators";
@@ -57,7 +57,6 @@ Quill.register("modules/cursors", QuillCursors);
ɵNzTransitionPatchDirective,
NzTooltipDirective,
NzIconDirective,
- FormsModule,
ReactiveFormsModule,
FormlyModule,
],
diff --git
a/frontend/src/app/workspace/component/result-panel/console-frame/console-frame.component.ts
b/frontend/src/app/workspace/component/result-panel/console-frame/console-frame.component.ts
index a286af0ee1..aa4c0b972d 100644
---
a/frontend/src/app/workspace/component/result-panel/console-frame/console-frame.component.ts
+++
b/frontend/src/app/workspace/component/result-panel/console-frame/console-frame.component.ts
@@ -29,7 +29,6 @@ import { WorkflowActionService } from
"../../../service/workflow-graph/model/wor
import { WorkflowCompilingService } from
"../../../service/compile-workflow/workflow-compiling.service";
import { WorkflowFatalError } from
"../../../types/workflow-websocket.interface";
import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
-import { CdkVirtualScrollViewport } from "@angular/cdk/scrolling";
import { presetPalettes } from "@ant-design/colors";
import { isDefined } from "../../../../common/util/predicate";
import { WorkflowWebsocketService } from
"../../../service/workflow-websocket/workflow-websocket.service";
@@ -96,7 +95,6 @@ export class ConsoleFrameComponent implements OnInit,
OnChanges {
// The operator whose messages are shown. Left out, every operator's
messages are shown together.
@Input() operatorId?: string;
@Input() consoleInputEnabled?: boolean;
- @ViewChild(CdkVirtualScrollViewport) viewPort?: CdkVirtualScrollViewport;
@ViewChild("consoleList", { read: ElementRef }) listElement?: ElementRef;
// The template renders `filteredMessages`, recomputed whenever the messages
diff --git
a/frontend/src/app/workspace/component/workflow-editor/mini-map/mini-map.component.ts
b/frontend/src/app/workspace/component/workflow-editor/mini-map/mini-map.component.ts
index 2756a565c8..57070d5e1b 100644
---
a/frontend/src/app/workspace/component/workflow-editor/mini-map/mini-map.component.ts
+++
b/frontend/src/app/workspace/component/workflow-editor/mini-map/mini-map.component.ts
@@ -55,7 +55,6 @@ export class MiniMapComponent implements AfterViewInit,
OnDestroy {
paper!: joint.dia.Paper;
/** The mini-map's own paper, as opposed to `paper`, which is the main
canvas's. */
private ownPaper!: joint.dia.Paper;
- private map!: HTMLElement;
dragging = false;
hidden = false;
@@ -69,7 +68,6 @@ export class MiniMapComponent implements AfterViewInit,
OnDestroy {
// This component's own element, not whichever the document holds first:
both views of a
// workflow mount a mini-map, and they overlap for a tick when the switch
routes between them.
const map = (this.elementRef.nativeElement as
HTMLElement).querySelector<HTMLElement>("#mini-map")!;
- this.map = map;
this.scale = map.offsetWidth / (MAIN_CANVAS.xMax - MAIN_CANVAS.xMin);
this.ownPaper = new joint.dia.Paper({
el: map,
diff --git
a/frontend/src/app/workspace/service/code-editor/ui-udf-parameters-parser.service.ts
b/frontend/src/app/workspace/service/code-editor/ui-udf-parameters-parser.service.ts
index a1b6010197..7da3199d2f 100644
---
a/frontend/src/app/workspace/service/code-editor/ui-udf-parameters-parser.service.ts
+++
b/frontend/src/app/workspace/service/code-editor/ui-udf-parameters-parser.service.ts
@@ -22,8 +22,13 @@ import type { AttributeType } from
"../../types/workflow-compiling.interface";
import { PythonUiUdfParametersParser } from
"./python-ui-udf-parameters-parser";
import { parseJavaUiParameters, computeJavaParameterInsertion } from
"./java-ui-udf-parameters-parser";
import { parseRUiParameters, computeRParameterInsertion } from
"./r-ui-udf-parameters-parser";
-import type { UiUdfLanguage, UiUdfParameter } from "./ui-udf-parameter";
-import { assertUniqueParameterNames, UI_PARAMETER_TOKENS,
UiUdfParametersEditError } from "./ui-udf-parameter";
+import {
+ assertUniqueParameterNames,
+ UI_PARAMETER_TOKENS,
+ UiUdfParametersEditError,
+ type UiUdfLanguage,
+ type UiUdfParameter,
+} from "./ui-udf-parameter";
export {
UiUdfParameter,
UiUdfParametersParseError,
diff --git a/frontend/src/app/workspace/service/preset/preset.service.ts
b/frontend/src/app/workspace/service/preset/preset.service.ts
index 445cacd016..4b9697181f 100644
--- a/frontend/src/app/workspace/service/preset/preset.service.ts
+++ b/frontend/src/app/workspace/service/preset/preset.service.ts
@@ -21,7 +21,7 @@ import { Injectable } from "@angular/core";
import Ajv from "ajv";
import { cloneDeep, has, isEqual, merge, pickBy } from "lodash";
import { NzMessageService } from "ng-zorro-antd/message";
-import { Observable, of, Subject } from "rxjs";
+import { Observable, Subject } from "rxjs";
import { UserConfigService } from
"src/app/common/service/user/config/user-config.service";
import { asType, isType } from "src/app/common/util/assert";
import { CustomJSONSchema7 } from "../../types/custom-json-schema.interface";
@@ -69,7 +69,6 @@ export type Preset = { [key: string]: string | number |
boolean };
providedIn: "root",
})
export class PresetService {
- private static DICT_PREFIX = "Preset"; // key prefix when storing data in
dictionary service
private static ajv = new Ajv();
private static ajvStrip = new Ajv({ useDefaults: true, removeAdditional:
true, strict: false }); // removes extra properties from an object that aren't
described by schema
private static isPreset = PresetService.ajv.compile(PresetSchema);
diff --git
a/frontend/src/app/workspace/service/workflow-graph/model/coeditor-presence.service.ts
b/frontend/src/app/workspace/service/workflow-graph/model/coeditor-presence.service.ts
index 7080011959..5cdbb5ab96 100644
---
a/frontend/src/app/workspace/service/workflow-graph/model/coeditor-presence.service.ts
+++
b/frontend/src/app/workspace/service/workflow-graph/model/coeditor-presence.service.ts
@@ -50,7 +50,6 @@ export class CoeditorPresenceService {
private coeditorOperatorHighlights = new Map<string, readonly string[]>();
private coeditorOperatorPropertyChanged = new Map<string, string |
undefined>();
private coeditorEditingCode = new Map<string, boolean>();
- private coeditorStates = new Map<string, CoeditorState>();
private currentlyEditingTimers = new Map<string, ReturnType<typeof
setInterval>>();
constructor(private workflowActionService: WorkflowActionService) {
@@ -154,7 +153,6 @@ export class CoeditorPresenceService {
const coeditor = coeditorState.user;
if (!this.hasCoeditor(coeditor.clientId) && coeditor.clientId) {
this.coeditors.push(coeditor);
- this.coeditorStates.set(coeditor.clientId, coeditorState);
this.updateCoeditorState(coeditor.clientId, coeditorState);
}
}
@@ -178,7 +176,6 @@ export class CoeditorPresenceService {
this.coeditors.splice(i);
}
}
- this.coeditorStates.delete(clientId);
if (this.shadowingModeEnabled && this.shadowingCoeditor?.clientId ===
clientId) {
this.stopShadowing();
}