Skip to content

fix: CCP-6121 - Handle tenant switches globally - #289

Merged
barrfalk merged 6 commits into
mainfrom
CCP-6121_global-tenant-switch
Oct 23, 2026
Merged

barrfalk merged 6 commits into
mainfrom
CCP-6121_global-tenant-switch

Conversation

@mgtennant

@mgtennant mgtennant commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Description

  • Add Redux middleware that drops async thunk results for a previously selected tenant
    • It was previously possible for a user to switch tenants while a request was still in flight causing the old tenant's data to display for the new tenant.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Documentation update

How Has This Been Tested?

  • New unit tests
  • New integrated tests
  • New component tests
  • New end-to-end tests
  • New user flow tests
  • No new tests are required
  • Manual tests (description below)
  • Updated existing tests

Checklist

  • I have read the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have already been accepted and merged

Further comments


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

@mgtennant mgtennant changed the title tenantGuard frontend redux middleware fix: CCP-6121 - Handle tenant switches globally Oct 21, 2026
mgtennant and others added 5 commits October 21, 2026 15:48
Fixes a race where delayed CSTAR role responses from a previously selected tenant could trigger incorrect navigation after switching tenants again. TenantSwitcher now reads current store state before redirecting and ignores stale role results.

Also tightens tenant guard behavior by treating only `cstar/fetchTenants` as tenant-agnostic (not all `cstar/*` actions), adds typed `useAppStore`/`AppStore` support for state reads in event flows, and adds regression tests in both TenantSwitcher and tenantGuard middleware for out-of-order role responses.
@sonarqubecloud

Copy link
Copy Markdown

@barrfalk
barrfalk merged commit 859bb1a into main Oct 23, 2026
62 of 69 checks passed
@barrfalk
barrfalk deleted the CCP-6121_global-tenant-switch branch October 23, 2026 01:52
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