Skip to content

feat(designer-v2): Add hiddenBrowseCategories configuration option#9072

Open
SakoPak wants to merge 2 commits intoAzure:mainfrom
SakoPak:sakopak/acr/add-hidden-browse-categories
Open

feat(designer-v2): Add hiddenBrowseCategories configuration option#9072
SakoPak wants to merge 2 commits intoAzure:mainfrom
SakoPak:sakopak/acr/add-hidden-browse-categories

Conversation

@SakoPak
Copy link
Copy Markdown

@SakoPak SakoPak commented Apr 17, 2026

Commit Type

  • [x ] feature - New functionality
  • fix - Bug fix
  • refactor - Code restructuring without behavior change
  • perf - Performance improvement
  • docs - Documentation update
  • test - Test-related changes
  • chore - Maintenance/tooling

Risk Level

  • [x ] Low - Minor changes, limited scope
  • Medium - Moderate changes, some user impact
  • High - Major changes, significant user/system impact

What & Why

Problem: Different host environments (Azure Portal, VS Code, Power Automate, ACR Workflow Factory) need to customize which browse panel categories are visible to users. The current approach uses one-off boolean flags (e.g., disableMcpClientTools) which requires code changes for each new category to hide.

Solution: Adds a generic hiddenBrowseCategories configuration option that accepts an array of category keys. This allows any host to hide any combination of the 15 available categories (8 triggers + 7 actions) without library modifications.

Benefits:

  • Scalable - No new code required as customization needs evolve
  • Flexible - Hide any combination: ['aiAgent', 'humanInTheLoop'] or ['favorites', 'simpleOperations']
  • Consistent - Single pattern instead of proliferating boolean flags
  • Future-proof - New categories automatically supported

Example Use Case: ACR Workflow Factory can hide AI Agent and Human in the Loop categories to streamline their workflow authoring experience, while Power Automate could hide different categories based on their specific needs.

Impact of Change

  • Users: Browse panel now shows only categories relevant to their environment/workflow type, reducing clutter and improving discoverability of supported operations.
  • Developers: New optional hiddenBrowseCategories: string[] property in hostOptions. Follows existing pattern used by disableMcpClientTools. No breaking changes - defaults to empty array (all categories visible).
  • System: Minimal performance impact - filter applied at render time using standard array .includes() check on category keys.

Test Plan

  • [x ] Unit tests added/updated
    15 unit tests added in helper.spec.ts
  • E2E tests added/updated
  • [ x] Manual testing completed
  • Tested in:

Contributors

Screenshots/Videos

manual testing - hiding the 'AI Agent' and 'Human in the loop' category
Before: Browse panel showing all categories including "AI Agent" and "Human in the Loop"
image
After: Browse panel with those categories hidden
image

Copilot AI review requested due to automatic review settings April 17, 2026 06:56
@github-actions
Copy link
Copy Markdown

🔒 AI Validation Pending

This PR is from an external contributor. AI validation will be performed after manual review by a maintainer.

Maintainers: Add the external-approved label to this PR after reviewing the changes to enable AI validation.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a host-configurable hiddenBrowseCategories option to Designer V2 so different host environments can hide specific browse panel categories without introducing new one-off feature flags.

Changes:

  • Extend browse category helpers to accept a hiddenCategories list and mark matching categories as visible: false.
  • Wire the new hiddenBrowseCategories host option into the browse panel via a Redux selector.
  • Add unit tests covering hidden category behavior for both trigger and action categories.

Reviewed changes

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

Show a summary per file
File Description
libs/designer-v2/src/lib/ui/panel/recommendation/browse/helper.ts Adds optional hiddenCategories param to category builders and applies filtering via visible: false.
libs/designer-v2/src/lib/ui/panel/recommendation/browse/browseView.tsx Reads hiddenBrowseCategories from state and passes it into category builders.
libs/designer-v2/src/lib/ui/panel/recommendation/browse/test/helper.spec.ts Adds tests validating hidden category behavior (but currently duplicated).
libs/designer-v2/src/lib/core/state/designerOptions/designerOptionsSelectors.ts Adds useHiddenBrowseCategories selector for host-provided hidden keys.
libs/designer-v2/src/lib/core/state/designerOptions/designerOptionsInterfaces.ts Adds hiddenBrowseCategories?: string[] to hostOptions typing.

- Use EMPTY_ARRAY constant to prevent unnecessary re-renders
- Remove duplicate test block in helper.spec.ts
- Update browseView.spec.tsx assertions for 4th parameter
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.

2 participants