Skip to content

Fix showing AI Workspace readonly banner - #3810

Merged
renuka-fernando merged 8 commits into
wso2:mainfrom
Thushani-Jayasekera:fix-app
Oct 16, 2026
Merged

renuka-fernando merged 8 commits into
wso2:mainfrom
Thushani-Jayasekera:fix-app

Conversation

@Thushani-Jayasekera

Copy link
Copy Markdown
Contributor

$subject

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry.

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: wso2/api-platform/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e2ac65a0-a98b-4f3a-80f0-9d6caca1d084
📥 Commits

Reviewing files that changed from the base of the PR and between b995fed and d1c7e5a.

📒 Files selected for processing: 4
  • portals/ai-workspace/src/Components/common/ReadOnlyBanner.tsx
  • portals/ai-workspace/src/hooks/useResourceLimits.tsx
  • portals/ai-workspace/src/hostPort.tsx
  • portals/ai-workspace/src/pages/appShell/appShellMain.tsx

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: wso2/api-platform/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 704d5496-87e2-49a9-8d1f-20a97f37d383
📥 Commits

Reviewing files that changed from the base of the PR and between bdb142b and b995fed.

📒 Files selected for processing: 2
  • portals/ai-workspace/bff/internal/config/runtime_config.go
  • portals/ai-workspace/src/pages/appShell/appShellMain.tsx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The changes add billing_console_url to the browser-safe runtime configuration allowlist and place app gates above the route outlet in a vertical flex layout.

Changes: Browser-safe runtime configuration

Layer / File(s) Summary
Allow the billing console URL
portals/ai-workspace/bff/internal/config/runtime_config.go
The browser-safe key allowlist now includes billing_console_url.

App shell layout

Layer / File(s) Summary
Arrange gates and route content
portals/ai-workspace/src/pages/appShell/appShellMain.tsx
AppShell.Main places gates above the route outlet in a vertical flex layout. The outlet uses a flex child with minHeight: 0.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: induwara04

Merge Risk: ⚪ Minimal · up to b995f

The change makes the billing console URL available to the browser and shows app gates above page content, which is the intended fix for the read-only banner. No merge-blocking risk is identified.

Security architecture risk: ⚪ Minimal · up to b995f

The change exposes a configured billing-console link and fixes banner placement without adding permissions or privileged requests. The reviewed changes preserve the existing configuration allowlist and gate responsibilities; no material security risk was identified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The disclosure scope is the configured billing-console string for a deployment, available to unauthenticated callers that can reach its runtime-config.js endpoint. This public configuration delivery mechanism predates the PR; adding the console key expands its metadata contents.

Trust Boundaries and Controls

  • observed — The server-to-browser boundary retains an explicit allowlist and JSON serialization rather than directly interpolating configuration values as executable source. The response retains its no-store cache policy, and the PR adds no credential keys to the allowlist.
  • observed — The layout change preserves the existing host port passed to policy gates and does not make the outlet conditional on a gate result. The full-screen quickstart branch still renders outside the gate-containing shell, as it did at the PR base; this exclusion is not a newly introduced bypass.
Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description contains only "$subject" and does not provide the required purpose, goals, approach, testing, security, documentation, or environment details. Replace "$subject" with a complete description that follows the repository template. Include the purpose, goals, implementation approach, user stories, documentation impact, automation tests, security checks, samples, related PRs, and test …
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main user-facing fix: showing the AI Workspace read-only banner.
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.
Full details: Description check

Resolution

Replace "$subject" with a complete description that follows the repository template. Include the purpose, goals, implementation approach, user stories, documentation impact, automation tests, security checks, samples, related PRs, and test environment.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 16, 2026
@codecov-commenter

codecov-commenter commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.78%. Comparing base (7e3842f) to head (d1c7e5a).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...rtals/ai-workspace/src/hooks/useResourceLimits.tsx 50.00% 2 Missing ⚠️
...workspace/src/Components/common/ReadOnlyBanner.tsx 0.00% 1 Missing ⚠️
...s/ai-workspace/src/pages/appShell/appShellMain.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3810      +/-   ##
==========================================
- Coverage   59.09%   55.78%   -3.31%     
==========================================
  Files        1170     1164       -6     
  Lines      186806   182142    -4664     
  Branches     6078     6052      -26     
==========================================
- Hits       110387   101614    -8773     
- Misses      67805    72754    +4949     
+ Partials     8614     7774     -840     
Flag Coverage Δ
ai-workspace-bff-integration 9.73% <ø> (ø)
ai-workspace-bff-unit 82.42% <ø> (ø)
ai-workspace-ui-integration 25.35% <42.85%> (+0.02%) ⬆️
ai-workspace-ui-unit 84.38% <ø> (-0.04%) ⬇️
api-portal-server-integration 57.99% <ø> (ø)
api-portal-ui-integration 29.08% <ø> (-0.18%) ⬇️
api-portal-unit 61.27% <ø> (ø)
gateway-controller-integration 26.98% <ø> (-25.63%) ⬇️
gateway-controller-unit 54.84% <ø> (-0.12%) ⬇️
platform-api-integration 27.30% <ø> (-12.43%) ⬇️
platform-api-unit 39.90% <ø> (ø)
policy-engine-integration 23.95% <ø> (-18.08%) ⬇️
policy-engine-unit 63.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@renuka-fernando
renuka-fernando merged commit a77ac7d into wso2:main Oct 16, 2026
8 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