Repository navigation
[WIP]: refactor(Account): Read the current organisation and user through hooks - #9026
Draft
talissoncosta wants to merge 7 commits into
Draft
talissoncosta wants to merge 7 commits into
talissoncosta wants to merge 7 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
talissoncosta
marked this pull request as ready for review
November 19, 2026 19:42
Contributor
Docker builds report
|
There was a problem hiding this comment.
All reported issues were addressed across 66 files
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack
Turn on auto-fix | Re-trigger cubic
Contributor
✅ private-cloud · depot-ubuntu-latest-16 — run #23490 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
🗂️ Previous results✅ private-cloud · depot-ubuntu-latest-arm-16 — run #23490 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #23490 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #23490 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
|
Contributor
Visual Regression26 screenshots compared. See report for details. |
talissoncosta
marked this pull request as draft
November 20, 2026 18:41
…ation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cade Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Count account store changes so a change between render and subscribe still re-renders - Mark only the current user as (You) in the permissions list - Read the organisation id from a ref in the environment save handler - Skip the groups query and the invite link reset without an organisation - Keep the role's own organisation in its permissions tab - Read currentData so an organisation switch never shows the previous list - Save the last environment only with its organisation - Hide the custom fields input without an organisation - Drop an unused organisation read in the users page Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
talissoncosta
force-pushed
the
refactor/current-organisation-facade
branch
from
November 27, 2026 16:36
32f4e70 to
ed68cb0
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Components read the organisation and user through the facade hooks, so a new direct import is a read the Flux to RTK migration would have to move again. Only the store and the hooks that wrap it may import it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Contributes to #7947
Components read the current organisation, admin role and user through one set of hooks instead of calling
AccountStoredirectly. The hooks still read Flux, so nothing changes for users. Moving to RTK Query later becomes a small PR that only touches the hooks.useCurrentOrganisation/getCurrentOrganisation,useIsOrganisationAdmin,useCurrentUser/getCurrentUser, andwithCurrentOrganisationforApp.js.AccountStore.getOrganisation(),isAdmin(),getUser()andgetUserId()read now goes through them (218 directAccountStorereads down to 73).undefinedwhen there is no organisation or user, so each call site now handles that: queries skip, handlers return early.AccountStorechange, including one between render and subscribe.AccountStoreimports, so new code reads through the hooks. Only the store and the hooks that wrap it are exempt.Draft: will be split into smaller stacked PRs before review.
How did you test this code?
npm run bundleafter rebasing on main.