Skip to content

refactor(frontend): remove unused report-generation members - #9087

Merged
aglinxinyuan merged 2 commits into
apache:mainfrom
aglinxinyuan:refactor/fe-report-generation-unused-http
Oct 24, 2026
Merged

aglinxinyuan merged 2 commits into
apache:mainfrom
aglinxinyuan:refactor/fe-report-generation-unused-http

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Removes three unused members from ReportGenerationService: the private isAIAssistantEnabled field, the injected http: HttpClient, and the AI_ASSISTANT_API_BASE_URL constant. The now-unused HttpClient and AppSettings imports go too. +2/−11 lines. There is no behaviour change.

Nothing reads any of them, and nothing builds the service by hand; Angular DI creates it, so dropping a constructor parameter is safe. The spec drops its empty HttpClient stub, whose comment already noted that http is "injected by the service and never used".

History

Introduced by #2816 (2024-10-15), "Enhancing Report Generation by Adding Story-teller Ai based on Ai flag", which added all three to this service. Its HTTP calls live in AiAnalystService
Usage removed by never used

They have been unused for the two years since they were added.

Any related issues, documentation, discussions?

Closes #9084

How was this PR tested?

No new tests.

From frontend/:

  • npx ng test --watch=false --include='**/report-generation.service.spec.ts' --include='**/menu.component.spec.ts': 2 files, 169 tests, all pass. These are the only specs that provide or inject the service.
  • 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 added an isAIAssistantEnabled field, an HttpClient injection and
an AI_ASSISTANT_API_BASE_URL constant to this service, but nothing in
it ever used them (the HTTP calls live in AiAnalystService). Remove
them and the imports they leave unused.
Copilot AI balanced review requested due to automatic review settings October 22, 2026 00:16
@aglinxinyuan aglinxinyuan self-assigned this Oct 22, 2026

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 reached their quota limit.

@aglinxinyuan aglinxinyuan changed the title refactor(frontend): remove unused ReportGenerationService members refactor(frontend): remove unused report-generation members Oct 22, 2026
@aglinxinyuan
aglinxinyuan requested a review from kunwp1 October 22, 2026 00:25
@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: @Neilk1021
    You can notify them by mentioning @Neilk1021 in a comment.

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

codecov-commenter commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.30%. Comparing base (6cfcfb1) to head (c6433ba).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9087      +/-   ##
============================================
- Coverage     92.34%   92.30%   -0.04%     
+ Complexity     5046     5045       -1     
============================================
  Files          1261     1260       -1     
  Lines         54117    53899     -218     
  Branches       6767     6725      -42     
============================================
- Hits          49973    49753     -220     
- Misses         2485     2486       +1     
- Partials       1659     1660       +1     
Flag Coverage Δ *Carryforward flag
access-control-service 77.38% <ø> (ø) Carriedforward from 6a101ad
agent-service 99.16% <ø> (ø) Carriedforward from 6a101ad
amber 87.31% <ø> (-0.01%) ⬇️ Carriedforward from 6a101ad
computing-unit-managing-service 60.48% <ø> (ø) Carriedforward from 6a101ad
config-service 87.37% <ø> (ø) Carriedforward from 6a101ad
file-service 82.00% <ø> (ø) Carriedforward from 6a101ad
frontend 96.55% <ø> (-0.01%) ⬇️
notebook-migration-service 83.73% <ø> (ø) Carriedforward from 6a101ad
pyamber 98.53% <ø> (-0.05%) ⬇️ Carriedforward from 6a101ad
workflow-compiling-service 72.43% <ø> (ø) Carriedforward from 6a101ad

*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.

@kunwp1
kunwp1 requested a lite review from Copilot October 22, 2026 17:30

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

No open issues 🎉

Review effort: Lite

@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Oct 24, 2026
Merged via the queue into apache:main with commit 9302a4c Oct 24, 2026
23 checks passed
@aglinxinyuan
aglinxinyuan deleted the refactor/fe-report-generation-unused-http branch October 24, 2026 05:56
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 unused members of ReportGenerationService

4 participants