Skip to content

feat(shows): block overlapping show times + drag day-view picker#184

Merged
anneoneone merged 1 commit into
mainfrom
feat/block-overlapping-show-times
Jun 1, 2026
Merged

feat(shows): block overlapping show times + drag day-view picker#184
anneoneone merged 1 commit into
mainfrom
feat/block-overlapping-show-times

Conversation

@anneoneone
Copy link
Copy Markdown
Collaborator

Closes #163.

What

Blocks scheduling a show when its time window overlaps an existing show, and adds an Apple-Calendar-style day-view time picker.

Conflict blocking (both layers)

  • BackendAppError::Conflict (HTTP 409), pure time_windows_overlap helper, and ensure_no_show_conflict (queries same-date shows, excludes self on edit). Wired into api_create_show and api_update_show. Half-open [start, end) overlap; missing end = zero-length point; identical starts always clash. 4 unit tests.
  • FrontendshowConflict.ts (rangesOverlap / findConflictingShow) mirrors backend semantics. The wizard date step loads all scheduled shows, exposes conflictingShow, and gates canProceed. 9 Vitest cases.

Day-view picker (DayTimeline.vue)

  • Hour grid beside the month calendar. Click an empty slot → default 1-hour show; drag top/bottom handles to resize, body to move (15-min snap).
  • Existing shows render as read-only blocks; the placed block turns red on conflict.
  • Height tracks the calendar via a ResizeObserver so both columns match.

UX

  • After creation, navigate to the new show's detail page (/shows/:id) for hosts and admins, instead of the overview / stream.

Verification

  • Backend: cargo fmt + clippy clean, 4/4 overlap tests pass.
  • Frontend: 31/31 Vitest, ESLint clean, no new tsc errors (pre-existing .vue-resolution errors only).
  • Drag interaction needs a manual browser check (no real layout in jsdom).

Prevent double-booking a slot, enforced on both layers:
- backend: AppError::Conflict (409) + time_windows_overlap helper and
  ensure_no_show_conflict; checked in api_create_show and api_update_show.
- frontend: findConflictingShow mirrors the backend; the wizard date step
  loads all shows, exposes conflictingShow, and gates canProceed.

Add an Apple-Calendar-style DayTimeline next to the month calendar: click a
slot to drop a default 1-hour show, drag the top/bottom handles to resize.
Existing shows render as read-only blocks; the placed block turns red on
conflict. Timeline height tracks the calendar via a ResizeObserver.

After creation, land on the new show's detail page for hosts and admins.

Closes #163
@anneoneone anneoneone merged commit 3817b0c into main Jun 1, 2026
@anneoneone anneoneone deleted the feat/block-overlapping-show-times branch June 1, 2026 16:04
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.

block show time when there is already a show at the same time

1 participant