fix: remove inaccurate required markers from OAuth Issuer URL and Token URL - #121
fix: remove inaccurate required markers from OAuth Issuer URL and Token URL#121marekdano wants to merge 1 commit into
Conversation
…en URL Signed-off-by: Marek Dano <mk.dano@gmail.com>
a-effort
left a comment
There was a problem hiding this comment.
Reviewed the diff. No blockers.
The required asterisk and sr-only (required) span are removed from the Issuer URL and Token URL labels. The label element's className is simplified from inline-flex with gap to plain text-sm since it no longer needs to lay out an asterisk alongside the text. The Grant type label is unchanged and still carries the required indicator.
The test queries the DOM directly for label[for='oauth-issuer-url'] and label[for='oauth-token-url'], then asserts the absence of * and (required) in their text content. This is a reasonable regression test. One note: toHaveTextContent does a substring match by default, so the assertion that the label does not contain * would also catch any label text that happens to include a literal asterisk for other reasons. That's not a concern here but worth knowing if these assertions are reused elsewhere.
Closes IBM/mcp-context-forge#6467
Summary
oauthConfigSchemainuseMCPServerForm.tsalready declaresissuer/token_urlas.optional()with no cross-field refinement requiring either, and the backend's_validate_oauth_config_urls(mcp-context-forgeschemas.py) only checks URL format, never presence. So this is a visual-only fix — no submission-blocking behavior changes.Out of scope (tracked separately): leave-blank/auto-fill guidance for these fields is covered by IBM/mcp-context-forge#6460, which explicitly depends on this fix landing first.
Test plan
vitest run src/components/mcp-servers/OAuth2Auth.test.tsx— 16/16 passing, including new regression testvitest runon OAuth2Auth/AdvancedSettings/MCPServerForm/useMCPServerForm suites — 200/200 passingeslintclean on changed filestsc --noEmitclean