Skip to content

feat: cas personal connections parity - #122

Open
norman-le wants to merge 1 commit into
developfrom
feat/cas-personal-connections
Open

feat: cas personal connections parity#122
norman-le wants to merge 1 commit into
developfrom
feat/cas-personal-connections

Conversation

@norman-le

Copy link
Copy Markdown
Contributor

Changes Summary

Support for CAS personal connections feature: https://github.com/UiPath/AgentInterfaces/pull/1035

1. uipath-typescript (feat/cas-personal-connections)

  • New types: AvailableConnection, AvailableConnectionsItem, ConnectionSelection, UpdateConnectionSelectionsRequest, ConnectionAuthRequest/Response in src/models/conversational-agent/connections/
  • New SDK methods on ConversationalAgentService:
    • getAvailableConnections(agentId, folderId) — fetches configurable connector bindings
    • updateConnectionSelections(agentId, folderId, request) — saves user's connection picks
    • getConnectionAuthUrl(connectorKey) — internal, gets platform auth URL
    • getAddConnectionUrl(item) — public helper with fallback chain: auth URL → connectionsUrlconfigurationUrlnull
  • New endpoints: CONNECTIONS, CONNECTION_AUTH
  • Docs: OAuth scopes for connections methods, added IS.Connections.Read to combined scopes
  • Sample app: 4 files demonstrating SDK usage
  • Tests: connections.test.ts — 13 tests covering all 4 methods + fallback logic + error paths

2. uipath-ui-widgets (feat/cas-personal-connections)

Blocked on uipath-typescript publish.**

  • New component: ConnectionsSection.tsx — matches CAS two-line row layout (icon+name, selection+badge+clear), inline dropdown picker, search, grouped connections, "+ Connection" button, visibility refresh
  • Modified: SettingsDialog.tsx — added agentId/folderId props, renders ConnectionsSection in accordion
  • Modified: ConversationalAgentChat.tsx — passes agentId/folderId through
  • i18n: 21 new keys in en/index.json and keys/index.json
  • Tests: ConnectionsSection.test.tsx — 17 tests covering loading, error, empty, rendering, picker, clear, dirty state, save/cancel, status badge, multiple connectors

Merge Order & Blockers

  1. uipath-typescript → merge PR, publish new npm version
  2. uipath-ui-widgets → update package.json to new uipath-typescript version, commit and merge PR (blocked on step 1)

Waiting On

  • IS team: Request to allow allFolders=true for user-scoped external app tokens.
  • Alternative if that's a hard restriction - (allFolders: false) only returns the user's personal workspace connections for external apps. Full shared + personal folder support requires IS to lift this restriction.

Typescript-sdk sample app:
image

Widgets sample app:
image

image

Copilot AI review requested due to automatic review settings July 22, 2026 15:54
@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage Report

Package Line Coverage
datatable 88.29%
multi-file-upload 87.27%
conversational-agent-chat 81.57%
validation-station 99.05%

type="button"
onClick={() =>
window.open(
item.connectionsUrl ?? item.configurationUrl,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SDK falls back to connectionsUrl first, then configurationUrl.
CAS goes straight to configurationUrl.

  • ConnectionsUrl is the Orchestrator page.
  • configurationUrl is the Studio Web automation-configuration page — the URL that CAS builds in the controller

That's intentional and correct because of the use case difference:

  • CAS runs inside the UiPath platform — getConnectionAuthUrl will succeed, and if it somehow fails, configurationUrl (the Studio Web automation-configuration page) still works because the user is already in the portal
  • SDK/widgets can run externally — getConnectionAuthUrl will fail for external apps, and configurationUrl is useless outside the portal, so falling back to connectionsUrl (the Orchestrator connections page) is more useful since a logged-in user can at least manage connections there

So same core behavior (auth URL first), smarter fallback for the broader audience.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds UI support in conversational-agent-chat for CAS “personal connections” by surfacing a Connections section inside the Settings dialog, wired with agentId/folderId and backed by new i18n strings.

Changes:

  • Introduces ConnectionsSection UI for viewing/selecting/clearing and saving connector bindings (with search/grouping and “add connection” flows).
  • Extends Settings plumbing to pass agentId/folderId down into Settings/Connections.
  • Adds new i18n keys/English strings for the connections experience.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/conversational-agent-chat/src/i18n/locales/keys/index.json Adds new i18n keys for connections UI.
packages/conversational-agent-chat/src/i18n/locales/en/index.json Adds English strings for the new connections UI.
packages/conversational-agent-chat/src/ConversationalAgentChat.tsx Passes agentId/folderId into SettingsDialog.
packages/conversational-agent-chat/src/components/SettingsDialog/SettingsDialog.tsx Adds optional agentId/folderId props and conditionally renders the new Connections accordion section.
packages/conversational-agent-chat/src/components/SettingsDialog/ConnectionsSection.tsx New component implementing connections listing, selection, refresh-on-visibility, and save/cancel behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +325 to +327
<button
type="button"
onClick={() => { setOpen(!open); setSearch(""); }}
"country_name_zimbabwe": "Zimbabwe",
"connections_title": "Connections",
"connections_loading": "Loading connections…",
"connections_no_configurable": "No configurable connections for this agent.",
Comment on lines +53 to +57
export const ConnectionsSection = ({
conversationalAgent,
agentId,
folderId,
}: ConnectionsSectionProps) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to adding tests here, that would be great

Comment on lines +71 to +80
const fetchConnections = useCallback(() => {
return conversationalAgent
.getAvailableConnections(agentId, folderId)
.then((items) => {
const selections = getInitialSelections(items);
setAvailableConnections(items);
setInitialSelections(selections);
setStagedSelections(selections);
});
}, [conversationalAgent, agentId, folderId]);
Comment on lines +82 to +98
useEffect(() => {
let cancelled = false;
setLoading(true);
setLoadError(null);
setSaveResult(null);
fetchConnections()
.catch((err: unknown) => {
if (cancelled) return;
setLoadError(err instanceof Error ? err.message : String(err));
})
.finally(() => {
if (!cancelled) setLoading(false);
});
return () => {
cancelled = true;
};
}, [fetchConnections]);
variant={STATUS_VARIANT[selectedConnection.state] ?? "secondary"}
>
{t(
STATUS_LABEL_KEY[selectedConnection.state] ??

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the PR check failure above it should be easy to fix with a coding agent - it's a nuance of having a script to check for string localization to protect against community contributions not being properly localized.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah - havent gotten around back to this PR, but I was going to check with Claude haha. Thanks for the context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants