fix(designer-ui): Polish Foundry agent details, fix portal URL encoding, and add regression tests#9060
Merged
ccastrotrejo merged 4 commits intomainfrom Apr 14, 2026
Merged
Conversation
- Remove "Defined in Foundry" badge from instructions label - Increase instructions textarea default height to 200px - Replace border with subtle box-shadow for better depth - Increase row gap/padding for better breathing room - Fix portal URL: base64url-encode subscription GUID to match Foundry portal expected format Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…URL, and add tests
- Hide user instructions for Foundry agent connections in both
designer and designer-v2 (filterFoundryManagedSettings)
- Fix portal URL: base64url-encode subscription GUID to match
Foundry portal expected format
- Export guidToBase64Url for testability with non-GUID fallback
- Remove "Defined in Foundry" badge from instructions label
- Add regression tests:
- guidToBase64Url unit tests (GUID encoding, fallback, URL-safety)
- Portal URL with real GUID subscription ID
- Badge removal and Instructions label presence
- Source-level contract tests ensuring both hideSystemInstructions
and hideUserInstructions are set in filterFoundryManagedSettings
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Polishes the Foundry Agent Details experience and adjusts Foundry-managed parameter rendering, including fixing Foundry portal deep links by encoding subscription IDs correctly.
Changes:
- Hide user instructions (and system instructions) when settings are Foundry-managed in both designer parameter tabs.
- Update Foundry Agent Details UI styling (spacing, shadow, textarea height) and remove the “Defined in Foundry” badge.
- Add
guidToBase64Urland updatebuildFoundryPortalUrlto use base64url-encoded subscription IDs, with unit tests.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/designer/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/index.tsx | Hides user instructions along with system instructions for Foundry-managed settings. |
| libs/designer/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/test/helpers.spec.ts | Adds a regression test to ensure Foundry-managed settings hide both instruction types. |
| libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/index.tsx | Mirrors Foundry-managed instruction hiding behavior in v2. |
| libs/designer-v2/src/lib/ui/panel/nodeDetailsPanel/tabs/parametersTab/test/helpers.spec.ts | Mirrors the regression test in v2. |
| libs/designer-ui/src/lib/foundryagentdetails/styles.ts | UI polish: spacing/shadow updates and taller instructions textarea; removes badge styles. |
| libs/designer-ui/src/lib/foundryagentdetails/index.tsx | Adds GUID→base64url conversion and updates portal URL builder; removes badge rendering. |
| libs/designer-ui/src/lib/foundryagentdetails/test/foundryAgentDetails.spec.tsx | Adds tests for URL encoding + UI badge removal and guidToBase64Url. |
| Localize/lang/strings.json | Removes the unused “Defined in Foundry” localization entries. |
…nstructions visible - Remove vestigial labelRow wrapper (single child after badge removal) - Hoist duplicate baseAgent/baseModels test fixtures to module scope - Revert hideUserInstructions — user instructions should remain visible but optional, not hidden entirely - Update regression tests to match Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ion and regex-based tests - Wrap guidToBase64Url output with encodeURIComponent for safe URL interpolation when subscription is not a GUID - Replace fixed 800-char window with regex match in both designer and designer-v2 regression tests for robustness Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
❌ PR Validation ErrorAn error occurred while validating your PR. Please try again later or contact the maintainers. Error: API request failed with status 503 |
📊 Coverage CheckNo source files changed in this PR. |
🤖 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
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | No change needed |
| Commit Type | ✅ | No change needed |
| Risk Level | Add a risk:* label to the PR and consider risk:medium |
|
| What & Why | ✅ | No change needed |
| Impact of Change | ✅ | Confirm removed localization key isn't used elsewhere |
| Test Plan | ✅ | Consider adding E2E/integration smoke test or QA sign-off for portal URL behavior |
| Contributors | ✅ | No change needed |
| Screenshots/Videos | Optional: add before/after screenshots for UI polish |
Summary / Action Items (short):
- Add a risk label to the PR. Based on the diff I recommend
risk:medium(the PR currently says Low in the body — please update either the label or the PR body to match). This is important for downstream reviewers and release gating. - Confirm runtime compatibility of guidToBase64Url (use of btoa):
- In Node test environments btoa may not be available. Consider using a cross-platform implementation (e.g. Buffer.from(hex, 'hex').toString('base64') then convert to base64url) or ensure a polyfill for environments that run tests or server-side rendering.
- Example suggestion (not code-blocked here): use Buffer if available, fallback to btoa in browser. This avoids surprises in unit test environments.
- Verify that removing the localization key
fZbvAdis safe (search repo for usage). If there are stale references in other branches or usages, either remove references or restore the key with an appropriate comment. - (Optional) Add an E2E/integration smoke test or QA validation for the portal link to ensure the encoded subscription segment is accepted by the Foundry portal endpoint in staging.
Please update the label and consider the runtime-compatibility note for guid encoding. Once the label matches the PR body (or the body is updated to reflect the chosen label) and you confirm btoa compatibility or use a Node-safe approach, this PR looks ready to land.
Thank you for the clear PR description and tests — great work!
Last updated: Tue, 14 Apr 2026 17:34:17 GMT
takyyon
approved these changes
Apr 14, 2026
This was referenced Apr 15, 2026
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.
Commit Type
Risk Level
What & Why
Polishes the Foundry Agent Details panel and fixes several bugs:
guidToBase64Url()to convert the subscription ID to the format the Foundry portal expects.resize="vertical".box-shadowfor better depth on varied backgrounds. Increased row gap and padding for readability.labelRowwrapper that no longer served a purpose after badge removal. Hoisted duplicate test fixtures to module scope.Impact of Change
guidToBase64Urlexported fromdesigner-uifor reuse. Regression tests prevent re-introduction of broken URL format and removed badge.Test Plan
New tests added (10)
guidToBase64Url— valid GUID encoding, uppercase handling, non-GUID fallback, URL-safe outputbuildFoundryPortalUrl— real GUID subscription produces correct base64url segment, non-GUID passthroughFoundryAgentDetails— "Defined in Foundry" badge not rendered, Instructions label presentfilterFoundryManagedSettings— regression contract tests (designer + designer-v2) ensuringhideSystemInstructionsis setContributors
@ccastrotrejo @copilot