Skip to content

Reschedule this and following sessions, and fold Edit series into the dialog - #527

Merged
jhodapp merged 17 commits into
feat/move-session-dialogfrom
feat/reschedule-following
Nov 4, 2026
Merged

jhodapp merged 17 commits into
feat/move-session-dialogfrom
feat/reschedule-following

Conversation

@jhodapp

@jhodapp jhodapp commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Description

Last of the stepped "New session" dialog PRs. Rescheduling a series session can now move "this and following" sessions in place, so they keep their ids, notes and topics. "Edit series" opens the same dialog instead of the old series dialog, which deleted and re-created future sessions. Built against RescheduleSessionAndFollowing v4, agreed on the collab board. Verified end to end against the backend's draft PR rs#463. Stacked on #526.

Changes

  • Applies to step (series sessions only): "{name}'s series repeats weekly on Tuesdays." and two cards. "This session only" is the default and stays a single update.
  • This and following:
    • Adds a Repeat step prefilled from the series' rule. There's no "Doesn't repeat", and Ends counts this session and the later ones.
    • Moving to another weekday swaps the rule's weekday.
    • The confirm reads "Reschedule this and following". Submit calls POST /coaching_session_series/{id}/reschedule, then refreshes cached sessions and series, since the series id can change on a split.
    • The toast ends "· and following". A 409 sessions_have_content keeps the dialog open with "Some later sessions have notes or actions · Keep enough sessions to cover them".
  • Edit series: opens Reschedule with "This and following" preselected. That's on the row's session, or on the series' next upcoming session if the row is past. Changing only the rule is allowed.
  • Phone layout fixes: found by the new layout suite:
    • The duration field, the "Use … instead" link, the Ends radios and the end date are now full 44px tap targets.
    • The end date no longer scrolls sideways.
    • Long names wrap instead of truncating.
    • At 375px the radios line up with "Ends" and the weekdays fit on one row.
  • Removed: RescheduleSeriesDialog and its test, recurrence-fields.tsx, CoachingSessionSeriesApi.update and the mutation's update, and the "edit" series action.

Screenshots / Videos Showing UI Changes (if applicable)

Useful: Applies to with each card selected, and the Repeat step after moving a weekly session to another weekday.

Testing Strategy

  • Specs written first:
    • step order, the series line, the rule prefill and the request body
    • the dialog flows: this only, this and following, Edit series, a rule-only change, the 409, a network error
  • All 2725 tests pass; tsc and lint are clean.
  • Real browser against a local backend:
    • On a weekly series created through the dialog, Edit series opened Reschedule with "This and following" selected and the right rule (weekly, Tuesday, 1 session left from the last one).
    • The reschedule call was intercepted: the URL had the series id, and the body had coaching_session_id, start_at, duration_minutes and the "Tue" rule.
    • The toast showed "· and following".
  • Live end to end against rs#463 (Playwright, local Postgres, email off), on a weekly Tuesday series of 4:
    • This session only sent one PUT, and only that session moved.
    • This and following from session 3 to Thursday split the series. The same session ids moved to Dec 3 and 10, the old rule ended Dec 1, and a topic moved with its session.
    • Shrinking the count from Edit series got a 409 sessions_have_content. The dialog stayed open with its toast, and nothing changed.
    • A rule-only change from the first session kept the series id and added a session.
  • Layout suite (__tests__/e2e/new-session-dialog-layout.spec.ts, isolated, chromium):
    • Viewports: 320, 375, 899, 900, 1440 and a short 1200×520 window.
    • States: 62 tests covering every state that changes the dialog's shape: Who loaded, empty, failing and loading; the When overlaps and a long day list; each Repeat variant; Resolve with movable and unmovable clashes; move mode; Applies to; this and following; Edit series; tooltips at the calendar's edges.
    • Checks: the dialog fits the screen, nothing scrolls sideways, controls are reachable and unclipped, targets are 44px or more below 900px, the footer stays visible, and text isn't cut.
    • Result: 62/62 pass.
  • Manual: docs/test-plans/new_session_dialog_manual_testing.md, now 74 cases covering the whole dialog.
  • Full manual run: every case was run in a real browser against rs#463. Twelve issues it found are fixed in e25c257, each covered by a frozen test or checked in the browser:
    • The Who card's time no longer wraps between "10:00" and "AM".
    • A first session reads "today" or "tomorrow".
    • "Use … instead" now also suggests a time for an evening overlap.
    • The calendar's arrow keys move into the next and previous months.
    • Repeat errors say "sessions" and don't name limits.
    • When the overlapping session can't be moved, the hint says to keep both or go back.
    • Long names wrap in the rail summary.
    • A picked inactive person isn't faded.
    • The weekday, Ends and Applies to controls have accessible names.
    • The 500 error message says "session", like the other errors.
    • A change that doesn't move the start toasts "Updated · …".
    • Reduced motion turns off the dialog animation.
  • A series session moved on its own (618a04c, 780458d): sessions now carry ical_recurrence_id, the series slot a session holds even after it's moved alone. Two things use it:
    • The "Usually …" line and the When prefill follow the series, not the one moved session.
    • "This and following" from a moved session replaces the series' weekday, so it no longer gets stuck on "Include Thu".
    • Covered by test plan Case B9, checked live.
  • Less work per render (650a8ee):
    • The dialog builds the Who list, known sessions, busy sessions and coach start times once per data change, not on every keystroke or step.
    • The Who list groups sessions by relationship in one pass.
    • A frozen test counts the rebuilds.

