feat(designerv2): Adding support for knowledge hub editor in designer - #9603
feat(designerv2): Adding support for knowledge hub editor in designer#9603preetriti1 wants to merge 5 commits into
Conversation
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
✅ Risk Level
✅ What & Why
✅ Impact of Change
✅ Test Plan
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | No change needed |
| Commit Type | ✅ | Optionally align label text to feat |
| Risk Level | ✅ | Medium is correct and matches label/estimate |
| What & Why | ✅ | No change needed |
| Impact of Change | ✅ | No change needed |
| Test Plan | ✅ | Unit tests present and confirmed |
| Contributors | Consider crediting PMs/designers | |
| Screenshots/Videos | ✅ | Screenshot provided |
All required checks pass. This PR is compliant and cleared to merge. Nice work including thorough unit tests and a screenshot!
Powered by: Copilot CLI (claude-opus-4.8) | Last updated: Thu, 10 Sep 2026 02:56:14 GMT
There was a problem hiding this comment.
🟡 Changes recommended
Moderate issues remain in cache scoping, validation, upload behavior, filename state, cancellation, and notification wiring.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Ports the Knowledge Hub editor to Designer v2, including connection setup, file management, state, service integration, and tests.
Changes:
- Adds Knowledge Hub editor dialogs and workflows.
- Adds connection, query, upload, and Redux infrastructure.
- Enables Knowledge Hub services in Standalone Designer v2.
File summaries
| File | Description |
|---|---|
libs/designer/src/lib/ui/knowledge/editor/styles.ts |
Adjusts editor spacing. |
libs/designer-v2/src/lib/ui/knowledge/panel/styles.ts |
Adds panel styles. |
libs/designer-v2/src/lib/ui/knowledge/panel/files/useFileHooks.tsx |
Manages file-upload state and actions. |
libs/designer-v2/src/lib/ui/knowledge/panel/files/uploadfile.tsx |
Implements file and group selection. |
libs/designer-v2/src/lib/ui/knowledge/panel/files/filelist.tsx |
Implements file metadata editing. |
libs/designer-v2/src/lib/ui/knowledge/panel/connection/usepaneltabs.tsx |
Coordinates connection setup tabs. |
libs/designer-v2/src/lib/ui/knowledge/panel/connection/tabs/model.tsx |
Adds model configuration. |
libs/designer-v2/src/lib/ui/knowledge/panel/connection/tabs/basics.tsx |
Adds basic connection configuration. |
libs/designer-v2/src/lib/ui/knowledge/panel/connection/__test__/usepaneltabs.spec.tsx |
Tests connection tab orchestration. |
libs/designer-v2/src/lib/ui/knowledge/panel/connection/__test__/model.spec.tsx |
Tests model configuration. |
libs/designer-v2/src/lib/ui/knowledge/panel/connection/__test__/basics.spec.tsx |
Tests basic configuration. |
libs/designer-v2/src/lib/ui/knowledge/modals/styles.ts |
Adds modal styles. |
libs/designer-v2/src/lib/ui/knowledge/modals/creategroup.tsx |
Implements group creation. |
libs/designer-v2/src/lib/ui/knowledge/modals/__test__/creategroup.spec.tsx |
Tests group creation. |
libs/designer-v2/src/lib/ui/knowledge/editor/styles.ts |
Styles the Knowledge Hub editor. |
libs/designer-v2/src/lib/ui/knowledge/editor/index.tsx |
Implements the main editor. |
libs/designer-v2/src/lib/ui/knowledge/editor/files.tsx |
Adds the upload dialog. |
libs/designer-v2/src/lib/ui/knowledge/editor/connection.tsx |
Adds the connection dialog. |
libs/designer-v2/src/lib/ui/knowledge/editor/__test__/files.spec.tsx |
Tests upload dialog behavior. |
libs/designer-v2/src/lib/ui/knowledge/editor/__test__/connection.spec.tsx |
Tests connection dialog behavior. |
libs/designer-v2/src/lib/ui/DesignerDialog.tsx |
Hosts designer dialogs. |
libs/designer-v2/src/lib/ui/Designer.tsx |
Mounts the dialog host. |
libs/designer-v2/src/lib/core/utils/parameters/helper.ts |
Registers the Knowledge Hub editor. |
libs/designer-v2/src/lib/core/utils/parameters/__test__/helper-agentParams.spec.ts |
Tests feature-gated parameters. |
libs/designer-v2/src/lib/core/state/modal/modalSlice.ts |
Adds connection-modal state. |
libs/designer-v2/src/lib/core/state/knowledge/store.ts |
Defines the knowledge store. |
libs/designer-v2/src/lib/core/state/knowledge/panelSlice.ts |
Adds knowledge panel state. |
libs/designer-v2/src/lib/core/state/knowledge/optionsSlice.ts |
Adds options and notification state. |
libs/designer-v2/src/lib/core/state/designerOptions/designerOptionsSlice.ts |
Initializes the resource service. |
libs/designer-v2/src/lib/core/state/designerOptions/designerOptionsInterfaces.ts |
Exposes resource-service configuration. |
libs/designer-v2/src/lib/core/knowledge/utils/queries.ts |
Adds hub and connection queries. |
libs/designer-v2/src/lib/core/knowledge/utils/helper.ts |
Adds hub and artifact helpers. |
libs/designer-v2/src/lib/core/knowledge/utils/connection.ts |
Defines knowledge connection parameters. |
libs/designer-v2/src/lib/core/knowledge/utils/__test__/queries.spec.ts |
Tests knowledge queries. |
libs/designer-v2/src/lib/core/knowledge/utils/__test__/helper.spec.ts |
Tests helpers and validation. |
libs/designer-v2/src/lib/core/knowledge/utils/__test__/connection.spec.ts |
Tests connection utilities. |
libs/designer-v2/src/lib/core/actions/bjsworkflow/knowledge.ts |
Initializes knowledge services. |
libs/designer-v2/src/lib/common/constants.ts |
Adds editor and tab constants. |
apps/Standalone/src/designer/app/AzureLogicAppsDesigner/laDesignerV2.tsx |
Configures Knowledge Hub services. |
Review details
Suppressed comments (9)
libs/designer-v2/src/lib/core/knowledge/utils/connection.ts:25
- These authentication labels are rendered to users but bypass
intl.formatMessage, so they cannot be extracted or translated. This file already follows the localized pattern for comparable labels atconnection.ts:49-63; apply it to these literals (and the corresponding hardcoded account/auth labels later in this factory).
displayName: 'Authentication type',
description: 'Authentication type',
libs/designer-v2/src/lib/core/knowledge/utils/connection.ts:38
- The Cosmos DB account display name, description, and tooltip are user-visible but hardcoded, unlike the localized parameters at
connection.ts:49-63. Wrap these strings withintl.formatMessageso they are included in localization extraction.
displayName: 'Azure Cosmos DB Service Account',
description: 'Select the Azure Cosmos DB Service Account to use for this connection',
tooltip: 'Select the Azure Cosmos DB Service Account to use for this connection',
libs/designer-v2/src/lib/core/knowledge/utils/connection.ts:101
- This OpenAI authentication label and description are user-visible hardcoded strings. Use
intl.formatMessage, consistent with the localized connection labels atconnection.ts:125-139, so non-English locales do not receive English-only text.
displayName: 'Authentication type',
description: 'Authentication type',
libs/designer-v2/src/lib/core/knowledge/utils/connection.ts:114
- The Cognitive Service account display name, description, and tooltip bypass localization, while comparable labels at
connection.ts:125-139useintl.formatMessage. Localize these strings so the new editor remains usable in supported non-English locales.
displayName: 'Azure Cognitive Service Account',
description: 'Select the Azure Cognitive Service Account to use for this connection',
tooltip: 'Select the Azure Cognitive Service Account to use for this connection',
libs/designer-v2/src/lib/ui/knowledge/editor/index.tsx:139
selectedHubis initialized from the controlledvalueonly once. If the parameter changes later through undo/redo, workflow reload, or an external state update while this editor remains mounted, the dropdown continues displaying the old hub. Keep this state synchronized withhubName, or derive the selection directly fromvalue.
const [selectedHub, setSelectedHub] = useState<string>(hubName ?? '');
libs/designer-v2/src/lib/ui/knowledge/editor/index.tsx:173
- While
useConnectionis still loading,connectionis undefined and this enabled Create button is rendered. A quick click can open a creation flow even when an existing knowledge connection is about to load, allowing a duplicate creation attempt. Disable the button until the connection query settles.
<Button className={styles.createButton} icon={<Add20Regular style={{ width: '18px' }} />} onClick={handleOpenConnectionModal}>
libs/designer-v2/src/lib/ui/knowledge/editor/index.tsx:171
- This displays the connection resource key rather than the display name entered in the creation form. Knowledge connections store that value in
properties.displayName(seelogic-apps-shared/.../standard/connection.ts:771-794), whilenameis the fixed/generated connection key. Show the display name first, with the resource name only as a fallback.
{connection ? (
<Input id="connection-input" value={connection?.name ?? ''} disabled={true} aria-label={INTL_TEXT.connectionSectionLabel} />
libs/designer-v2/src/lib/ui/knowledge/panel/connection/usepaneltabs.tsx:95
- The Create button is disabled only while a request is already running. No required OpenAI model/auth parameters are checked, so an empty Model step can call
createOrUpdateConnectionwith an incomplete payload. Derive this disabled state from the active model parameter set's required fields before allowing creation.
libs/designer-v2/src/lib/ui/knowledge/panel/connection/usepaneltabs.tsx:30 - These factories return new parameter-set objects on every render, so both tab
useMemos are invalidated and the returned tabs array is rebuilt even on unrelated parent rerenders. Memoize both factory calls byintl; the current memoization test masks this because its factory mocks return stable objects.
- Files reviewed: 40/40 changed files
- Comments generated: 6
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
📊 Coverage check completed. See workflow run for details. |
…eation from designer on group addition
Commit Type
Risk Level
What & Why
Adding knowledge hub editor in v2 designer, just copied over the implementation with minor changes on styling since this is v2. This feature was present in v1 for few months now.
Impact of Change
Test Plan
Screenshot