Repository navigation
fix(huddl): check a new huddl's start in its own time zone - #686
Merged
Merged
Conversation
The future-start check read the date and start time as UTC, so west of UTC a huddl later today was refused as past, and east of UTC a start time that had already passed was accepted. It now runs once the start is resolved in the huddl time zone, and it also covers copies given a start timestamp. - A day before today flags the date; a start time already passed today flags the start time - Copies no longer carry their own before-action check Related issue: #685
Help and error text render below each field, so bottom-aligning the row pushed a field with a message up out of line with its neighbours. Aligning to the top lets the message push only the content below it. Related issue: #685
The future-start check only refused a past start timestamp on copies, so a plain API create with a past starts_at went through. Every new huddl now has to start after now. Instances a series generates for itself are exempt, since editing an earlier huddl can move the series into the past. Related issue: #685
…13a' into micah/huddl-scheduling-issue-7a313a * origin/micah/huddl-scheduling-issue-7a313a: chore(deps): refresh Hex dependencies and build tooling (#682)
The dev seeds create past and in-progress huddlz through :create, which now refuses a start before now. Code that records a huddl rather than scheduling one sets the private allow_past_start? context, which the series generator also uses. Related issue: #685
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 #685
Summary
The future-start check read a new huddl's date and start time as UTC, not in its huddl time zone. In New York, 7:00 PM tonight counted as 3:00 PM, so it was refused at 3:42 PM. East of UTC, start times that had already passed were accepted.
Copies no longer have their own before-action check. A plain API create with a past
starts_atwas never checked and is now refused. Edits stay unrestricted. Code that records a huddl rather than scheduling one sets a privateallow_past_start?context to skip the check: the series generator, since editing an earlier huddl can move instances into the past, and the dev seeds' past and in-progress huddlz. API and form callers can't set it.The When row now aligns fields to the top, so an error or help line under one field no longer pushes it out of line with its neighbours.
Evidence
Before: copying a past huddl onto an hour from now in a US time zone is refused. A Tokyo huddl that started earlier today is created.
After: both scenarios pass (
copy_huddl.feature,location_based_time_zones.feature).Before: a JSON:API or GraphQL create with a
starts_atan hour ago is accepted.After: it is refused on
starts_at(schedule_huddl_api.feature).Before (past date):



After:
After (today, start time already passed):
Merge Danger
Door: two-way
Blast Radius: narrow
Creating and copying huddlz only. API clients that created huddlz with a past
starts_atare now refused. A date-based create whose start has already passed today now gets its error onstart_time, notdate.