Repository navigation
feat: CAS personal connections support - #620
Conversation
|
| const { authUrl } = await this.getConnectionAuthUrl(item.connectorKey); | ||
| return authUrl; | ||
| } catch { | ||
| return item.connectionsUrl ?? item.configurationUrl ?? null; |
There was a problem hiding this comment.
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 —
getConnectionAuthUrlwill 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 —
getConnectionAuthUrlwill fail for external apps, andconfigurationUrlis useless outside the portal, so falling back toconnectionsUrl(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.
There was a problem hiding this comment.
Pull request overview
Adds Conversational Agent “personal connections” support to the TypeScript SDK by introducing connection models, endpoints, and service methods, plus documentation updates and a sample app UI demonstrating connection selection.
Changes:
- Added connection-related models and exported them via the Conversational Agent model barrel.
- Added new ConversationalAgentService methods + endpoints for listing/updating connection selections and generating auth URLs, with unit tests.
- Updated OAuth scope documentation and added sample app hooks/components to demonstrate connections UI.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/services/conversational-agent/connections.test.ts | Adds unit tests covering connections endpoints, update behavior, auth URL, and fallback logic. |
| src/utils/constants/endpoints/conversational-agent.ts | Introduces CONNECTIONS and CONNECTION_AUTH endpoints under AGENT_ENDPOINTS. |
| src/services/conversational-agent/conversational-agent.ts | Adds SDK methods for fetching/updating connection selections and resolving “add connection” URLs. |
| src/models/conversational-agent/index.ts | Re-exports new connections models from Conversational Agent model index. |
| src/models/conversational-agent/conversational-agent.models.ts | Extends the service model interface with the new connections methods and types. |
| src/models/conversational-agent/connections/index.ts | New barrel export for connections types. |
| src/models/conversational-agent/connections/connections.types.ts | Defines the new connections-related request/response and domain types. |
| samples/conversational-agent-app/src/hooks/useConnections.ts | Adds a hook to load, stage, and save per-connector connection selections. |
| samples/conversational-agent-app/src/context/ConversationalAgentContext.tsx | Exposes conversationalAgent and setError via context for the sample UI. |
| samples/conversational-agent-app/src/components/Sidebar.tsx | Adds a sidebar overlay panel entry-point for connection settings in the sample app. |
| samples/conversational-agent-app/src/components/ConnectionsPanel.tsx | Adds a sample UI panel for selecting connections per connector binding. |
| docs/oauth-scopes.md | Documents required OAuth scopes for the new connections methods and updates combined scopes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }), | ||
| ); | ||
|
|
||
| // ===== TEST SUITE ===== |
There was a problem hiding this comment.
Missing integration test — rules.md requires: "Every new method must also have an integration test in tests/integration/shared/{domain}/."
The three new public methods (getAvailableConnections, updateConnectionSelections, getAddConnectionUrl) need a corresponding file at tests/integration/shared/conversational-agent/connections.integration.test.ts.
If the connections endpoints reject PAT auth (similar to insightsrtm_ endpoints), the convention allows describe.skip with an explanatory comment — but the file and test structure still need to exist. See tests/integration/shared/agents/agents.integration.test.ts for the pattern.
Review summaryTwo new findings this run (all previously-raised threads were checked; confirmed fixed or skipped per dedupe policy). New inline comments posted:
|
Review summaryThread unresolved: New inline comment: |
Review summaryOne new finding this run; all previously-raised threads confirmed fixed or skipped per dedupe policy. New inline comment posted: conversational-agent.ts lines 197-201 — The getFeatureFlags class method has JSDoc added by this PR. The interface already has the same JSDoc; the duplicate on the class disables TypeScript JSDoc inheritance. The previous resolved thread fixed three other methods but this fourth method picked up a new JSDoc block in the same PR. Per conventions.md, class methods must carry no JSDoc when declared on the interface. |
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
Review summaryOne new finding this run; all previously-raised threads confirmed fixed or skipped per dedupe policy. New inline comments posted:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.
Suppressed comments (4)
samples/conversational-agent-app/src/components/ConnectionsPanel.tsx:83
- This is an icon-only dismiss button, but it has no accessible name. Add an
aria-labelso assistive tech can announce what it does.
<button onClick={() => setSaveStatus(null)} className="ml-2 hover:opacity-80">
samples/conversational-agent-app/src/hooks/useConnections.ts:82
- In
save, the callback readsinitialSelectionsbutinitialSelectionsis missing from theuseCallbackdependency array. This can make the diff logic use stale baseline selections after a reload/save, causing changed selections to be missed.
selections: Object.entries(stagedSelections)
.filter(([connectorKey]) => stagedSelections[connectorKey] !== initialSelections[connectorKey])
.map(([connectorKey, connectionId]) => ({ connectorKey, connectionId: connectionId || null }))
samples/conversational-agent-app/src/components/ConnectionsPanel.tsx:58
- The early returns for loading / empty states don’t render any close control, but this panel is shown as a full overlay. If connections are empty (or loading stalls), the user can’t close the panel.
This issue also appears on line 83 of the same file.
if (isLoading) {
return (
<div className="p-6 flex items-center gap-3 text-gray-400">
<Spinner className="w-4 h-4 border-accent" />
<span className="text-sm">Loading connections...</span>
samples/conversational-agent-app/src/components/Sidebar.tsx:163
- This icon-only button relies on
titlefor its accessible name. For screen readers, add an explicitaria-labelso the control is discoverable.
<button
onClick={() => setShowConnections(true)}
className="p-1.5 hover:bg-white/10 rounded transition-colors"
title="Connection settings"
>
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
maninder-uipath
left a comment
There was a problem hiding this comment.
Please add integration tests also
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
|



Changes Summary
Support for CAS personal connections feature: https://github.com/UiPath/AgentInterfaces/pull/1035
1. uipath-typescript (
feat/cas-personal-connections)AvailableConnection,AvailableConnectionsItem,ConnectionSelection,UpdateConnectionSelectionsRequest,ConnectionAuthRequest/Responseinsrc/models/conversational-agent/connections/ConversationalAgentService:getAvailableConnections(agentId, folderId)— fetches configurable connector bindingsupdateConnectionSelections(agentId, folderId, request)— saves user's connection picksgetConnectionAuthUrl(connectorKey)— internal, gets platform auth URLgetAddConnectionUrl(item)— public helper with fallback chain: auth URL →connectionsUrl→configurationUrl→nullCONNECTIONS,CONNECTION_AUTHIS.Connections.Readto combined scopesconnections.test.ts— 13 tests covering all 4 methods + fallback logic + error paths2. uipath-ui-widgets (
feat/cas-personal-connections)Blocked on uipath-typescript publish.**
ConnectionsSection.tsx— matches CAS two-line row layout (icon+name, selection+badge+clear), inline dropdown picker, search, grouped connections, "+ Connection" button, visibility refreshSettingsDialog.tsx— addedagentId/folderIdprops, renders ConnectionsSection in accordionConversationalAgentChat.tsx— passesagentId/folderIdthroughen/index.jsonandkeys/index.jsonConnectionsSection.test.tsx— 17 tests covering loading, error, empty, rendering, picker, clear, dirty state, save/cancel, status badge, multiple connectorsTypescript-sdk sample app:

Widgets sample app:

Tests:
