This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch 
gh-readonly-queue/main/pr-9112-fdd860d2709582be4973c3391052ad90eb7abb1a
in repository https://gitbox.apache.org/repos/asf/texera.git

commit b636a805c6168a86fc5b9d526b0beec3c4236dae
Author: Xinyuan Lin <[email protected]>
AuthorDate: Sun Oct 25 16:56:56 2026 +0000

    refactor(frontend): remove unused AiAnalystService injection (#9112)
    
    ### What changes were proposed in this PR?
    
    Removes `AiAnalystService`'s unused `workflowActionService` constructor
    injection and its import. **+2/−9 lines.** There is no behaviour change.
    
    The field is public, but nothing reads it: not the service, its one
    consumer `ReportGenerationService` (which uses its own
    `WorkflowActionService`), any template or any spec. Nothing builds the
    service by hand; Angular DI creates it, and `WorkflowActionService` is
    provided in root, so dropping the parameter is safe. The spec drops its
    empty `WorkflowActionService` stub, whose comment already said it
    existed only for this unused dependency.
    
    ### History
    
    | | |
    | --- | --- |
    | **Introduced by** | #2816 (2024-10-15), "Enhancing Report Generation
    by Adding Story-teller Ai based on Ai flag" |
    | **Usage removed by** | **never used** |
    
    It has been unused for the two years since it was added.
    
    ### Any related issues, documentation, discussions?
    
    Closes #9109
    
    ### How was this PR tested?
    
    No new tests.
    
    From `frontend/`:
    
    - `npx ng test --watch=false --include='**/ai-analyst.service.spec.ts'
    --include='**/report-generation.service.spec.ts'
    --include='**/menu.component.spec.ts'`: 3 files, 178 tests, all pass.
    The last two specs cover the service's consumer.
    - `npx tsc --noEmit -p src/tsconfig.app.json` and `-p
    src/tsconfig.spec.json`: clean.
    - `yarn format:ci`: clean.
    - `npx ng build`: success.
    
    ### Was this PR authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Code (Claude Opus 5.5)
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
 .../src/app/workspace/service/ai-analyst/ai-analyst.service.spec.ts | 5 +----
 frontend/src/app/workspace/service/ai-analyst/ai-analyst.service.ts | 6 +-----
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git 
a/frontend/src/app/workspace/service/ai-analyst/ai-analyst.service.spec.ts 
b/frontend/src/app/workspace/service/ai-analyst/ai-analyst.service.spec.ts
index 174020402f..1e086748ac 100644
--- a/frontend/src/app/workspace/service/ai-analyst/ai-analyst.service.spec.ts
+++ b/frontend/src/app/workspace/service/ai-analyst/ai-analyst.service.spec.ts
@@ -21,7 +21,6 @@ import { TestBed } from "@angular/core/testing";
 import { HttpClientTestingModule, HttpTestingController } from 
"@angular/common/http/testing";
 import { throwError } from "rxjs";
 import { AiAnalystService } from "./ai-analyst.service";
-import { WorkflowActionService } from 
"../workflow-graph/model/workflow-action.service";
 import { AppSettings } from "../../../common/app-setting";
 
 describe("AiAnalystService", () => {
@@ -33,9 +32,7 @@ describe("AiAnalystService", () => {
   beforeEach(() => {
     TestBed.configureTestingModule({
       imports: [HttpClientTestingModule],
-      // WorkflowActionService is a constructor dependency but unused by the 
tested
-      // methods, so an empty stub avoids pulling in the workflow-graph module.
-      providers: [AiAnalystService, { provide: WorkflowActionService, 
useValue: {} }],
+      providers: [AiAnalystService],
     });
     service = TestBed.inject(AiAnalystService);
     httpMock = TestBed.inject(HttpTestingController);
diff --git 
a/frontend/src/app/workspace/service/ai-analyst/ai-analyst.service.ts 
b/frontend/src/app/workspace/service/ai-analyst/ai-analyst.service.ts
index 491afc6f47..2111443d2a 100644
--- a/frontend/src/app/workspace/service/ai-analyst/ai-analyst.service.ts
+++ b/frontend/src/app/workspace/service/ai-analyst/ai-analyst.service.ts
@@ -30,7 +30,6 @@ import { Injectable } from "@angular/core";
 import { HttpClient } from "@angular/common/http";
 import { catchError, Observable, of } from "rxjs";
 import { map } from "rxjs/operators";
-import { WorkflowActionService } from 
"../workflow-graph/model/workflow-action.service";
 import { AppSettings } from "../../../common/app-setting";
 
 const AI_ASSISTANT_API_BASE_URL = `${AppSettings.getApiEndpoint()}`;
@@ -46,10 +45,7 @@ const api_Url_Openai = 
`${AI_ASSISTANT_API_BASE_URL}/aiassistant/openai`;
  */
 export class AiAnalystService {
   private isAIAssistantEnabled: boolean | null = null;
-  constructor(
-    private http: HttpClient,
-    public workflowActionService: WorkflowActionService
-  ) {}
+  constructor(private http: HttpClient) {}
   /**
    * Checks if the AI Assistant feature is enabled by sending a request to the 
API.
    *

Reply via email to