Repository navigation
Labels
enhancementNew feature or requestfrontendFrontend (React/TypeScript)manual-testingMerged; some criteria need a manual check on real hardware or another OS
Milestone
Description
Goal
Provider kinds registered by the embedding application appear in the AI provider settings. "Add provider" offers them next to the built-in kinds with their own settings form, and existing configs of such kinds can be edited, activated and deleted. Community shows exactly what it shows today.
Context
apps/smart-ssh-community/frontend/src/components/AddAiProviderDialog.tsxhardcodes the kinds inPROVIDER_TYPES(:35-40).AiProviderSettings.tsxlists the configs. Styles:aiProviderFormStyles.ts.- Frontend extension registry:
apps/smart-ssh-community/frontend/src/extensions/registry.ts(e.g.registerSettingsSection:268,registerServerFormSection:440). There is no registration for provider kinds. - The backend contract (kind id,
extension_settingsJSON, optional credential, "unavailable" flag in the list) comes from Extension point: register AI provider kinds through Wiring (storage, factory, commands) #1637.
Requirements
- A new registration function, exported through
public-api.ts, e.g.registerAiProviderKind({ id, label, description, needsCredential, defaultSettings, SettingsForm, gate? }).SettingsFormedits the settings JSON and reports whether it is valid.gatelets the registrant hide or lock the kind, using the existing feature-gating helpers andFeatureLockedDialog.
- The add dialog lists registered kinds after the built-in ones. For an extension kind:
- it shows display name and model, the kind's form, and a credential field only when
needsCredential - it hides the base URL, extra headers and model discovery
- it saves through the existing add command with
provider_type: "extension".
- it shows display name and model, the kind's form, and a credential field only when
- Editing an extension config opens the same form with the stored settings.
- A config whose kind is unavailable (backend flag, or no frontend registration):
- is shown with an "unavailable" note
- cannot be activated
- can still be deleted.
- Backend validation errors are shown at the form like other provider errors.
- New UI texts are in every UI language of the core (existing locale files and i18n tests).
Acceptance Criteria
- Without registrations, the dialog and the list render exactly the current kinds (existing tests unchanged, plus a test asserting no extra entries).
- With a test registration, "Add provider" shows the kind and renders its form. Saving calls the add command with
provider_type: "extension", the kind id and the form's settings. No credential field appears whenneedsCredentialis false. - Editing an extension config pre-fills the kind's form with the stored settings.
- An unavailable config shows the note, its activate control is disabled, and delete works.
- A gated, locked kind opens the feature-locked dialog instead of the form.
- Accessibility tests of the dialog pass (labels, focus order).
- Relevant automated tests pass (frontend unit tests, type check, i18n checks).
Technical Notes
- Frontend only. It uses the IPC types generated in Extension point: register AI provider kinds through Wiring (storage, factory, commands) #1637 and does not change backend code.
- A registrant's form is trusted code of the embedding application. No sandboxing is needed, but it must not receive the credential value.
Files: apps/smart-ssh-community/frontend/src/extensions/registry.ts, apps/smart-ssh-community/frontend/src/public-api.ts, apps/smart-ssh-community/frontend/src/components/AddAiProviderDialog.tsx, apps/smart-ssh-community/frontend/src/components/AiProviderSettings.tsx, apps/smart-ssh-community/frontend/src/components/aiProviderFormStyles.ts, apps/smart-ssh-community/frontend/src/locales/
Spec impact: update 0007
Related Work
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestfrontendFrontend (React/TypeScript)manual-testingMerged; some criteria need a manual check on real hardware or another OS
Type
Fields
Priority
P2 - Normal
Activity
feat(frontend): offer registered AI provider kinds with their own form (
docs(spec): wording (#1640)
smart-ssh-coder commentedon Dec 4, 2026
Implementation ready for review. PR #1707. Added registerAiProviderKind with add/edit dialog support, gating via the feature-locked dialog, and an unavailable note in the list (activate and edit disabled, delete kept). Spec 0007 updated, new 'unavailableNote' text in all locales, 10 new vitest cases stable over 10 runs; tsc, lint and vitest pass and CI is green on PR #1707.
smart-ssh-reviewer commentedon Dec 4, 2026
Review: 1. AddAiProviderDialog.tsx:624: the "Test credentials" button is hidden for contributed kinds. The issue hides only base URL, headers and discovery, and the backend (#1637) tests extension configs through their kind. Show the button for extension kinds and add a test. Also add to Spec 0007 §8.3 that the gate applies only when adding. 2. AiProviderSettings.tsx:376: the web-research toggle fix (it now keeps extensionKind/extensionSettings) has no regression test. Reverting the fix leaves all tests green. 3. Acceptance criterion "Accessibility tests of the dialog pass": nothing checks the dialog with a registered kind. The e2e harness can register extensions (window.__e2eExtensions, see narrow-settings.spec.ts:54). Add a hook and an axe and Tab-order case to add-ai-provider-dialog.spec.ts. 4. aiProvider.unavailableNote says the same thing twice and gives no reason. In German use "Provider-Typ" instead of "Anbietertyp". Fix it in all locales. 5. AddAiProviderDialog.tsx: decide fields through capability helpers next to needsBaseUrl/supportsModelDiscovery instead of inline isExtension guards. Build one typeOptions list instead of two edit branches. Drop the empty fragment around the key field.
fix(frontend): address review of registered AI provider kinds (#1640)
smart-ssh-coder commentedon Dec 4, 2026
Implementation ready for review. PR #1707. Addressed all five review points: credential test now shown for contributed kinds (test + spec note), capability helper/typeOptions refactor, clearer unavailable note in all locales, e2e axe/Tab-order case with a registered kind. The web-research change was unreachable and is reverted (explained in PR comment). CI green.
smart-ssh-reviewer commentedon Dec 4, 2026
Review: 1. AddAiProviderDialog.tsx:181-195: the options shown while editing are still decided in two places (
editing && isExtension ? [] : PROVIDER_TYPESin typeOptions andif (editing)in offeredKinds). Branch once oneditingin typeOptions; offeredKinds keeps only the gate filter. 2. AddAiProviderDialog.tsx:187: the comment "Editing keeps the config's own kind only" is wrong for built-in configs, which still list all four built-in kinds. Correct it. 3. types.ts:127: supportsExtraHeaders also hides the attestation field. Add supportsAttestation(type), put it around the attestation Field, and drop the leftover fragment at AddAiProviderDialog.tsx:731. 4. e2e: the harness hook only registers needsCredential: false. Add the a11y/Tab-order case with needsCredential: true (kind form -> key field), as asked last round.refactor(frontend): decide offered provider kinds once, split attesta…
smart-ssh-coder commentedon Dec 4, 2026
Implementation ready for review. PR #1707. Addressed all four review points (single branch for offered kinds, corrected comment, supportsAttestation gate, e2e a11y/Tab-order case for a kind with a credential). Vitest, lint and Playwright spec pass; CI green.
smart-ssh-reviewer commentedon Dec 4, 2026
Review passed – moving on to merge. Approved. All four points from the last review are fixed in 2c5d622: the offered kinds are now decided in one branch, the comment is corrected, attestation has its own supportsAttestation gate, and the e2e a11y/Tab-order check now covers a kind that needs a credential. Checks: vitest (82 passed), tsc, lint and the Playwright specs (48 passed) all pass locally, and CI is green. Non-blocking: the new e2e test title promises more than it checks, and there is small duplication in typeOptions. Follow-ups are listed in the PR review.
Manual testing after the merge:
smart-ssh-coordinator commentedon Dec 5, 2026
Needs maintainer (merge): PR #1707 still not mergeable after 150 min (state BLOCKED, 0 checks pending).
feat(frontend): offer registered AI provider kinds with their own form (
smart-ssh-coordinator commentedon Dec 5, 2026
Merged and branch deleted: PR #1707 (squash) in develop
smart-ssh-planner commentedon Dec 5, 2026
Follow-ups filed: #1763 Exclude unavailable contributed AI provider kinds from the risk-classifier list and gate "Test credentials" on valid settings; #1764 Define whether native tool calling and max response length apply to contributed AI provider kinds (Spec 0007 §8.3). Not filed: the non-blocking review notes on test title and typeOptions duplication (style).