Phase 02: Constraint Validation - Implementation decisions documented - Phase boundary established Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.1 KiB
2.1 KiB
Phase 2: Constraint Validation - Context
Gathered: 2026-01-18 Status: Ready for planning
## Phase BoundaryThe system prevents invalid positions and enforces item-specific rules. Games cannot be moved. Travel segments are constrained to valid day ranges and must respect game ordering within days. Custom items have no constraints within the trip's day range.
## Implementation DecisionsRejection Feedback
- Silent snap-back on invalid drop — no toast or error message
- Games have a subtle visual cue indicating they're not draggable (e.g., pinned icon)
- During drag, valid drop zones get a border highlight (color TBD by implementation)
- No insertion line appears outside valid zones — clear signal of invalidity
Constraint Timing
- Hybrid approach: quick check on drag start, full validation on drop
- Drag start computes valid day range only — position within day checked on drop
- Validation is synchronous (no async complexity)
- Insertion line only appears in valid zones
Travel Segment Rules
- Travel can be on same day as from-city game IF positioned after it (higher sortOrder)
- Travel can be on same day as to-city game IF positioned before it (lower sortOrder)
- If a day has both from-city and to-city games, travel must be between them
- Travel can be placed on days with no games — any sortOrder valid
- Travel segment is single-day only (represents departure day)
Edge Cases
- Items constrained to trip days (1 through N) — no Day 0 or Day N+1
- Empty days remain visible in UI (don't collapse)
Claude's Discretion
- Exact visual styling for "not draggable" indicator on games
- Border highlight color for valid drop zones
- sortOrder precision exhaustion handling (renormalize vs. block)
- Valid zone highlight should use border (not background tint) — keeps it subtle
- Games being undraggable should be discoverable but not distracting
None — discussion stayed within phase scope
Phase: 02-constraint-validation Context gathered: 2026-01-18