feat: add service catalog presets to Add Service UI#96
Merged
dangtony98 merged 2 commits intomainfrom Apr 21, 2026
Merged
Conversation
Selecting a preset from the built-in catalog pre-fills host, description, auth type, and the suggested credential key, with header/prefix seeded for api-key services. "Custom (blank)" remains the default and Edit mode is unchanged. Catalog entries for api-key services (Anthropic, Datadog, Postmark, Shopify) now carry the required header (e.g. x-api-key) so the preset is usable without additional lookup. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… catalog Three review-comment fixes on the preset picker in ServicesTab: - Basic-auth credential routing: for Twilio and Jira the suggested_credential_key is the token that belongs in the password slot (username is the AccountSID / email, which is user-specific). Previously the preset always put it in the username slot, producing a misconfigured service that 401s at the proxy. Route basic-auth presets to password. - Custom (blank) now resets all fields. Previously, selecting a preset and then switching back to Custom only changed the dropdown label while the seeded values stayed in form state, silently saving an unintended service on submit. Factored a resetFields() helper, called on every preset change. - Catalog snapshot: the preset picker now freezes its catalog at modal-open time so a catalog fetch resolving while the user is already filling the form does not shift the picker into view above fields they are editing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0437020 to
e7b637b
Compare
Contributor
Author
|
Rebased onto latest main and addressed all three review comments (commit e7b637b):
Typecheck + |
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
catalog.Templategains optionalHeader/Prefixfields.Headeris populated for the four api-key services (Anthropicx-api-key, DatadogDD-API-KEY, PostmarkX-Postmark-Server-Token, ShopifyX-Shopify-Access-Token) so the preset is usable without additional lookup.ServicesTabfetches/v1/service-catalogonce on mount (in parallel with the services fetch) via the existingapiRequesthelper;ServiceModalrenders aSelect-based preset picker above Host Pattern in add mode.No changes to the HTTP API surface, the service save path, or the agent-facing skill docs — the catalog endpoint already existed and just gained two optional JSON fields.
Test plan
go test ./...— greenweb$ npx tsc --noEmit— greenweb$ npm run build— greenmake web-dev→ open vault → Services tab → Add service:api-key+ credential key =ANTHROPIC_API_KEY+ header =x-api-keyall populateSTRIPE_KEY🤖 Generated with Claude Code