fix: BASKETBALL_BASE_URL + coach Stripe interstitial #41
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api!41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/coach-ux-polish"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Changes
k8s/deployment.yaml: AddBASKETBALL_BASE_URL=https://basketball-api.tail5b443a.ts.netenv varsrc/basketball_api/routes/coach.py: Replace immediate Stripe redirect with branded interstitial page explaining what to expectTest Plan
Review Checklist
Related
plan-2026-03-08-tryout-prep— Phase 3b-iv: Coach onboarding verificationPR #41 Review
BLOCKERS
1. Four existing tests will break due to redirect-to-interstitial change.
The PR replaces
RedirectResponse(url=onboarding_url, status_code=303)with_render_stripe_interstitial(coach, onboarding_url)in three code paths (signup_submit, onboard_page, accept_agreement). However, the existing tests still assertstatus_code == 303and checkresp.headers["location"]. These tests will now receive a 200 with HTML body instead:tests/test_coach.pyTestOnboardPage.test_already_signed_no_stripe_creates_account(line 140-141) -- expects 303 redirecttests/test_coach.pyTestAcceptAgreement.test_signs_and_redirects_to_stripe(line 173-174) -- expects 303 redirecttests/test_coach_signup.pyTestSignupSubmit.test_creates_coach_and_redirects_to_stripe(line 92-93) -- expects 303 redirecttests/test_coach_signup.pyTestSignupDuplicateEmail.test_unsigned_coach_gets_updated(line 198-199) -- expects 303 redirectThese tests need to be updated to assert
status_code == 200and check for interstitial content (e.g.,"Payment Setup"or"Continue to Payment Setup"inresp.text) instead of checking redirect headers.NITS
The interstitial heading says "Agreement Signed!" but the
onboard_pageGET path (line 165) also renders this interstitial for coaches who signed previously but have no Stripe account -- they are retrying Stripe setup, not freshly signing. The heading could be slightly misleading on that path. Minor, non-blocking.No new tests were added for the interstitial rendering itself. A test verifying that
_render_stripe_interstitialreturns HTML containing the expected content (coach name, onboarding URL, "Continue to Payment Setup") would be good to have. Non-blocking for a hotfix.SOP COMPLIANCE
fix/coach-ux-polish, not named after an issue number. The PR references #21 but #21 is "roster + tryout numbers" which does not match this PR's scope. No dedicated issue exists for this fix.plan-2026-03-08-tryout-prep.VERDICT: NOT APPROVED
The code changes themselves are correct and well-scoped: the missing
BASKETBALL_BASE_URLenv var was causing Stripe Connect to buildhttp://localhost:8000callback URLs (from the default inconfig.pyline 21), and the interstitial is a good UX improvement with properescape()on user input. However, 4 existing tests will break because they assert 303 redirects on code paths that now return 200 HTML. These tests must be updated before merge to avoid a red CI pipeline.