29 Commits

Author SHA1 Message Date
Trey t
63acf7accb feat: add Django web app, CloudKit sync, dashboard, and game_datetime_utc export
Adds the full Django application layer on top of sportstime_parser:
- core: Sport, Team, Stadium, Game models with aliases and league structure
- scraper: orchestration engine, adapter, job management, Celery tasks
- cloudkit: CloudKit sync client, sync state tracking, sync jobs
- dashboard: staff dashboard for monitoring scrapers, sync, review queue
- notifications: email reports for scrape/sync results
- Docker setup for deployment (Dockerfile, docker-compose, entrypoint)

Game exports now use game_datetime_utc (ISO 8601 UTC) instead of
venue-local date+time strings, matching the canonical format used
by the iOS app.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:04:27 -06:00
Trey t
4353d5943c chore: remove .planning directory
Remove planning docs from previous drag-interaction feature work.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 18:57:55 -06:00
Trey t
52d445bca4 feat(scripts): add sportstime-parser data pipeline
Complete Python package for scraping, normalizing, and uploading
sports schedule data to CloudKit. Includes:

- Multi-source scrapers for NBA, MLB, NFL, NHL, MLS, WNBA, NWSL
- Canonical ID system for teams, stadiums, and games
- Fuzzy matching with manual alias support
- CloudKit uploader with batch operations and deduplication
- Comprehensive test suite with fixtures
- WNBA abbreviation aliases for improved team resolution
- Alias validation script to detect orphan references

All 5 phases of data remediation plan completed:
- Phase 1: Alias fixes (team/stadium alias additions)
- Phase 2: NHL stadium coordinate fixes
- Phase 3: Re-scrape validation
- Phase 4: iOS bundle update
- Phase 5: Code quality improvements (WNBA aliases)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 18:56:25 -06:00
Trey t
ac78042a7e docs(04): phase 4 drag interaction (broken) 2026-01-18 16:55:09 -06:00
Trey t
cf04ea435a docs(04-01): complete modern drag-drop delegates plan
Tasks completed: 3/3
- Task 1: Migrate to modern UITableViewDragDelegate/UITableViewDropDelegate
- Task 2: Implement lift animation with scale, shadow, and tilt
- Task 3: Add haptic feedback for grab and drop

All tasks completed in single commit due to code interdependency.

SUMMARY: .planning/phases/04-drag-interaction/04-01-SUMMARY.md
2026-01-18 16:45:47 -06:00
Trey t
23788a44d2 docs(04): create phase 4 drag interaction plans
Phase 04: Drag Interaction
- 2 plans in 2 waves
- Plan 01: Migrate to modern drag-drop delegates, lift animation, haptics
- Plan 02: Themed insertion line, invalid zone feedback, snap-back animation

Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 16:39:06 -06:00
Trey t
812c7e631d docs(04): research drag interaction phase
Phase 4: Drag Interaction
- UITableViewDragDelegate/DropDelegate migration patterns
- Custom lift animation (scale, shadow, tilt)
- Themed insertion line implementation
- Haptic feedback integration
- Invalid drop rejection with snap-back
- Auto-scroll behavior documentation
- Constraint integration with existing ItineraryConstraints

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 16:34:41 -06:00
Trey t
622a7b30df docs(04): capture phase context
Phase 04: Drag Interaction
- Implementation decisions documented
- Phase boundary established

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 16:26:28 -06:00
Trey t
e8ae80e02b docs(03): create phase 3 visual flattening plans
Phase 03: Visual Flattening
- 2 plans in 2 waves
- Plan 01: Create ItineraryFlattener utility, refactor reloadData()
- Plan 02: Add determinism tests for flattening behavior
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 15:49:49 -06:00
Trey t
632760e24c docs(03): research visual flattening phase
Phase 3: Visual Flattening
- Analyzed existing flatten implementation in ItineraryTableViewController
- Documented current bucket-based approach (beforeGames/afterGames)
- Recommended pure sortOrder-based sorting within each day
- Identified ItineraryFlattener extraction for testability
- Documented determinism test patterns

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 15:46:27 -06:00
Trey t
79de52d734 docs(03): capture phase context
Phase 03: visual-flattening
- Implementation decisions documented
- Phase boundary established
2026-01-18 15:43:10 -06:00
Trey t
ecf34e5ecc docs(02-01): complete constraint test migration plan
Tasks completed: 3/3
- Verified requirements coverage (CONS-01 through CONS-04)
- Migrated 13 tests to Swift Testing (expanded to 22)
- Deleted old XCTest file

SUMMARY: .planning/phases/02-constraint-validation/02-01-SUMMARY.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 15:22:26 -06:00
Trey t
0376ecec90 docs(02-02): complete edge cases and API documentation plan
Tasks completed: 3/3
- Add edge case tests (10 new tests)
- Create API documentation for Phase 4
- Run full test suite (22 constraint tests pass)

SUMMARY: .planning/phases/02-constraint-validation/02-02-SUMMARY.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 15:14:30 -06:00
Trey t
73ed3150ed docs(02-02): document ItineraryConstraints API for Phase 4
Document public API for drag-drop integration:
- isValidPosition() for position validation
- validDayRange() for precomputing valid days
- barrierGames() for visual highlighting
- Integration patterns for ItineraryTableViewController

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 14:54:28 -06:00
Trey t
51b6d46d84 docs(02): create phase 2 constraint validation plans
Phase 2: Constraint Validation
- 2 plans in 1 wave (parallel)
- Both plans autonomous (no checkpoints)

