Skip to content

Conversation

@magicbug
Copy link
Owner

@magicbug magicbug commented Jan 14, 2026

This pull request introduces significant improvements to the SOTA and POTA awards dashboards, enhances notes management, and refactors update and data-fetching logic for better maintainability and user experience. The changes include new HTMX endpoints for dynamic dashboard components, improved filtering and category handling in notes, and streamlined data update processes for SOTA, POTA, and WWFF references.

Awards Dashboard Enhancements:

  • Added HTMX endpoints (sota_table, sota_stats, sota_map, pota_table, pota_stats, pota_progress, pota_map) in Awards.php for dynamic loading of SOTA and POTA dashboard components, enabling filtering, statistics, progress, and map visualizations. [1] [2]
  • Improved SOTA and POTA dashboard shells to preload filter options and worked bands/modes, passing all relevant data to views for richer user interaction. [1] [2]

Notes Management Improvements:

  • Enhanced notes index, add, and edit actions to support filtering by search, category, and date range, and to provide category lists for assignment. [1] [2] [3]
  • Refactored note deletion to enforce POST requests and added a new endpoint for deleting/merging note categories, improving safety and flexibility.

Data Update and Fetching Refactors:

  • Rewrote SOTA update logic to use a library for fetching and saving both full CSV and reference lists, improving reliability and maintainability.
  • Optimized WWFF update to process CSV line-by-line, reducing memory usage and improving error handling.
  • Enhanced POTA update to save both the reference list and the full CSV locally for richer metadata support. [1] [2]
  • Updated QRZ mass download logic to use a consistent, helper-generated User-Agent string as required by QRZ. [1] [2]

Miscellaneous:

  • Bumped the migration version in migration.php to 243 to reflect the new database state.
  • Minor cleanup in Maintenance.php (removed extraneous comment).

Note

Modernizes awards, notes, and maintenance flows with dynamic UI, richer datasets, and safer operations.

  • Adds HTMX endpoints and views for SOTA/POTA (sota_table|stats|map, pota_table|stats|progress|map) with filters, band/mode stats, progress bars, and Leaflet maps
  • Introduces Sota library to fetch/cache full summits CSV and autocomplete; persists POTA full CSV; optimizes WWFF fetch (streamed); update endpoints wrapped with auth/UI buttons in Maintenance
  • Reworks SOTA/POTA models for filtered queries, uniques, confirmations, first/last, and metadata lookups; fixes IOTA worked SQL (station_id IN)
  • Upgrades Notes: list filters (search/category/date), category list/creation, POST-only deletes with modal, category delete/merge; adds created_at column (migration 242)
  • Standardizes QRZ API calls via cloudlog_user_agent() helper and switches to HTTPS; adds same UA to Logbook push
  • Updates SOTA/POTA/WWFF award views with DataTables, search inputs, and map/QSO modals; enhances SimpleFLE to parse/save comments and show a Comment column
  • Bumps schema to 2.8.6 (migration 243); minor UI scripts/hooks and language strings for unique/confirmed totals; extends .gitignore for cached CSVs

Written by Cursor Bugbot for commit 03f44eb. This will update automatically on new commits. Configure here.

Introduced a useragent_helper with a function to generate a compliant User-Agent string for Cloudlog, and updated QRZ API calls in Qrz controller and Logbook_model to use this helper. This ensures consistent and QRZ-compliant User-Agent headers for all outgoing requests.
Introduces note categories with support for filtering, assigning, and managing categories. Adds category selection and creation to add/edit forms, category filtering to the notes list, and modals for deleting/merging categories and confirming note deletion. Updates controller and model logic to handle categories, and improves UI for notes management.
Introduces a migration to add a created_at timestamp to the notes table. Updates the Note model and Notes controller to support filtering notes by creation date, and enhances the notes view to include date filter fields and display the created date for each note. Migration version is incremented to 242.
Updated the logic to display 'N/A' for invalid or empty created_at values, including the '0000-00-00 00:00:00' placeholder, ensuring more accurate date representation in the notes view.
Introduces a 'Created Date' field to the note edit form, allowing users to set or update the creation date of a note. The model is updated to handle and save the optional 'created_at' value when provided.
Introduces a new POTA awards dashboard with HTMX-powered filtering, statistics, progress bars, and a Leaflet map of worked parks. Adds new controller endpoints, model methods for filtered queries and park metadata, and modular view components for table, stats, progress, and map. Updates language files for new stats labels and enhances the update process to cache the full POTA parks CSV for richer features.
Deleted the assets/json/pota.txt file, which contained a large list of codes. This may be part of a cleanup or data migration effort.
Removed /assets/json/pota.txt from .gitignore so it will be tracked by git. .vscode/sftp.json remains ignored.
Added /assets/json/pota.txt to .gitignore to prevent it from being tracked by git.
Added /assets/json/pota_parks.csv to .gitignore to prevent the CSV file from being tracked by git.
Updated the SQL query to use 'station_id in (...)' instead of 'station_id = ...' in the subquery, ensuring correct filtering when multiple station IDs are provided.
Replaces the old SOTA model with a new Sota_model, adds CSV-based summit metadata caching, and introduces new controller endpoints and view components for SOTA table, stats, and map fragments. The SOTA award page now supports filtering, improved statistics, and interactive mapping using summit coordinates. Updates .gitignore to include the new SOTA CSV, and refactors SOTA data refresh logic for reliability and maintainability.
Refactors the SOTA CSV download process to stream data directly to a temporary file using cURL, improving memory efficiency and error handling. Replaces the previous string-based CSV extraction with a file-based approach, and adds more robust error messages for file and download failures.
The RST sent and received columns have been removed from the SOTA awards table for a cleaner display. The colspan for the 'nothing found' row was also updated to match the new column count.
Introduces the ability to add comments to QSOs by enclosing text in angle brackets, updates the UI to display a new Comment column, and documents the feature in the syntax help. The JavaScript logic is updated to extract, display, and save comments with each QSO.
Introduces a new section in the maintenance page allowing manual updates of reference data files (Clublog SCP, LoTW Users, DOK, SOTA, WWFF, POTA) via AJAX buttons with loading indicators. Adds corresponding UI-friendly controller methods with authorization checks and improves the WWFF update logic to process CSV files line by line for better memory efficiency.
Added migration 243 to tag Cloudlog as version 2.8.6 and updated the migration version in config. Improved SOTA awards table to display a message outside the table when no results are found. Modified the SOTA index page to trigger filter refresh on 'Apply' and adjusted DataTables language options for empty states.
@magicbug magicbug self-assigned this Jan 14, 2026
@magicbug magicbug merged commit bb5c869 into master Jan 14, 2026
2 checks passed
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on February 5

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

comment = commentMatch[1].trim();
// Remove the comment from the row before processing
row = row.replace(/<[^>]+>/, '').trim();
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SimpleFLE comment persists from non-QSO lines to subsequent QSOs

Medium Severity

The comment variable is extracted from angle brackets at the start of each line but only reset inside the QSO creation block (when a callsign is detected). If a line contains a comment but no callsign (e.g., a band/mode header like 20m cw < note >), the comment persists and incorrectly attaches to the next QSO that doesn't have its own comment. The comment variable needs to be reset at the beginning of each line iteration, not just after QSO creation.

Additional Locations (1)

Fix in Cursor Fix in Web

<label class="form-label"><?php echo lang('gen_hamradio_mode'); ?></label>
<select name="mode" class="form-select form-select-sm">
<option value="All">All</option>
<?php if (!empty($modes)) { foreach ($modes as $m) { echo '<option value="'.htmlspecialchars($m->mode).'">'.htmlspecialchars($m->mode).'</option>'; } } ?>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

POTA mode dropdown shows duplicate entries due to submodes

Low Severity

The POTA mode filter dropdown iterates over all active modes and displays only $m->mode, ignoring submodes. Since the adif_modes table contains multiple rows with the same mode but different submodes (e.g., SSB with USB, SSB with LSB), the dropdown will show duplicate mode entries. The SOTA view correctly handles this using $mode->submode ?: $mode->mode to show unique values.

Fix in Cursor Fix in Web

if (!window.L) { return; }

// QSO data by ref
var qsosByRef = <?php echo json_encode($qsos_by_ref); ?>;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOTA map crashes if QSO data contains invalid UTF-8

Medium Severity

The SOTA map view embeds full QSO row objects into JavaScript via json_encode($qsos_by_ref) without error handling. QSO data can contain user-entered fields (comments, names, QTH) that may have invalid UTF-8 sequences from ADIF imports or copy-pasted text. When json_encode() encounters invalid UTF-8, it returns false, and echo false outputs an empty string, producing var qsosByRef = ; which is a JavaScript syntax error that breaks the entire map view.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants