Skip to content

chore(frontend): remove spec-only PresetService members - #8614

Open
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:chore/fe-preset-specs
Open

aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:chore/fe-preset-specs

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Removes three PresetService members that no production code calls: updateOrCreatePreset, isValidNewOperatorPreset, and the exported PresetDictionary type. Pure deletion, no behaviour change: −175 lines.

History

Introduced by #1164 (2022-01-13) — "Add PresetService (User Presets Step 3)", which built out the preset API surface
Usage removed by never wired up — no production file has ever called updateOrCreatePreset or isValidNewOperatorPreset, and PresetDictionary has zero references worktree-wide. Only the service's own spec exercises them

Reviewer note: the wired-up half of the service stays — savePresets, getPresets, applyPreset, isValidOperatorPreset, isValidPreset and the Ajv type guards all keep live consumers. common/formly/preset-wrapper/** calls none of the removed three (checked line by line in both the .ts and the .html). Note isValidOperatorPreset (live) and isValidNewOperatorPreset (removed) differ by one word — only the latter goes.

Any related issues, documentation, discussions?

Closes #8611

How was this PR tested?

Existing tests only — this PR removes methods and the spec blocks that covered them.

From frontend/:

  • npx ng test --watch=false --include='**/preset.service.spec.ts' — 48 tests pass.
  • yarn --cwd frontend format:ci — clean.

Verification, re-runnable by a reviewer:

git grep -n "updateOrCreatePreset\|isValidNewOperatorPreset\|PresetDictionary"
git grep -n isValidOperatorPreset    # the live sibling, untouched

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5)

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings September 19, 2026 23:47

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.

@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Sep 19, 2026
@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:

  • No candidates found from git blame history.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.78%. Comparing base (957b6c9) to head (05c59cb).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8614      +/-   ##
============================================
- Coverage     92.78%   92.78%   -0.01%     
  Complexity     4902     4902              
============================================
  Files          1236     1236              
  Lines         52165    52149      -16     
  Branches       6411     6404       -7     
============================================
- Hits          48402    48386      -16     
  Misses         2191     2191              
  Partials       1572     1572              
Flag Coverage Δ *Carryforward flag
access-control-service 71.78% <ø> (ø) Carriedforward from 957b6c9
agent-service 99.16% <ø> (ø) Carriedforward from 957b6c9
amber 88.63% <ø> (ø) Carriedforward from 957b6c9
computing-unit-managing-service 55.20% <ø> (ø) Carriedforward from 957b6c9
config-service 87.37% <ø> (ø) Carriedforward from 957b6c9
file-service 81.53% <ø> (ø) Carriedforward from 957b6c9
frontend 96.58% <ø> (-0.01%) ⬇️
notebook-migration-service 83.73% <ø> (ø) Carriedforward from 957b6c9
pyamber 98.48% <ø> (ø) Carriedforward from 957b6c9
workflow-compiling-service 74.09% <ø> (ø) Carriedforward from 957b6c9

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

This branch has not been deployed

No deployments
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove spec-only PresetService members

3 participants