feat(api): include providerName in GET /api/connections#10
Merged
matoushavlena merged 2 commits intomainfrom Apr 18, 2026
Merged
feat(api): include providerName in GET /api/connections#10matoushavlena merged 2 commits intomainfrom
matoushavlena merged 2 commits intomainfrom
Conversation
Fold the app-registry display name into the connections list so callers don't have to fetch /api/apps just to render "Google Drive" alongside the user's email. The existing `connection.label` field is the user's *identity* (email/username from metadata via extractLabel), not the app's display name — rendering it as a card title produces the duplicate-email UX that the Humr platform hit (see kagenti/humr#187). Pure additive: existing consumers ignore the new field; when the provider id isn't in the registry, `providerName` is `null` so callers can fall back. Signed-off-by: Matous Havlena <havlenma@gmail.com>
The local map variable shadowed the response field it populates. Renaming makes intent clearer at a glance per review feedback. Signed-off-by: Matous Havlena <havlenma@gmail.com>
matoushavlena
added a commit
to kagenti/humr
that referenced
this pull request
Apr 18, 2026
…rName Closes the "email on both title and subtitle" bug surfaced at #187: the Connections page and the Edit Agent Secrets Apps group were showing the user's email in both fields because OneCLI's connection.label is the user's identity (extracted from metadata.email|username|name), not the app's display name. OneCLI 0.0.14 ships a new providerName field on every /api/connections row, sourced from the app registry (kagenti/onecli#10). Consume it: label: c.providerName?.trim() || c.label?.trim() || c.provider identity falls back to OneCLI's label when metadata is thin, so the subtitle remains useful for providers that don't expose rich metadata. Bumps Helm OneCLI image to 0.0.14 and drops the now-unused listApps port method plus its tests. 28 api-server unit tests pass. Signed-off-by: Matous Havlena <havlenma@gmail.com>
5 tasks
matoushavlena
added a commit
to kagenti/humr
that referenced
this pull request
Apr 18, 2026
* fix(api-server): render connection app name via onecli 0.0.14 providerName Closes the "email on both title and subtitle" bug surfaced at #187: the Connections page and the Edit Agent Secrets Apps group were showing the user's email in both fields because OneCLI's connection.label is the user's identity (extracted from metadata.email|username|name), not the app's display name. OneCLI 0.0.14 ships a new providerName field on every /api/connections row, sourced from the app registry (kagenti/onecli#10). Consume it: label: c.providerName?.trim() || c.label?.trim() || c.provider identity falls back to OneCLI's label when metadata is thin, so the subtitle remains useful for providers that don't expose rich metadata. Bumps Helm OneCLI image to 0.0.14 and drops the now-unused listApps port method plus its tests. 28 api-server unit tests pass. Signed-off-by: Matous Havlena <havlenma@gmail.com> * fix(ui): include appsChanged in Edit Agent Secrets Save gate The Save button's canSave condition only watched credsChanged and envChanged, so toggling an app checkbox (the whole reason this dialog has an Apps group) never unlocked the button. save() already handled appsChanged correctly on its own; the bug was purely in the enablement gate. Lift appsChanged into a useMemo so both canSave and the "Nothing to save" title can see it. Signed-off-by: Matous Havlena <havlenma@gmail.com> --------- Signed-off-by: Matous Havlena <havlenma@gmail.com>
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
Fold the app-registry display name into the
/api/connectionsresponse so external callers (e.g. the Humr agent platform) don't have to make a second request to/api/appsjust to render "Google Drive" next to the user's email.Why
The existing
connection.labelfield is the user's identity —extractLabel()inconnection-service.tsderives it frommetadata.email | username | name. It is not the app's display name. When callers renderlabelas the card title, the result is a duplicated email on both lines (see kagenti/humr#187 for the before-screenshot).The display name ("Google Drive", "Gmail", "GitHub") already lives in the static
appsregistry. Joining on the server is a one-line map.What
Compatibility
Pure additive — no field removed, no type change. Existing consumers (OneCLI dashboard, Humr) keep working. When the provider id isn't in the registry (unlikely, but possible if a connection is orphaned after an app is removed),
providerNameisnullso callers can fall back.Test plan
providerNamepopulated for registry-backed providers.