Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Refactors tenant handling to fix tenant switching by making API calls explicitly tenant-aware (per-request) and updating UI views/composables to react to tenant and navigation changes.
Changes:
- Make
ApiClient+BulwarkAuthAdminApiaccept an explicittenantIdper request instead of relying on global client state. - Update account/role/permission views to pass the current tenant ID and to refetch data on tenant changes / navigation.
- Improve tenant selection UX/state (error + retry, clear tenant state on logout) and update integration tests accordingly.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/views/RoleListView.vue | Pass tenant ID into role listing API and refetch on route/tenant changes. |
| src/views/RoleDetailView.vue | Make role detail tenant-aware; refetch on route/tenant changes; add load/reset logic. |
| src/views/RoleCreateView.vue | Pass tenant ID into role creation API. |
| src/views/PermissionListView.vue | Pass tenant ID into permission listing API and refetch on route/tenant changes. |
| src/views/PermissionDetailView.vue | Make permission detail tenant-aware; refetch on route/tenant changes; add load/reset logic. |
| src/views/PermissionCreateView.vue | Pass tenant ID into permission creation API. |
| src/views/AccountListView.vue | Pass tenant ID into account listing API and refetch on route/tenant changes. |
| src/views/AccountDetailView.vue | Make account detail and RBAC operations tenant-aware; refetch on route/tenant changes. |
| src/views/AccountCreateView.vue | Use explicit target tenant ID instead of temporarily mutating global API tenant context. |
| src/composables/useTenant.ts | Add tenant readiness/error state, retry, selection validation, and logout clearing hook. |
| src/composables/useAuth.ts | Add logout callback hook; stop setting tenant context on the API client at login/init. |
| src/components/AppToolbar.vue | Show tenant load errors + retry; guard tenant selection changes. |
| src/api/client.ts | Remove global tenant state; inject tenant into URLs per request when provided. |
| src/api/bulwark.admin.ts | Make account/role/permission endpoints accept an optional tenantId parameter. |
| src/api/tests/bulwark.spec.ts | Update integration tests to pass tenant ID explicitly to tenant-scoped endpoints. |
| bulwarkadmin.env | Allow localhost:3000 in CORS origins. |
| bulwark.test.env | Allow localhost:3000 in CORS origins. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
github-actions bot
pushed a commit
that referenced
this pull request
Feb 4, 2026
## [1.0.4](v1.0.3...v1.0.4) (2026-02-04) ### Bug Fixes * tenant switching ([#5](#5)) ([c06fff0](c06fff0))
|
🎉 This PR is included in version 1.0.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.