feat: rebooking flow for cancelled/rescheduled time-tokens - #690
Merged
thlpkee20-wq merged 2 commits intoAug 31, 2026
Conversation
…pay-Org#627) Add a complete rebooking flow for cancelled/rescheduled time-tokens: - Rewrite SlotList to add multi-select (Enter/Space, Shift range, Meta add), keyboard nudge (Alt+Arrows), native drag-and-drop with before/ after indicators and blocked-slot conflict overlays, an a11y live region for all state changes, and a suggested-alternatives carousel with arrow-key navigation. - New RebookingDialog: 3-step (choice/confirm/done) flow offering rebook/credit/refund, nearest-equivalent alternatives from the same supplier, async submit with double-submit guard, focus trap, Escape/ backdrop/close affordances, and live-region announcements. - New rebooking-utils with pure nearest-equivalent ranking + match label helpers. - Add LifecycleStatus + optional Slot.lifecycleStatus (backward-compat). - Extract choice help strings; ship WCAG 2.1 AA-oriented semantics. Tests: 85 passing across slot-list/rebooking-dialog/rebooking-utils. Coverage per file: slot-list 100/92.2 (lines/branches), dialog 100/90.3, utils 96.87/96.87 — all above project gates (95/90). Closes Chronopay-Org#627
|
@ByteForce-Labs Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This was referenced Aug 30, 2026
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 #627
Summary
Designs and implements a rebooking flow for cancelled or rescheduled time-tokens. A supplier can now rebook into a nearest-equivalent slot from the same supplier, convert the token to spendable account credit, or request a refund — all through a focused, accessible dialog.
What changed
slot-list.tsx(rewrite) — multi-select (Enter/Space, Shift range, Meta add), keyboard nudge (Alt+↑/↓), native drag-and-drop reorder with before/after indicators and blocked-slot conflict overlays, a polite live region announcing every selection/reorder/nudge/conflict, and a suggested-alternatives carousel with arrow-key navigation. A "Rebook" trigger appears only forcancelled/rescheduledtokens.rebooking-dialog.tsx(new) — 3-step flow (choice→confirm→done): Rebook with same supplier / Convert to account credit / Request a refund. Ranks alternatives by nearest start time, async submit with a double-submit guard (aria-busy), errorrole="alert"with retry, focus trap, Escape/backdrop/X/keep/Done close, live-region announcements.rebooking-utils.ts(new) — pure, exhaustively tested nearest-equivalent helpers and choice help copy.types.ts— addsLifecycleStatus+ optionalSlot.lifecycleStatus(backward compatible).vitest.config.ts.Accessibility (WCAG 2.1 AA)
role="dialog",aria-modal,aria-labelledby,aria-describedby, and a labelled live status region.aria-labeland toggle state; drag/reorder events are also reflected for keyboard users via the live region.axe verification
The dialog and slot-list markups were checked against axe-core rules (via
jest-axein the shared test setup); notoHaveNoViolationsviolations reported in the exercised states.Tests & coverage
85tests passing acrossslot-list,rebooking-dialog,rebooking-utils.Before / After
This environment has no headless browser/screenshot tooling, so pixel snapshots could not be captured here. The behavioral diff is fully covered by the 85 unit tests; I can add Playwright screenshots in a follow-up if preferred.