Skip to content

refactor(frontend): remove unused AiAnalystService injection - #9112

Merged
kunwp1 merged 2 commits into
apache:mainfrom
aglinxinyuan:refactor/fe-ai-analyst-unused-injection
Oct 25, 2026
Merged

kunwp1 merged 2 commits into
apache:mainfrom
aglinxinyuan:refactor/fe-ai-analyst-unused-injection

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

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

apache#2816 injected WorkflowActionService into AiAnalystService as a
public field that nothing has ever read. Drop the parameter and its
import, and the spec's empty stub that existed only for it.
@aglinxinyuan aglinxinyuan self-assigned this Oct 23, 2026
Copilot AI balanced review requested due to automatic review settings October 23, 2026 21:12

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @mengw15
    You can notify them by mentioning @mengw15 in a comment.

@github-actions github-actions Bot added refactor Refactor the code frontend Changes related to the frontend GUI labels Oct 23, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.33%. Comparing base (2407d79) to head (dfd1eec).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9112      +/-   ##
============================================
- Coverage     92.33%   92.33%   -0.01%     
  Complexity     5045     5045              
============================================
  Files          1261     1261              
  Lines         54120    54118       -2     
  Branches       6768     6768              
============================================
- Hits          49974    49972       -2     
  Misses         2486     2486              
  Partials       1660     1660              
Flag Coverage Δ *Carryforward flag
access-control-service 77.38% <ø> (ø) Carriedforward from 2407d79
agent-service 99.16% <ø> (ø) Carriedforward from 2407d79
amber 87.31% <ø> (ø) Carriedforward from 2407d79
computing-unit-managing-service 60.48% <ø> (ø) Carriedforward from 2407d79
config-service 87.37% <ø> (ø) Carriedforward from 2407d79
file-service 82.00% <ø> (ø) Carriedforward from 2407d79
frontend 96.56% <100.00%> (-0.01%) ⬇️
notebook-migration-service 83.73% <ø> (ø) Carriedforward from 2407d79
pyamber 98.57% <ø> (ø) Carriedforward from 2407d79
workflow-compiling-service 72.43% <ø> (ø) Carriedforward from 2407d79

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aglinxinyuan
aglinxinyuan requested a review from kunwp1 October 23, 2026 22:54

Copilot AI 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.

🟢 Approval recommended

No unresolved issues were identified, and all approval-readiness assessments indicate the changes are safe to approve.

No open issues 🎉

Review effort: Lite

@kunwp1
kunwp1 enabled auto-merge October 25, 2026 16:56
@kunwp1
kunwp1 added this pull request to the merge queue Oct 25, 2026
Merged via the queue into apache:main with commit b636a80 Oct 25, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI refactor Refactor the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the unused workflowActionService injection from AiAnalystService

4 participants