Skip to content

refactor(frontend): remove dead step-detail modal leftovers - #9393

Merged
kunwp1 merged 1 commit into
apache:mainfrom
aglinxinyuan:refactor/agent-step-modal-dead-code
Nov 10, 2026
Merged

kunwp1 merged 1 commit into
apache:mainfrom
aglinxinyuan:refactor/agent-step-modal-dead-code

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Removes the unused parts of the agent panel's ReActStepDetailModalComponent. +1/−97 lines. There is no behaviour change.

  • The agentId input. agent-chat binds it, but neither the modal's class nor its template reads it, so the binding goes too.
  • getMessageRoleColor and getToolCallStrings, with the private formatAsFunction that only the latter calls. The template never calls them. Only their own spec cases did, and those three cases go with them.
  • react-step-detail-modal.component.scss and its styleUrls entry. The file holds only the license header and one comment, so it emits no styles.

The helpers the template does call (getTextFromMessage, getToolCallSummaries, the tool-result and operator-access helpers) and their spec cases stay.

History

Introduced by #4495 (2026-04-28), "feat(agent-service): add agent-service that manages LLM agents", together with the modal
Usage removed by never used. Only spec cases (#5612) ever called the two helpers

They have been unused for the six months since they were added.

Any related issues, documentation, discussions?

Closes #9392.

How was this PR tested?

No new tests. The modal's remaining cases stay.

From frontend/:

  • npx ng test --watch=false --include='**/react-step-detail-modal.component.spec.ts' --include='**/agent-chat.component.spec.ts' --include='**/agent-panel.component.spec.ts': 3 files, 125 tests, all pass. The last two specs cover the modal's host (agent-chat) and the panel around it.
  • npx tsc --noEmit -p src/tsconfig.app.json and -p src/tsconfig.spec.json: clean.
  • yarn format:ci: clean.
  • yarn build (production, AOT): success.

To re-check:

git grep -n -E "getMessageRoleColor|getToolCallStrings|formatAsFunction|react-step-detail-modal.component.scss"   # no hits
git grep -n agentId -- frontend/src/app/workspace/component/agent/agent-panel/react-step-detail-modal   # no hits

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

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with Claude Code

The agent step-detail modal never reads its agentId input, and
getMessageRoleColor and getToolCallStrings (with the private
formatAsFunction) are called only by their own spec cases. Its
stylesheet holds only the license header and one comment.

Drop them, the parent binding and the dedicated spec cases.
Copilot AI balanced review requested due to automatic review settings November 10, 2026 00:57

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. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added refactor Refactor the code frontend Changes related to the frontend GUI labels Nov 10, 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:

  • Contributors with relevant context: @bobbai00, @Yicong-Huang
    You can notify them by mentioning @bobbai00, @Yicong-Huang in a comment.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.80%. Comparing base (94aceba) to head (a0f478c).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9393      +/-   ##
============================================
- Coverage     91.80%   91.80%   -0.01%     
  Complexity     5022     5022              
============================================
  Files          1275     1275              
  Lines         56324    56308      -16     
  Branches       7357     7351       -6     
============================================
- Hits          51708    51693      -15     
  Misses         2764     2764              
+ Partials       1852     1851       -1     
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from 94aceba
agent-service 99.53% <ø> (ø) Carriedforward from 94aceba
amber 85.77% <ø> (ø) Carriedforward from 94aceba
computing-unit-managing-service 64.05% <ø> (ø) Carriedforward from 94aceba
config-service 87.73% <ø> (ø) Carriedforward from 94aceba
file-service 82.29% <ø> (ø) Carriedforward from 94aceba
frontend 96.54% <100.00%> (+<0.01%) ⬆️
notebook-migration-service 83.77% <ø> (ø) Carriedforward from 94aceba
pyamber 98.46% <ø> (ø) Carriedforward from 94aceba
workflow-compiling-service 77.95% <ø> (ø) Carriedforward from 94aceba

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

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

The refactor is limited to removing unused members, tests, styling, and a stale binding, with no active review issues identified.

No open issues 🎉

Review effort: Lite

@kunwp1 kunwp1 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.

LGTM!

@kunwp1
kunwp1 enabled auto-merge November 10, 2026 18:09
@kunwp1
kunwp1 added this pull request to the merge queue Nov 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 10, 2026
@kunwp1
kunwp1 added this pull request to the merge queue Nov 10, 2026
Merged via the queue into apache:main with commit 1ec692c Nov 10, 2026
27 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 dead leftovers from the agent step-detail modal

4 participants