Feat: build RecentlyViewed matches UI - #48
Open
hasan-malik wants to merge 13 commits into
Open
Conversation
- Ball-by-ball SQLite store (matches, innings, deliveries) - Parser for CricSheets JSON match files with idempotent upsert - Downloader for CricSheets ZIP archives (t20s, odis, ipl, recent7, etc.) - Analytics engine: batting/bowling scorecard, over-by-over chart, wagon wheel shots, partnerships, fall of wickets - /matches/search fuzzy endpoint to map CricAPI teams+date → CricSheets ID - Docker + docker-compose for deployment - CLI ingest.py script; verified with 1169 IPL matches, 278k deliveries Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Data files (1169 CricSheets JSONs + SQLite DB) are generated at runtime via `python ingest.py` and must not be committed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CricSheetsModels.swift — Codable structs for all backend endpoints: CSMatch, CSInnings, CSScorecardResponse, CSBatter, CSBowler, CSOverPoint, CSWagonShot, CSPartnership, CSFoW CricSheetsAPIService.swift — async actor with .convertFromSnakeCase decoder: searchMatch, fetchScorecard, fetchOvers, fetchWagonWheel, fetchPartnerships, fetchFoW Uses 127.0.0.1 (not localhost) to force IPv4 on simulator Both files in Shared/ — compiled for iOS and watchOS targets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- MatchDetailViewModel: csMatchId, csOverData, csWagonShots, csPartnerships, csFoW; loadCricSheetsData + reloadCricSheetsInnings effectiveOverData/effectiveWagonShots prefer real data over synthetic - RunRateChartView: Swift Charts bar chart, real per-over runs, wicket markers (red dashed line + × badge), colour-coded by run tally - PartnershipsView: proportional bars per partnership with animation - FallOfWicketsView: tabular wicket timeline (player, score, over, how) - MatchDetailView: all analytics wired in, onChange innings reload, non-blocking CricSheets loading indicator - CricColors: add #elseif os(watchOS) so UIColor path compiles on watch Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…iews - WatchApp.swift: @main entry point with Xcode target setup instructions - WatchContentView.swift: Live/Recent match list with carousel style and WatchMatchRow - WatchMatchDetailView.swift: Compact scorecard (top 5 batsmen, top 3 bowlers), innings picker - CricColors: fixed watchOS compatibility (#if os(watchOS) alongside iOS for UIColor paths) - No CricSheets calls from watch — backend unreachable from physical device Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…icates - Add Shared/ as PBXFileSystemSynchronizedRootGroup so CricSheetsModels, CricSheetsAPIService, and updated MatchDetailViewModel compile for iOS - Wrap Watch/ files in #if os(watchOS) to prevent @main conflict with iOS - Delete stale duplicate files from CricPulse/ that are now canonical in Shared/ (CricketModels, CricketAPIService, MatchDetailViewModel, MatchListViewModel) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…card - Backend: add year filter + GET /matches/years + innings scores in list response - iOS: ArchiveBrowseView with year list → match list → full CricSheets detail - CSMatchDetailView: scorecard, batting, bowling, wagon wheel, run rate, partnerships, FoW - Fix MatchCard IPL flag/score: index-based team matching fallback - ContentView: add Archive tab Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…re macOS/visionOS - Move CricColors + TeamHelpers to Shared/ (available to all platforms) - CricPulseWatch/ is now a standalone watchOS target folder (clean, no #if guards) - Remove old CricPulse/Watch/ (was mixed into iOS target — wrong) - Fix CricColors platform guards: UIColor only on iOS, NSColor on macOS, dark on watchOS - pbxproj: add watchOS NativeTarget, embed watch app in iOS target, proper dependencies - WatchRootView replaces WatchContentView for clarity - Index-based team matching fix carried into WatchRootView Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Gray5 unavailable on watchOS
Closes #31 - Update splash screen copy to 'Historic Cricket · Ball by Ball' - Verify on light and dark appearance - Test on simulator and device
Closes #32 - Design two proper bat icon variants - Add to Xcode asset catalog - Replace emoji workaround in IconManager.swift
Closes #33 - Add Favourite toggle on team views - Show favourited teams in pinned section - Persist via SwiftData
Closes #34 - Record view events on match detail open - Display Recently Viewed section - Limit to last 10 entries, persist via SwiftData
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 #34
Description
Implemented Recently Viewed matches tracking to show users their match history.
Changes
Testing