Repository navigation
Conversation
…n links configurable - a rescan by someone who left now says they're no longer a member instead of "You're in" - redeem refusal for a prior redeemer who left is its own MembershipEnded error (FORBIDDEN, data.action rejoin-organization) - onboard auth variable: links.next/home/explore and community.url for a Visit button and channel links
This branch has not been 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.
Closes #583. For NEARBuilders/citynode.app#399 and NEARBuilders/citynode.app#394.
What it does
Rescan by someone who left (citynode.app#399)
redeemOnboardingCodewithalreadyRedeemed: true: the onboard page now checks a freshlistOrganizationsagainst the exactorganizationIdfrom the redeem response (redeemOnboardingCode: include the organizationId in the output #550). Still a member → the joined screen as today. Not a member → "You’re no longer a member of this community. Ask an organizer for a new code or an invitation." No toast, no joined state.FORBIDDEN, same as revoked/expired/unapproved, so the page showed the raw message under "Could not join". It's now its ownMembershipEndederror withdata.action: "rejoin-organization", and the page shows the copy above. Message unchanged.verifyOrganizationMembershipinui/src/lib/onboard-membership.ts.Configurable links (#583) and community channels (citynode.app#394)
New optional
onboardauth variable:{organizationId}is filled with the joined org's ID innext,homeandcommunity.url(notexplore, since the error panels have no org). Hrefs must be app paths orhttps://. Bad config fails the auth variables check at boot, and the page falls back to the defaults.links.nextis configured, the joined title becomes "You're in" instead of "Ready to start building?".community.urlis set, the joined screen fetches it for the joined org and shows "Visit {community}" plus the channels (new tab,rel="noopener noreferrer"). A failed or invalid response shows nothing extra and never blocks the joined screen. It's never fetched for someone who left.Why a variable and not a UI slot: there's no extension-slot mechanism for plugin UIs today, and #583 only needs per-app destinations. A variable plus one JSON endpoint covers #583 and #394 without a new federation surface. If you'd rather have a slot, the page's link and community bits are small to move.
Tested
-onboard.test.tsx): still-member rescan, left-member rescan (matched by ID, with a same-name org in the list), the server's membership-ended refusal, valid active org left alone, lookup failure + retry, clear failure, default links, configured links,next: false, configured explore on error panels, unsafe href ignored, community with channels, without channels, failed lookup, no lookup after leaving, happy path makes no membership request.FORBIDDEN+data.action.onboard-rescan.spec.ts(dev:ssr): join → rescan as member → member removed with stale active org → rescan shows "no longer a member" and the active org is cleared.pnpm run typecheck,pnpm run lint,pnpm --filter @everything-dev/auth-plugin test(452), ui/api/e2e/framework tests. Locally, the framework types-gen tests needTMPDIRon the same disk as the checkout (EXDEV rename otherwise), and the process-kill test flaked once under load; both pass on their own and aren't touched here.One call for you: when the redeem refuses a member who left, the page doesn't know the org ID (FORBIDDEN data only carries
action), so it clears the session's active org only if that org isn't in the caller's fresh org list. If platform admins can have a non-member active org, that would clear it on this one screen. Happy to narrow it if that matters.Screenshots (375px, from the regression spec)
Not tested
onboardconfig in itsbos.app.ts, its community endpoint, and the platform pin bump come after a release.