feat(providers): dependencies role, webUrl plumbing, confirm-remove dialog#97
Closed
WZ wants to merge 1 commit into
Closed
feat(providers): dependencies role, webUrl plumbing, confirm-remove dialog#97WZ wants to merge 1 commit into
WZ wants to merge 1 commit into
Conversation
Batch A of the QA fix plan. Five provider-form/registry issues: - Add `dependencies` role checkbox (schema already accepted it). - Thread optional `webUrl` through ProviderForm → handleSave POST/PUT → handleEdit round-trip → ProviderCard (renders as "Open" link). - Fallback the /api/branding `grafanaUrl` to a metrics-role provider's webUrl so Service Detail's "Open in Grafana" button lights up even when only `metrics` is tagged (common single-Grafana setup). - Replace instant Remove delete with a reusable, keyboard-safe `ConfirmActionDialog` (Cancel default-focused, destructive variant). - Add `aria-label="Providers YAML"` to the YAML import textarea. - Fix `ProviderRegistry.test()` to re-run auto-compute of `enabledTools`/`enabledToolCount` after a successful reconnect so the UI no longer shows stale counts like "0 tools (41 enabled)". User curation is preserved when any previously-enabled tool survives the reconnect. Also unskips the four Batch-A e2e specs now that the features exist. Tests: +30 across ConfirmActionDialog, ProviderForm, ProviderCard, ProvidersPage (add/edit/remove round-trip), and ProviderRegistry (stale-enabledToolCount regression + user-curation preservation).
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Batch A of the QA fix plan. Addresses 5 P3 findings in the provider form, card, and registry.
dependenciesrole checkbox to ProviderForm (Zod schema already accepted it).webUrlplumbing: ProviderForm input → ProvidersPagehandleSavePOST/PUT body →handleEditround-trip → ProviderCard "Open" link./api/brandingnow falls back to metrics-rolewebUrlso Service Detail's "Open in Grafana" button lights up on the common single-Grafana setup. Per Codex feedback, the "sse" transport picker was dropped (schema only acceptshttp/stdio).ConfirmActionDialog(Radix-stylealertdialog, Cancel default-focused, destructive variant). Wrapped around the provider Remove action with a body explaining the wipe.aria-label="Providers YAML"+spellCheck={false}to the YAML import textarea (native element, not CodeMirror).ProviderRegistry.test()now re-runs auto-compute ofenabledTools/enabledToolCountafter a successful reconnect. Fixes the "0 tools (41 enabled)" UI glitch. Preserves user-curated selections when at least one previously enabled tool survives the reconnect; otherwise falls back to the default policy.Test plan
npx tsc --noEmit— cleannpx vitest run— 82 files / 1065 tests pass (was 1035 before this patch)npx vitest run src/mcp/provider-registry.test.ts— 28 pass including 2 new regression testsnpx vitest run src/web/components/providers/ProviderForm.test.tsx— 8 passnpx vitest run src/web/components/providers/ProviderCard.test.tsx— 4 passnpx vitest run src/web/components/ConfirmActionDialog.test.tsx— 11 passnpx vitest run src/web/components/ProvidersPage.test.tsx— 4 pass (webUrl POST/PUT round-trip, remove-confirm-cancel, remove-confirm-delete)npx playwright test --list— all 9 specs parse, Batch-A fixmes unskipped (4 now live)npm run build:web— 2163 modules transformed, no errors