8000 fix(huddl): check a new huddl's start in its own time zone by mwoods79 · Pull Request #686 · huddlz-hq/huddlz · GitHub
[go: up one dir, main page]

Skip to content

fix(huddl): check a new huddl's start in its own time zone - #686

Merged
mwoods79 merged 7 commits into
mainfrom
micah/huddl-scheduling-issue-7a313a
Oct 13, 2026
Merged

mwoods79 merged 7 commits into
mainfrom
micah/huddl-scheduling-issue-7a313a

Conversation

@mwoods79
@mwoods79 mwoods79 commented Oct 13, 2026 •
Copy link
Copy Markdown
Contributor

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.

 create :create
   CopyFromHuddl
-  validate FutureDateValidation        # date + start time read as UTC
   DefaultTimeZoneFromGroup
   ApplySavedLocation
   CalculateDateTimeFromInputs          # resolves starts_at in the huddl time zone
+  validate FutureStart                 # starts_at after now
FutureStart
  starts_at after now           -> ok
  date before today (huddl tz)  -> Date: "must be in the future"
  date is today                 -> Start time: "must be in the future"
  given starts_at instead       -> starts_at: "must be in the future"
  allow_past_start? context     -> skipped (series instances, dev seeds)

Copies no longer have their own before-action check. A plain API create with a past starts_at was never checked and is now refused. Edits stay unrestricted. Code that records a huddl rather than scheduling one sets a private allow_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_at an hour ago is accepted.
    After: it is refused on starts_at (schedule_huddl_api.feature).

  • Before (past date):
    Before: the Date field sits higher than Start time and Duration
    After:
    After: Date, Start time and Duration stay level
    After (today, start time already passed):
    After: the error is on Start time

Merge Danger

Door: two-way

Blast Radius: narrow

Creating and copying huddlz only. API clients that created huddlz with a past starts_at are now refused. A date-based create whose start has already passed today now gets its error on start_time, not date.

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
@mwoods79
mwoods79 merged commit 82c069f into main Oct 13, 2026
5 checks passed
@mwoods79
mwoods79 deleted the micah/huddl-scheduling-issue-7a313a branch October 13, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Huddlz later today are refused as past when the time zone is west of UTC

1 participant

@mwoods79 345F
0