Plan 02-01: Migrate 13 XCTest tests to Swift Testing
Plan 02-02: Add edge case tests and document constraint API

Note: ItineraryConstraints is already fully implemented.
This phase verifies and standardizes tests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 14:48:10 -06:00
Trey t
aae302cf5b docs(02): research constraint validation phase
Phase 2: Constraint Validation
- Discovered ItineraryConstraints already implemented
- 17 XCTest tests cover all CONS-* requirements
- Integration with ItineraryTableViewController verified
- Main work: migrate tests to Swift Testing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 14:44:51 -06:00
Trey t
b4ba0355c4 docs(02): capture phase context
Phase 02: Constraint Validation
- Implementation decisions documented
- Phase boundary established

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 14:28:06 -06:00
Trey t
c272367e8a docs(01): complete Semantic Position Model phase
Phase 1 verified:
- 8/8 requirements satisfied (DATA-01 through DATA-05, PERS-01 through PERS-03)
- 34 tests passing (22 unit + 12 integration)
- SortOrderProvider with 6 methods for sortOrder calculation
- Trip extension with day derivation methods

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 14:17:37 -06:00
Trey t
db0c748e22 docs(01-02): complete semantic position tests plan
Tasks completed: 3/3
- Task 1: Create SortOrderProvider unit tests (22 tests)
- Task 2: Create persistence integration tests (12 tests)
- Task 3: Verify full test suite passes (no regressions)

SUMMARY: .planning/phases/01-semantic-position-model/01-02-SUMMARY.md
Phase 1 complete: 2/2 plans
2026-01-18 14:12:01 -06:00
Trey t
eb182c938b docs(01-01): complete SortOrderProvider and Trip day derivation plan
Tasks completed: 2/2
- Create SortOrderProvider utility
- Add day derivation methods to Trip

SUMMARY: .planning/phases/01-semantic-position-model/01-01-SUMMARY.md
2026-01-18 13:52:34 -06:00
Trey t
a7d0e7f049 fix(01): revise plans based on checker feedback
- 01-01: Reframe must_haves.truths to user-observable behaviors
- 01-01: Remove unimplemented key_link (wiring happens in later phases)
- 01-02: Add test case for DATA-04 (custom items at any position)
- 01-02: Add must_haves.truths entry for custom item flexibility
- 01-02: Document LocalItineraryItem is standalone (no sibling models needed)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 13:47:12 -06:00
Trey t
6bce0481bd docs(01): create phase 1 plans
Phase 01: Semantic Position Model
- 2 plans in 2 waves
- Wave 1: SortOrderProvider + Trip day derivation (parallel-ready)
- Wave 2: Tests verifying persistence behavior

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 13:43:35 -06:00
Trey t
eae3a1d7f7 docs(01): research semantic position model
Phase 1: Semantic Position Model
- Standard stack identified (SwiftData, Double sortOrder, CloudKit)
- Architecture patterns documented (semantic position, midpoint insertion)
- Pitfalls catalogued (row index confusion, precision exhaustion)
- Existing codebase analysis confirms good foundation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 13:40:31 -06:00
Trey t
6426c0cacd docs(01): capture phase context
Phase 01: Semantic Position Model
- Implementation decisions documented
- Phase boundary established
2026-01-18 13:35:11 -06:00
Trey t
36544b86d0 docs: create roadmap (4 phases)
Phases:
1. Semantic Position Model: DATA-*, PERS-* (foundation)
2. Constraint Validation: CONS-* (rules engine)
3. Visual Flattening: FLAT-* (display bridge)
4. Drag Interaction: DRAG-* (UI layer)

All 23 v1 requirements mapped to phases.
2026-01-18 13:24:27 -06:00
Trey t
13742540f9 docs: define v1 requirements
23 requirements across 5 categories (Data Model, Constraints, Flattening, Drag, Persistence)
5 requirements deferred to v2 (Accessibility, External Drops)
2026-01-18 13:21:45 -06:00
Trey t
6f09c0abcb docs: complete project research for itinerary editor
Files:
- STACK.md - UITableView drag-drop APIs, SwiftUI bridging patterns
- FEATURES.md - Table stakes UX (lift, insertion line, haptics), polish features
- ARCHITECTURE.md - 5-layer semantic positioning architecture
- PITFALLS.md - Critical pitfalls (row vs semantic, travel as structural)
- SUMMARY.md - Executive synthesis with roadmap implications

Key findings:
- Stack: UITableView + UIHostingConfiguration (existing pattern validated)
- Architecture: Semantic (day, sortOrder) model, not row indices
- Critical pitfall: Row indices are ephemeral; semantic positions are truth

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 13:16:07 -06:00
Trey t
fc6943a6f9 chore: add project config
Mode: yolo
Depth: quick
Parallelization: enabled
2026-01-18 13:08:48 -06:00
Trey t
98941a3b4d docs: initialize project
Interactive drag-and-drop itinerary editor with semantic positioning
2026-01-18 13:08:13 -06:00