wso2 / wso2/api-platform

Scope AI Workspace project reloads to the selected organization

Open
#3,454 0 comments 0 reactions 1 assignee View on GitHub

@Thushani-Jayasekera is already working on this.

Since Sep 16, 2026.

Dominant language
Go
Stars
71
Forks
111
Avg merge
1d 14h
Merged PRs (30d)
110

Description

Summary

Update the AI Workspace organization switch flow so that a project reload uses the organization selected by the user.

Rationale

switchOrganization currently updates currentOrganization in the SPA and then reloads projects through GET /projects. The request continues to use the organization claim in the current session or token. A selected organization can therefore differ from the organization that scopes the project response.

Affected areas

  • portals/ai-workspace/src/contexts/AppShellContext.tsx
  • The AI Workspace organization token-exchange or server-side organization-context flow
  • Project retrieval through GET /projects

Required changes

Before reloading projects after an organization selection, update the server-side organization context or exchange the token so its organization claim matches the selected organization. Ensure that project requests use that updated context. Keep the existing protection that ignores results from superseded organization selections.

Acceptance criteria

  • Selecting organization B after organization A updates the request context to organization B before GET /projects.
  • The project response after the switch is scoped to organization B.
  • A slower request from an earlier organization selection cannot overwrite the current project state.
  • The switch flow has automated test coverage.

Backlinks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.