Skip to content

Fix: Copilot feature visibility to sub-level organizations#10221

Merged
pavinduLakshan merged 2 commits intowso2:nextfrom
RavindiFernando:copilot-next
Apr 30, 2026
Merged

Fix: Copilot feature visibility to sub-level organizations#10221
pavinduLakshan merged 2 commits intowso2:nextfrom
RavindiFernando:copilot-next

Conversation

@RavindiFernando
Copy link
Copy Markdown
Contributor

Purpose

$subject

Related Issues

  • N/A

Related PRs

  • N/A

Checklist

  • e2e cypress tests locally verified. (for internal contributers)
  • Manual test round performed and verified.
  • UX/UI review done on the final implementation.
  • Documentation provided. (Add links if there are any)
  • Relevant backend changes deployed and verified
  • Unit tests provided. (Add links if there are any)
  • Integration tests provided. (Add links if there are any)

Security checks

Developer Checklist (Mandatory)

  • Complete the Developer Checklist in the related product-is issue to track any behavioral change or migration impact.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

Warning

Rate limit exceeded

@RavindiFernando has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 54 minutes and 35 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: dcf0e5b0-4090-43f4-91d6-b337c06f8425

📥 Commits

Reviewing files that changed from the base of the PR and between 67716d1 and c64c9c7.

📒 Files selected for processing (1)
  • .changeset/busy-shoes-drum.md
📝 Walkthrough

Walkthrough

The changes restrict Copilot UI availability in two layout files based on organization hierarchy. The dashboard-layout gates Copilot features for sub-organizations using !isSubOrganization(), while default-layout gates them for first-level organizations using a Redux selector. Both changes affect the Header toggle and CopilotPanel rendering.

Changes

Cohort / File(s) Summary
Copilot UI Organization Restrictions
apps/console/src/layouts/dashboard-layout.tsx, apps/console/src/layouts/default-layout.tsx
Restricts Copilot UI availability based on organization context. Dashboard-layout excludes sub-organizations via !isSubOrganization() check. Default-layout uses isFirstLevelOrganization Redux selector. Both changes gate the Header's copilotToggle prop and CopilotPanel rendering to prevent Copilot access in restricted organization contexts.
🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description lacks critical content; the Purpose section contains only '$subject' placeholder text instead of a description, and no required information about the fix is provided. Replace '$subject' placeholder with an actual description of the fix (e.g., explaining why Copilot should be restricted from sub-organizations and what was changed).
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: restricting Copilot feature visibility to sub-level organizations across both layout files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Changeset Required ✅ Passed The pull request includes a changeset file (.changeset/busy-shoes-drum.md) which is properly tracked in the git repository.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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
Review rate limit: 0/1 reviews remaining, refill in 54 minutes and 35 seconds.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.05%. Comparing base (cc90eb9) to head (c64c9c7).
⚠️ Report is 8 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next   #10221   +/-   ##
=======================================
  Coverage   56.05%   56.05%           
=======================================
  Files          42       42           
  Lines        1024     1024           
  Branches      231      254   +23     
=======================================
  Hits          574      574           
+ Misses        450      416   -34     
- Partials        0       34   +34     
Flag Coverage Δ
@wso2is/core 56.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pavinduLakshan pavinduLakshan merged commit 3ef3655 into wso2:next Apr 30, 2026
11 of 12 checks passed
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.

3 participants