fix(frontend): a timeline that only promises what a date can keep - #234
Merged
Conversation
With a phase declared current, SetCurrentPhase is the only thing that moves the hackathon on — resolvePhaseStatus stops reading the dates altogether. So the next phase's start date arriving does nothing, and the countdown built on it told participants "Hacking starts in 3 h" about a phase that starts when an organizer clicks. Not stale, false, and on the two surfaces a participant reads to plan their day. nextBoundary now takes declared and withholds the "starts" boundary outright; a dangling current_phase_id counts as declared, since the pointer says a human is driving whether or not it resolves. The participant timeline's next-phase row applies the same guard, which is what the new declared flag in its loader is for. The "ends" boundary keeps none: a declared phase's own end date is real, and formatCountdown already goes quiet once it passes. Removing a countdown leaves the disagreeing dates unexplained, so CurrentStateCard's declared/ended block gains a participant voicing — the organisers decide when the hackathon moves on, so the dates are a guide rather than a deadline. Wider than the organiser's phaseEnded line beside it, firing on a phase declared before its start as well as one held past its end, and silent when the declaration and the dates agree. The two organiser lines stay organiser-only, being prompts to act. PhaseService.Create discards start and end dates, so Add Phase does not offer them and Edit is the only place a phase can be scheduled at all — leaving an organizer to notice a list row reading "No dates set" and click into it. Create now redirects onto the new phase's Edit form with ?added, which that page reads to say why someone who clicked "Add phase" is looking at one titled "Edit Phase". Reverts to a plain redirect once the backend can store dates on create; noted in the ticket's follow-up.
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.
Running the timeline by hand
As an organizer, I decide when the hackathon moves from one phase to the
next — so the dates I set are a plan, not a switch.
As a participant, I want the timeline to tell me what's actually true.
What changes
of reading as a whole day.
is driving the timeline, participants are told the dates are a guide rather
than a deadline — whether the current phase is running early or late.
phase sitting on the timeline with no dates.