Concerns

  • Merge order: merge after rs#463 lands.
  • Overlap: only the moved session itself is checked for overlaps, not the later ones.

@jhodapp jhodapp self-assigned this Nov 3, 2026
@jhodapp jhodapp added enhancement Improves existing functionality or feature feature work Specifically implementing a new feature labels Nov 3, 2026
@jhodapp jhodapp added this to the 1.0.0-beta4 milestone Nov 3, 2026
@jhodapp jhodapp moved this to 🏗 In progress in Refactor Coaching Platform Nov 3, 2026
@jhodapp jhodapp changed the title feat(scheduling): reschedule this and following sessions, and fold Edit series into the dialog Reschedule this and following sessions, and fold Edit series into the dialog Nov 3, 2026
@jhodapp jhodapp moved this from 🏗 In progress to Review in Refactor Coaching Platform Nov 3, 2026
@jhodapp
jhodapp force-pushed the feat/reschedule-following branch from d66fd16 to 99c4a6a Compare November 3, 2026 21:33
@jhodapp
jhodapp force-pushed the feat/move-session-dialog branch from 7e235f6 to 1c3e844 Compare November 3, 2026 21:33
@jhodapp
jhodapp force-pushed the feat/reschedule-following branch from cf2aed3 to d0b7507 Compare November 3, 2026 21:42
@jhodapp
jhodapp marked this pull request as ready for review November 3, 2026 21:50
@jhodapp
jhodapp force-pushed the feat/reschedule-following branch from 8f1e6f5 to fb5d750 Compare November 3, 2026 22:41
@jhodapp
jhodapp force-pushed the feat/move-session-dialog branch from d81c5ac to a929d65 Compare November 3, 2026 22:41
@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect the coaching-session scheduling workflow.

Fix the early-edit path before merging so changing Ends cannot silently replace the series’ saved repeat settings.

Fix All in Claude CodeFindings

  1. P1 Early edits discard saved settings ▶

Summary

Adds “this and following” rescheduling and routes Edit series through the stepped dialog.

  • Coaches can move a series session and choose whether later sessions move too.
  • The scheduling dialog fits more comfortably on narrow screens.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Reschedule or Edit series] --> B[When]
  B --> C[Applies to]
  C --> D[This session only]
  C --> E[This and following]
  D --> F[Update one session]
  E --> G[Repeat]
  G --> H[Reschedule series]
  F --> I[Refresh sessions]
  H --> J[Refresh sessions and series]
Loading

Reviews (1) · Last reviewed commit: "fix(scheduling): keep a series' interval..." · Reviewed by Greptile

Comment thread src/lib/hooks/use-dialog-recurrence.ts Resolved
@jhodapp
jhodapp force-pushed the feat/reschedule-following branch from fb5d750 to 73a0b69 Compare November 3, 2026 23:28
@jhodapp
jhodapp force-pushed the feat/move-session-dialog branch from a929d65 to 87f7492 Compare November 3, 2026 23:28
…s and following

A series repeating every 3 weeks or 2 months is offered as its own Repeat choice
and its interval is sent. The confirm waits while the series loads, and a series
that fails to load falls back to this session only.
…akpoint

Swapping the desktop and mobile components remounted the body, so resizing or
rotating a tablet cleared a search or a half-typed value.
…verlap, or a loading series rule

- The confirm waits while your sessions load and says so if they can't.
- A time over several sessions can only keep them all; moving one wouldn't clear it.
- Repeat is locked until the series' rule arrives, so early edits can't drop it.
@jhodapp
jhodapp force-pushed the feat/move-session-dialog branch from 87f7492 to 1ea08c8 Compare November 4, 2026 04:53
@jhodapp
jhodapp force-pushed the feat/reschedule-following branch from 952842c to 00cdc9f Compare November 4, 2026 04:53
@jhodapp
jhodapp merged commit c043790 into feat/move-session-dialog Nov 4, 2026
@jhodapp
jhodapp deleted the feat/reschedule-following branch November 4, 2026 05:36
@github-project-automation github-project-automation Bot moved this from Review to ✅ Done in Refactor Coaching Platform Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improves existing functionality or feature feature work Specifically implementing a new feature

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant