1. 02 Feb, 2026 15 commits
    • Stefy Lanza (nextime / spora )'s avatar
      Fix: Add comprehensive debug logging to /api/reports/last-sync endpoint · c5541e46
      Stefy Lanza (nextime / spora ) authored
      - Add detailed logging for client_id, user, and API token information
      - Log counts of bets, extraction_stats, and match_reports for each client
      - Log requires_full_sync flag value for each client
      - Log response being sent to client
      - Add requires_full_sync: False to responses when sync records exist
      - This will help diagnose why client keeps sending incremental sync requests instead of full sync
      c5541e46
    • Stefy Lanza (nextime / spora )'s avatar
      Fix: Add missing model imports in /api/reports/last-sync endpoint · e7abf6b6
      Stefy Lanza (nextime / spora ) authored
      - Add Bet, ExtractionStats, and MatchReport model imports to api_get_last_sync function
      - Fixes 'name Bet is not defined' error when querying last sync status
      e7abf6b6
    • Stefy Lanza (nextime / spora )'s avatar
      Fix: Make client_id parameter optional in /api/reports/last-sync endpoint · 4ee6e307
      Stefy Lanza (nextime / spora ) authored
      - Make client_id query parameter optional in /api/reports/last-sync
      - When client_id is not provided, return sync information for all clients associated with the authenticated user's API token
      - Add requires_full_sync flag to each client's response when no records exist across ALL report tables
      - Update REPORTS_SYNC_PROTOCOL_DOCUMENTATION.md with checking last sync status section
      - Add GET LAST SYNC INFORMATION section to REPORTS_SYNC_API_SPECIFICATION.txt
      
      This fix allows clients to query their sync status without needing to know their client_id, making the API more user-friendly and enabling automatic recovery detection.
      4ee6e307
    • Stefy Lanza (nextime / spora )'s avatar
      Fix: Add requires_full_sync flag for empty database recovery · ce5a588c
      Stefy Lanza (nextime / spora ) authored
      - Add requires_full_sync flag to /api/reports/sync response when no records exist for client across ALL report tables (bets, extraction_stats, match_reports)
      - Add requires_full_sync flag to /api/reports/last-sync response when no records exist for client
      - Update REPORTS_SYNC_PROTOCOL_DOCUMENTATION.md with full sync required scenario
      - Update REPORTS_SYNC_API_SPECIFICATION.txt with requires_full_sync field documentation
      - Create REPORTS_SYNC_EMPTY_DATABASE_FIX.md with comprehensive fix documentation
      
      This fix addresses the critical gap where the server couldn't signal when it required a full sync after database reset, ensuring automatic recovery without manual intervention.
      ce5a588c
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
      Add automatic migration for accumulated_shortfall and cap_percentage · f6616afb
      Stefy Lanza (nextime / spora ) authored
      - Add Migration_014 to migrations.py for automatic application at launch
      - Migration adds accumulated_shortfall and cap_percentage columns to match_reports and extraction_stats tables
      - Migration will be automatically applied when the application starts
      - Includes both Python migration class and SQL script for manual execution if needed
      f6616afb
    • Stefy Lanza (nextime / spora )'s avatar
      Add accumulated_shortfall and cap_percentage to reports sync · 99ecea2f
      Stefy Lanza (nextime / spora ) authored
      - Add accumulated_shortfall field to ExtractionStats and MatchReport models
      - Add cap_percentage field to ExtractionStats and MatchReport models
      - Update API sync endpoint to accept and store accumulated_shortfall and cap_percentage for each match
      - Update reports page to show totals at the last match of selected period instead of sync timestamp
      - Update client report detail to display accumulated_shortfall and cap_percentage
      - Add comprehensive test script for accumulated_shortfall and cap_percentage implementation
      - Update templates to display cap_percentage in match lists
      
      This allows tracking the progression of the cap redistribution balance for every client
      over time, showing the actual values at the moment of each match extraction.
      99ecea2f
    • Stefy Lanza (nextime / spora )'s avatar
      Add Bootstrap CSS and JS to enable responsive grid layout · 12219916
      Stefy Lanza (nextime / spora ) authored
      - Add Bootstrap 5.3.0 CSS from CDN
      - Add Font Awesome 6.4.0 for icons
      - Add Bootstrap 5.3.0 JS bundle for interactive components
      - This enables the responsive grid system (col-12, col-md-6, col-lg-3) to work properly
      - Cards and filter form will now display in horizontal layout as intended
      12219916
    • Stefy Lanza (nextime / spora )'s avatar
      Update reports page layout: cards in single row, 3-column filter form with conditional date inputs · ac3a9c46
      Stefy Lanza (nextime / spora ) authored
      - Change summary cards to display in single horizontal row using responsive grid (col-12 col-md-6 col-lg-3)
      - Add h-100 class to ensure equal card heights
      - Reorganize filter form into 3-column layout (Client, Date Range, Sort By)
      - Move time filters to always-visible section (works with all date range options)
      - Show custom date range inputs only when 'Custom' date range is selected
      - Add JavaScript to toggle custom date range visibility based on selection
      - Move action buttons to bottom-right of form with Reset and Apply buttons
      - Add resetFilters() function to clear all filters
      - Add me-2 and text-end CSS utility classes
      ac3a9c46
    • Stefy Lanza (nextime / spora )'s avatar
      Enhance reports page UI with colorful gradient cards and improved filter layout · e6c0e63d
      Stefy Lanza (nextime / spora ) authored
      - Add gradient backgrounds to summary cards (Total Payin, Total Payout, Total Balance, CAP Redistribution)
      - Include circular icon boxes with relevant icons for each metric
      - Implement dynamic color for Total Balance (green for positive, red for negative)
      - Reorganize filters into compact, collapsible layout with logical grouping
      - Add collapsible header with animated chevron icon
      - Enhance filter sections with icons and improved spacing
      - Add comprehensive CSS styles for gradients, flexbox utilities, and visual effects
      - Include JavaScript for smooth collapsible animation with icon rotation
      e6c0e63d
    • Stefy Lanza (nextime / spora )'s avatar
      Fix SQL reset script to respect foreign key constraints · 6a5e8b04
      Stefy Lanza (nextime / spora ) authored
      - Fix deletion order: child tables before parent tables
      - Add bet_details deletion before bets deletion
      - All 4 options updated with correct deletion order
      - Prevents foreign key constraint errors
      
      Deletion order:
      1. report_sync_logs (no dependencies)
      2. match_reports (child of report_syncs)
      3. extraction_stats (child of report_syncs)
      4. bet_details (child of bets)
      5. bets (parent of bet_details, child of report_syncs)
      6. report_syncs (parent of bets, extraction_stats, match_reports)
      6a5e8b04
    • Stefy Lanza (nextime / spora )'s avatar
      Add SQL script to reset reports sync data for full resync · b719f53f
      Stefy Lanza (nextime / spora ) authored
      - Add RESET_REPORTS_SYNC.sql with multiple reset options
      - Option 1: Reset for specific client
      - Option 2: Reset for ALL clients (full reset)
      - Option 3: Reset for multiple specific clients
      - Option 4: Reset syncs after specific date
      - Include verification queries to confirm deletion
      - Include auto-increment reset option
      
      This allows administrators to:
      - Force clients to perform full resync
      - Reset corrupted sync data
      - Clean up old sync records
      - Verify deletion was successful
      b719f53f
    • Stefy Lanza (nextime / spora )'s avatar
      Add reports sync last sync query endpoint and client implementation guides · c0619298
      Stefy Lanza (nextime / spora ) authored
      - Add GET /api/reports/last-sync endpoint to query server for last sync information
      - Update reports page with sorting by client name and cap balance
      - Create comprehensive client-side implementation guide (CLIENT_SYNC_IMPLEMENTATION_GUIDE.md)
      - Create minimal client prompt (CLIENT_SYNC_MINIMAL_PROMPT.md)
      - Update final implementation documentation (REPORTS_FINAL_IMPLEMENTATION.md)
      
      This allows clients to:
      - Query server for last sync information before syncing
      - Verify local tracking against server state
      - Recover from tracking corruption
      - Prevent data loss from missed syncs
      c0619298
    • Stefy Lanza (nextime / spora )'s avatar
      Fixed error · 9158dbaf
      Stefy Lanza (nextime / spora ) authored
      9158dbaf
    • Stefy Lanza (nextime / spora )'s avatar
      Refactor reports · 361fe6c0
      Stefy Lanza (nextime / spora ) authored
      361fe6c0
  2. 01 Feb, 2026 8 commits
  3. 21 Jan, 2026 1 commit
  4. 20 Jan, 2026 4 commits
  5. 12 Jan, 2026 4 commits
  6. 09 Jan, 2026 3 commits
  7. 27 Sep, 2025 1 commit
  8. 26 Sep, 2025 4 commits