Skip to content

chore: use shared FormRadio component in endpointWizard - #2197

Merged
nborges-aws merged 2 commits into
refactorfrom
polish/endpoint-wizard
Sep 3, 2026
Merged

chore: use shared FormRadio component in endpointWizard#2197
nborges-aws merged 2 commits into
refactorfrom
polish/endpoint-wizard

Conversation

@nborges-aws

@nborges-aws nborges-aws commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

EndpointWizard.tsx was added before the FormRadioGroup shared component was created, as until now was using its own radio button logic.

This PR updates endpoint wizard to use the shared component, aligning it to the style and handling the rest of the TUI uses.

Before:
image
After:
image

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe): Tech debt

Testing

How have you tested the change?

  • bun run test (2854 pass, 0 fail)
  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

@github-actions github-actions Bot added the size/s PR size: S label Sep 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Sep 3, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 3, 2026

@agentcore-devx-automation agentcore-devx-automation Bot 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.

AgentCore Harness Review

Verdict: Looks good

Nice, focused refactor extracting the radio-list rendering into a reusable FormRadioGroup. The behavior in VersionStep is preserved (key handling, focus semantics, sort order, "latest" default in create mode), tests were updated to assert the new bordered layout, and no other call sites still rely on the removed detail field.

A couple of small observations, none of which I think block merging:

  • FormRadioGroup lives in src/components/ while the other reusable UI primitives (spinner, stepper, dialog, key-hint, etc.) live in src/components/ui/ and typically have a colocated .test.tsx. Might be worth moving it under ui/ and adding a lightweight unit test in a follow-up, especially since it's meant to be reused.
  • In the loaded state the wizard now shows both a bold name ("choose a harness version") and a muted helpText ("which harness version should this endpoint serve?"), while the pending/error/empty branches still render just the original muted <Question>. The header text visibly changes as the versions query resolves. If that's not intentional, consider either dropping name (pass an empty string, or extend FormRadioGroup to make it optional) or rendering an equivalent bold header in the other branches too.

Neither is a correctness issue — feel free to address in a follow-up.

@agentcore-devx-automation agentcore-devx-automation Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Sep 3, 2026
@codecov-commenter

codecov-commenter commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.08%. Comparing base (831025c) to head (5bd6779).

Files with missing lines Patch % Lines
src/components/EndpointWizard.tsx 75.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           refactor    #2197      +/-   ##
============================================
- Coverage     97.09%   97.08%   -0.02%     
============================================
  Files           544      544              
  Lines         37834    37839       +5     
============================================
- Hits          36736    36735       -1     
- Misses         1098     1104       +6     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

notgitika
notgitika previously approved these changes Sep 3, 2026

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

The PR itself LGTM but I would maybe try to address this portion that the harness reviewer added above

In the loaded state the wizard now shows both a bold name ("choose a harness version") and a muted helpText ("which harness version should this endpoint serve?"), while the pending/error/empty branches still render just the original muted . The header text visibly changes as the versions query resolves. If that's not intentional, consider either dropping name (pass an empty string, or extend FormRadioGroup to make it optional) or rendering an equivalent bold header in the other branches too.

@nborges-aws
nborges-aws force-pushed the polish/endpoint-wizard branch from 44fe8d9 to 5bd6779 Compare September 3, 2026 21:26
@github-actions github-actions Bot added size/s PR size: S and removed size/s PR size: S labels Sep 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 3, 2026
@github-actions github-actions Bot added size/s PR size: S and removed size/s PR size: S labels Sep 3, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 3, 2026
@nborges-aws
nborges-aws merged commit 8b53fe1 into refactor Sep 3, 2026
25 checks passed
@nborges-aws
nborges-aws deleted the polish/endpoint-wizard branch September 3, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants