1. 20 Feb, 2026 2 commits
    • Stefy Lanza (nextime / spora )'s avatar
      Fix modal closing issue - check e.target directly · 091d1023
      Stefy Lanza (nextime / spora ) authored
      The previous fix using closest() was incorrect because closest('.modal')
      would always return the modal for any click inside it (including dialog).
      
      The correct approach is to check if e.target IS the modal element itself,
      which only happens when clicking directly on the backdrop overlay,
      not when clicking on elements inside the dialog.
      091d1023
    • Stefy Lanza (nextime / spora )'s avatar
      Fix modal closing issue when clicking inside dialog · 7bc3a49b
      Stefy Lanza (nextime / spora ) authored
      The modal was closing when clicking on input fields or trying to type
      because the click event handler was checking if e.target.classList.contains('modal')
      which could incorrectly trigger when clicking on certain elements.
      
      Fixed by using closest() to properly detect if the click happened inside
      a .modal-dialog element. The modal now only closes when clicking on the
      backdrop (outside the dialog), not when interacting with form elements.
      7bc3a49b
  2. 14 Feb, 2026 6 commits
  3. 10 Feb, 2026 2 commits
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
      Add nginx proxy support with X-Forwarded-Prefix header handling · 80af321d
      Stefy Lanza (nextime / spora ) authored
      - Updated ProxyFix configuration to handle all proxy headers (x_for, x_proto, x_host, x_port, x_prefix)
      - Added template context processor to inject script_root and url_root into all templates
      - Created JavaScript helper functions in base template for proxy-aware URL generation:
        - buildUrl() - Build URLs with correct proxy prefix
        - proxyFetch() - Make fetch requests with proxy-aware URLs
        - navigateTo() - Navigate to URLs with proxy prefix
        - getCurrentUrl() - Get current URL with proxy prefix
        - buildUrlWithParams() - Build URLs with query parameters
      - Updated all templates with hardcoded JavaScript URLs to use proxyFetch():
        - admin_settings.html
        - admin_users.html
        - admin_migrations.html
        - match_detail.html
        - fixture_detail.html
        - upload/zip.html
        - user_tokens.html
      - Updated templates with window.location.href to use navigateTo():
        - clients.html
        - reports.html
        - client_report_detail.html
      - Updated templates using window.location.href for URL manipulation to use getCurrentUrl():
        - match_report_detail.html
        - bet_detail.html
        - reports.html
        - client_report_detail.html
      - Created PROXY_SUPPORT.md documentation file
      
      This implementation ensures all URLs generated and managed in the web dashboard correctly handle the root path when behind an nginx proxy with X-Forwarded-Prefix header (e.g., /mbetterc).
      80af321d
  4. 03 Feb, 2026 13 commits
  5. 02 Feb, 2026 17 commits
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
      Fix incremental reports sync and template error · e69c15ea
      Stefy Lanza (nextime / spora ) authored
      - Fix MatchReport creation for incremental syncs with empty extraction_stats
      - When extraction_stats is empty but bets exist, create MatchReport from bets data
      - Fix duplicate client_id parameter error in reports template
      - Create separate detail_filters dict to avoid duplicate parameter
      e69c15ea
    • Stefy Lanza (nextime / spora )'s avatar
      Fix empty matches update · d3d966a5
      Stefy Lanza (nextime / spora ) authored
      d3d966a5
    • Stefy Lanza (nextime / spora )'s avatar
      Add comprehensive timezone options to all reports pages · 2117385c
      Stefy Lanza (nextime / spora ) authored
      - Create reusable timezone options partial with all IANA timezones
      - Include 400+ timezone options organized by region (Africa, America, Antarctica, Arctic, Asia, Atlantic, Australia, Europe, Indian, Pacific)
      - Each timezone displays only the city name for cleaner UI
      - Update all reports pages to use the timezone options partial
      - Timezone options include: Auto (Browser Local), UTC, and all major world timezones
      2117385c
    • Stefy Lanza (nextime / spora )'s avatar
      Add timezone support to all reports pages · 8a73a862
      Stefy Lanza (nextime / spora ) authored
      - Add timezone selector with auto-detection of browser local timezone
      - Add manual timezone selection options for major world timezones
      - Implement client-side timezone conversion using JavaScript Intl.DateTimeFormat
      - Update all datetime displays to use data-utc-datetime attribute for automatic conversion
      - All reports pages now support timezone filtering and display
      - Timezone options: Auto (Browser Local), UTC, and 14 major world timezones
      8a73a862
    • Stefy Lanza (nextime / spora )'s avatar
      Enhance reports page with improved layout, pagination, and detailed navigation · 6a24111a
      Stefy Lanza (nextime / spora ) authored
      - Repositioned summary cards to 2 rows (3 cards in first row, 2 in second row)
      - Changed table headers from 'Number of Matches' to 'Matches' and 'Number of Bets' to 'Bets'
      - Added professional styling with gradient headers, hover effects, and enhanced card design
      - Implemented full-width layout for reports page
      - Added per-page selector (10, 20, 50, 100 options, default 50) with pagination
      - Fixed 'View Details' button to properly navigate to client report detail page
      - Created match report detail page with match information and bets list
      - Created bet detail page with bet information and bet details breakdown
      - Added breadcrumb navigation throughout all detail pages
      - All pages maintain consistent professional styling and preserve filters
      6a24111a
    • Stefy Lanza (nextime / spora )'s avatar
      Fix: Auto-derive client_id from auth token when missing in reports sync · 66045355
      Stefy Lanza (nextime / spora ) authored
      - If client_id is missing or null in sync request, derive it from ClientActivity table
      - Look up most recent client activity for the API token to get rustdesk_id
      - Use derived client_id throughout the sync process (ReportSync, Bet, ExtractionStats, MatchReport)
      - Prevents database error: 'Column client_id cannot be null'
      - Ensures server uses same client identifier that client uses
      - Returns client_id_used in response for debugging
      - Fixes issue where client sends null client_id but server needs valid identifier
      66045355
    • Stefy Lanza (nextime / spora )'s avatar
      Fix: Auto-detect client_id from ClientActivity when not provided in /api/reports/last-sync · cd883251
      Stefy Lanza (nextime / spora ) authored
      - When client doesn't send client_id parameter, look up rustdesk_id from ClientActivity table
      - This ensures server uses same client_id that client uses when syncing
      - Fixes issue where server derived 'token_66' but client was syncing with '8d95b8a115c19857'
      - Server now correctly finds existing sync records and returns requires_full_sync=False
      cd883251
    • Stefy Lanza (nextime / spora )'s avatar
      Fix: Remove duplicate client_id parameter in url_for call · dce7b7b7
      Stefy Lanza (nextime / spora ) authored
      - Fixed TypeError: jinja2.runtime.Context.call() got multiple values for keyword argument 'client_id'
      - Removed explicit client_id=client.client_id from url_for call since it's already in **filters
      - This fixes the template rendering error on the reports page
      dce7b7b7
    • Stefy Lanza (nextime / spora )'s avatar
      Fix: Add full JSON response logging to /api/reports/last-sync · 25fd8462
      Stefy Lanza (nextime / spora ) authored
      - Log the complete JSON response being sent back to the client
      - This helps debug what the client is receiving
      - Shows requires_full_sync flag and all response fields in formatted JSON
      25fd8462
    • Stefy Lanza (nextime / spora )'s avatar
      Fix: Derive client_id from API token when not provided in /api/reports/last-sync · 2019b6df
      Stefy Lanza (nextime / spora ) authored
      - When client_id is not provided, derive a unique client_id from the API token (token_{api_token.id})
      - This ensures each API token has its own unique client identifier for sync purposes
      - Fixes issue where client was receiving status for all clients instead of just itself
      - Allows the server to correctly signal requires_full_sync=True when the database is empty for that specific client
      2019b6df
    • 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