Events: deep link puzzle_add?competition=<uuid> and an "Add my time from this event" CTA on event and edition pages - #208
Merged
Conversation
…rom this event" CTA on event and edition pages The add-time form pre-selects a publicly visible competition passed as ?competition= (anything else is ignored silently; POST overwrites the data). Event and edition detail pages show the CTA to signed-in players once the event has started (undated = perpetual = always), so the link always lands on a pre-selected picker. No per-edition CTA on the series page. Closes #204 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QUegPi2i9SjwkcrNWyENnL
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.
Part 4 of 4 for #204 (after #205, #206, #207) — closes the loop from the events pages.
What
GET /en/puzzle-add?competition=<uuid>pre-selects that competition in the "Competition / event" picker (the section auto-expands). Honoured only when the competition is publicly visible (IsCompetitionPubliclyVisible, the same rule the picker uses, so the link always lands on a real pre-selection) and the form is in speed-puzzling mode; anything else is ignored silently. A POST overwrites the data, so the prefill never leaks into a cleared submission.CompetitionEvent::startsAfter()—COALESCE(dateFrom, dateTo)by calendar day; undated = perpetual = always). No per-edition CTA on the series page — the edition page is one click away and carries its own.events.add_my_time(English,enfallback for other locales); README section extended.Tests
+14:
PuzzleAddControllerTest(prefill for a live standalone and for an edition → value set + section expanded; ignored for unapproved standalone, edition of an unapproved series,not-a-uuid, random uuid; ignored in relax mode),EventDetailControllerTest(CTA for logged-in on a live event, absent anonymous, absent on upcoming), newEditionDetailControllerTest(past edition shows CTA logged-in, not anonymous; upcoming edition none). Full gates green (cs, phpstan max, 2251 tests, schema:validate, prod warmup).Closes #204
🤖 Generated with Claude Code
https://claude.ai/code/session_01QUegPi2i9SjwkcrNWyENnL