Repository navigation
fix(events): membership notice for entitlement_required on hackathon forms - #187
Merged
Merged
Conversation
…y plan cloud-api now gates hackathon register, submission PUT, reassign and vote behind a plan (Community, Inference or Premium) and answers an account without one with 403 entitlement_required. The register form showed 'not eligible', and the vote, submission and reassign forms a generic error. All four now show a membership notice (EN/ES) linking to cloud.nan.builders/signup?plan=community; signed-in accounts are sent on to /welcome?plan=community by the platform. not_eligible and the other codes keep their messages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
barckcode
force-pushed
the
fix/hackathon-entitlement
branch
from
October 15, 2026 16:29
51d8ce4 to
b2e9f1e
Compare
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.
What
Hackathons are now unlocked by a NaN plan (Community, Inference or Premium). cloud-api (
fix/open-signup-feedback) gates hackathon register, submission PUT, reassign and vote with a live check and answers an account without a plan with:The website mapped that badly:
RegisterFormshowed "not eligible" for any 403, andVoteButton,SubmissionFormandReassignFormshowed a generic error.All four now show a membership notice with a CTA:
The CTA goes to
https://cloud.nan.builders/signup?plan=community. These forms are only reachable with a session, and the platform's/signupalready redirects a signed-in account to/welcome?plan=community, which goes straight to checkout. So one link covers both cases.not_eligibleand every other code keep their current messages.How
src/lib/eventEntitlement.ts:isEntitlementRequired(), the CTA URL and the strings type.src/components/events/MembershipRequired.tsx: a shared notice, with a compact variant for the vote button.RegisterFormandVoteButtonmove their error mapping into pure exported functions (registerErrorKey,voteOutcome), so it can be tested.SubmissionFormandReassignFormcheckentitlement_requiredbefore thenot_eligibleand generic fallbacks.events.membershipstrings ini18n/en.jsonandi18n/es.json, passed in by the four event pages.Tests
Written first, in
src/tests/pages/eventsEntitlement.test.ts:error detection, and that other codes are not swallowed;
the CTA URL;
EN/ES copy;
SSR render of the notice;
the register and vote mapping tables, including the unchanged codes;
source-order guards for the submission and reassign handlers;
every page passes the strings.
npm run build: passesnpx astro check: 0 errorsnpx vitest run: 87 files, 2554 tests, all passingVisual check with agent-browser against a mock cloud-api returning the 403: register form error state in EN and ES, at 1440px and 390px. The notice and link render, with no horizontal scroll.
Deploy note
Merge and deploy this AFTER the cloud-api fix (
fix/open-signup-feedback), because this site deploys to prod on merge. It is harmless either way: until cloud-api returnsentitlement_required, the new branch is never hit and the forms behave exactly as today.🤖 Generated with Claude Code