Repository navigation
fix(mobile): show the no-organization state for deep links without memberships - #8563
Conversation
…mberships An account with no memberships that opened a shared organization link carrying an explicit org id landed in access-denied with only a Back to profile action. The settled-branch order gave an absent deep-link override precedence over the empty membership list, so the no-organization state, which offers the web organizations page where create and join live, was skipped. The boundary now decides the no-organization state first, from the membership list alone. Access denied keeps its own case: an override absent from a non-empty member list, where the account does have organizations but not that one. Regression tests cover the deep-link zero-membership case and pin the access-denied case to a non-empty member list. Verified on the Android emulator with a test account that has no memberships: the deep link renders the no-organization state and its action opens the web organizations page.
|
bot: End-to-end evidence from the Android emulator against the local dev stack, with a test account that has no organization memberships. The deep-linked organization route was opened twice: once with the boundary module from Observed:
Access denied for an organization the account is not a member of, while having other memberships, is covered by the mounted test in the changed file. |
The previous Kilo Code Review check ended with an environment preparation timeout before any review ran, so no verdict was recorded for this head. This empty commit re-requests the review without changing the tree.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe boundary now decides the no-organization state from the membership list alone, and the changed branch is consistent with Assumptions: Files Reviewed (2 files)
Reviewed by deepseek-flash-latest · Input: 65.6K · Output: 6.3K · Cached: 735.1K Review guidance: REVIEW.md from base branch |



Change
OrganizationBoundarydecided its settled states in an order that let an explicit deep-link org id outrank an empty membership list. An account with no memberships that opened a shared organization link therefore fell into Access denied with only Back to profile — no way to reach create/join, and no mention that the account simply has no organization.apps/mobile/src/components/organization/organization-boundary.tsxnow branches on the membership list first: zero memberships always renders the no-organization state, whose action opens the web organizations page with Back to profile as the exit. Access denied keeps exactly the case it describes — an override absent from a non-empty member list, where the account does have organizations but not that one. The stale-selection fallback is unchanged.organization.boundary.noOrganization,noOrganizationDescription,openWebOrganizations,backToProfile.organizations.listreturns memberships and inherited children; invitations appear only insideorganizations.members.listfor a member of that org), and the work item rules out a new backend API. The state points at the web organizations page, which owns join/accept.Tests
apps/mobile/src/components/organization/organization-boundary.mounted.test.tsxFailing-before/passing-after was checked by planting
origin/main's boundary module over the changed one and running the suite: the new deep-link case failed withexpected [ 'Access denied', … ] to include 'No organization'; with the fix all 10 cases in the file pass, and the hub-screen mounted suite passes too (17 tests across both files).tsc --noEmitandoxlinton the app are clean.End-to-end evidence (Android emulator, local dev stack)
Test account with zero memberships, signed in on the emulator; the deep link
/organizations/<org-id>/overviewmaps to the hub route.main, full bundle reloaded): the route rendered Access denied / You do not have access to this organization. / Back to profile.http://localhost:3000/organizations.Screenshots are attached in a comment on this pull request.
Proxy answers
The owner's proxy gave these answers in the owner's place.
Answer: Reuse existing copy
Confidence: 0.75 · Precedent: Speed and least work: "do the least amount of work possible, with no drop in quality"; the brief asks for the same no-organization EmptyState
Answer: Out of scope
Confidence: 0.80 · Precedent: Trust the code over documents: "only trust code"; the brief makes invitations conditional on an existing mobile query and forbids a new backend API
Answer: Keep access-denied
Confidence: 0.90 · Precedent: Follows the work item directly: keep access-denied only for a deep-link override absent from a non-empty membership list
Answer: Deep link + web action
Confidence: 0.90 · Precedent: Proof and verification: "when doing e2e verify taps doing the expected thing"; the brief requires confirming that the website action opens the page
Answer: Push an empty commit
Confidence: 0.82 · Precedent: Never accept blocked as an end state: a work item must converge; blocked is not an acceptable end state