Skip to content

Move agent Delegated mode toggle to the Advanced tab - #4318

Merged
rajithacharith merged 1 commit into
thunder-id:mainfrom
Dilusha-Madushan:improvement/agent-delegated-mode-in-advanced-tab
Jul 27, 2026
Merged

Move agent Delegated mode toggle to the Advanced tab#4318
rajithacharith merged 1 commit into
thunder-id:mainfrom
Dilusha-Madushan:improvement/agent-delegated-mode-in-advanced-tab

Conversation

@Dilusha-Madushan

@Dilusha-Madushan Dilusha-Madushan commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Purpose

Moves the agent "Delegated mode" toggle from the Flows tab to the top of the Advanced tab in the agent edit view, and updates the related info messages so they point users to the new location.

Approach

The toggle only flips the authorization_code grant on/off (adding it plus deriving PKCE when enabled, and dropping the delegated-only grants when disabled). In EditAdvancedSettings this reuses the existing handleOAuth2ConfigChange helper to merge the grant changes into the agent's inboundAuthConfig, so no logic is duplicated; the previous inline mapping in EditFlowsSettings was removed.

EditFlowsSettings still computes isUnlocked to drive the frozen/read-only state of the flow sections and the lock notice, but no longer owns the toggle. The three info strings were moved to reference the Advanced tab, and the toggle's i18n key was moved under the Advanced tab group.

image

Summary by CodeRabbit

  • New Features

    • Added a Delegated mode toggle to the agent’s Advanced settings.
    • Enabling Delegated mode unlocks related OAuth settings and automatically configures required security options.
    • Delegated mode is unavailable when agent settings are read-only.
  • Documentation

    • Updated guidance across Advanced, Flows, and Tokens settings to direct users to enable Delegated mode from the Advanced tab.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 41d7a729-75de-4d39-b8f2-1bc04d12246d

📥 Commits

Reviewing files that changed from the base of the PR and between 189e635 and 410fc24.

📒 Files selected for processing (8)
  • frontend/apps/console/src/features/agents/components/edit-agent/advanced-settings/EditAdvancedSettings.tsx
  • frontend/apps/console/src/features/agents/components/edit-agent/advanced-settings/OperationModesSection.tsx
  • frontend/apps/console/src/features/agents/components/edit-agent/advanced-settings/__tests__/EditAdvancedSettings.test.tsx
  • frontend/apps/console/src/features/agents/components/edit-agent/advanced-settings/__tests__/OperationModesSection.test.tsx
  • frontend/apps/console/src/features/agents/components/edit-agent/flows/EditFlowsSettings.tsx
  • frontend/apps/console/src/features/agents/components/edit-agent/flows/__tests__/EditFlowsSettings.test.tsx
  • frontend/apps/console/src/features/agents/components/edit-agent/tokens/EditTokensSettings.tsx
  • frontend/packages/i18n/src/locales/en-US.ts
💤 Files with no reviewable changes (1)
  • frontend/apps/console/src/features/agents/components/edit-agent/flows/tests/EditFlowsSettings.test.tsx

📝 Walkthrough

Walkthrough

Delegated mode is now controlled in the agent’s Advanced settings. Enabling it updates OAuth2 grants and PKCE requirements, while Flows and Tokens lock notices and related tests now direct users to the Advanced tab.

Changes

Delegated mode settings flow

Layer / File(s) Summary
Advanced delegated mode toggle
frontend/apps/console/src/features/agents/components/edit-agent/advanced-settings/EditAdvancedSettings.tsx, frontend/apps/console/src/features/agents/components/edit-agent/advanced-settings/__tests__/EditAdvancedSettings.test.tsx
Adds the delegated mode switch, derives OAuth2 grant updates, enables PKCE when appropriate, respects read-only state, and tests these behaviors.
Flow and token lock behavior
frontend/apps/console/src/features/agents/components/edit-agent/flows/EditFlowsSettings.tsx, frontend/apps/console/src/features/agents/components/edit-agent/flows/__tests__/EditFlowsSettings.test.tsx, frontend/apps/console/src/features/agents/components/edit-agent/tokens/EditTokensSettings.tsx
Removes the Flows toggle, updates lock messaging, and removes obsolete toggle tests.
Advanced-tab messaging
frontend/apps/console/src/features/agents/components/edit-agent/advanced-settings/OperationModesSection.tsx, frontend/apps/console/src/features/agents/components/edit-agent/advanced-settings/__tests__/OperationModesSection.test.tsx, frontend/packages/i18n/src/locales/en-US.ts
Updates grant hints, lock notices, and localized text to reference Delegated mode in the Advanced tab.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant AdvancedSettings
  participant OAuth2Config
  participant FlowSettings
  User->>AdvancedSettings: Toggle Delegated mode
  AdvancedSettings->>OAuth2Config: Update grant types and PKCE
  OAuth2Config-->>FlowSettings: Grant configuration changes
  FlowSettings-->>User: Unlock or lock flow settings
Loading

Possibly related PRs

Suggested reviewers: donomalvindula, thiva-k

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: moving the Delegated mode toggle to the Advanced tab.
Description check ✅ Passed The description covers Purpose and Approach well; only template sections like Related Issues, Related PRs, and Checklist are missing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rajithacharith rajithacharith added the trigger-pr-builder Add when the PR is ready for CI; starts the PR Builder for this and all later pushes label Jul 24, 2026
@rajithacharith

Copy link
Copy Markdown
Contributor

@coderabbitai help

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

CodeRabbit commands

These commands are invoked using PR/Issue comments.

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai rate limit to show your current review rate limit status.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai evaluate custom pre-merge check --instructions <custom-checks-instructions> --name <custom-checks-title> [--mode <error|warning>] to validate the custom pre-merge checks instructions. Defaults to error when --mode is omitted.
  • @coderabbitai ignore pre-merge checks to override pre-merge checks and get an approval on PR.
  • @coderabbitai run pre-merge checks to run pre-merge checks on the pull request.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai emit path instructions to emit generated path-specific review instructions for this repository.
  • @coderabbitai resolve merge conflict to automatically resolve merge conflicts.
  • @coderabbitai autofix to automatically fix issues identified in unresolved review comments.
  • @coderabbitai fix-ci to automatically fix failing CI checks by creating a stacked PR with fixes.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai generate configuration to create a PR that adds the current resolved configuration as .coderabbit.yaml (or show it if already present).
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, support, documentation and community

  • Visit our status page to check the current availability of CodeRabbit.
  • Create a ticket on our support page for assistance with any issues or questions.
  • Visit our documentation site for detailed information on how to use CodeRabbit.
  • Join our Discord community to connect with other users and get help from the community.
  • Follow us on X/Twitter for updates and announcements.

@rajithacharith

Copy link
Copy Markdown
Contributor

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...t-agent/advanced-settings/EditAdvancedSettings.tsx 94.11% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@rajithacharith
rajithacharith added this pull request to the merge queue Jul 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 24, 2026
@rajithacharith
rajithacharith added this pull request to the merge queue Jul 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 24, 2026
@Dilusha-Madushan
Dilusha-Madushan force-pushed the improvement/agent-delegated-mode-in-advanced-tab branch from 410fc24 to ef7c0a8 Compare July 27, 2026 03:05
@rajithacharith
rajithacharith added this pull request to the merge queue Jul 27, 2026
Merged via the queue into thunder-id:main with commit 0c285b1 Jul 27, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

trigger-pr-builder Add when the PR is ready for CI; starts the PR Builder for this and all later pushes Type/Improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants