Adds a `qso_show_profile_image` JS flag from the user session and updates callbook panel rendering to honor it. The panel now omits the image column when profile images are disabled, keeps the empty-image message only when images are enabled, and applies a single-column layout class for no-image states.
Refactored the callsign profile display from a separate hidden card to an integrated tab-based interface. The new callbook tab includes a responsive grid layout with profile image, external links (QRZ and HamQTH), and metadata fields (name, QTH, locator, IOTA). Added proper HTML escaping for security and improved visual organization with Bootstrap 5 styling.
Introduce window.cloudlogLastCatData and window.cloudlogLastCatRadioId to cache the last CAT response and radio ID, set on successful CAT poll and cleared on UI reset. Add isSatelliteLookupContext() in qso.js to centralize logic for detecting satellite lookup context using UI fields or the cached CAT data, and replace scattered sat_name checks with this helper. This makes satellite lookups more reliable when CAT populates fields and avoids duplicated logic across handlers.
Detect a selected radio and avoid reapplying saved satellite defaults when CAT is in use. Adds checks for a non-zero selected radio, skips restoring sat_name/sat_mode when a radio is selected, clears sat fields and their stored catValue, and triggers a radios change to resync CAT state. Also updates reset-on-escape behavior to preserve/clear satellite fields appropriately to prevent stale values from being restored.
Avoid double-processing of the Escape key by setting a timestamp (window.cloudlogQsoEscHandledAt) when handling the QSO-escape keydown and short-circuiting subsequent handlers within 500ms. Also broaden the SAT field restore logic in resetQsoEntryOnEscape to restore sat_name/sat_mode when preSatMode exists or when the previous propagation mode was SAT (not just when preSatName is present). These changes prevent accidental duplicate resets and ensure SAT fields are correctly restored.
After reapplying post-save defaults, schedule a second call to syncFromSelectedRadioAfterReset (250ms delay) in addition to the immediate call. This helps ensure the selected radio state is correctly propagated and avoids timing/race issues with UI or async updates after saving a QSO.
Call syncFromSelectedRadioAfterReset() after reapplyPostSaveDefaults() in assets/js/sections/qso.js so the radio state is re-synchronized following a QSO save/reset. This prevents stale UI values and ensures fields reflect the currently selected radio after saving.
Prevent CAT polling from overwriting user-entered satellite fields by introducing lockSatelliteFieldsToUserInput and only updating #sat_name, #sat_mode and propagation when not locked. Clear stale sat fields if CAT returns empty values. Reset the lock on radio changes and when UI is reset, and set the lock dynamically on user input (or when propagation is SAT).
Also persist the selected radio as a post-save default: include radio in postSaveDefaults, restore it in reapplyPostSaveDefaults (update selects and localStorage), and trigger sat_name input after restore so the locking logic reacts to restored satellite fields.
Capture the QSO start_date when a record is saved and include it in postSaveDefaults so it can be reapplied. Added retrieval of start_date from #qso_input on save and updated reapplyPostSaveDefaults to set the start_date input when provided, preserving the user's selected start date after save.
Change htmx.ajax swap option from 'outerHTML' to 'innerHTML' when updating the #qso-last-table. This ensures only the container's contents are replaced (preserving the container element and any bindings/listeners) and avoids DOM reattachment issues.
Add an optional preserveDxccState parameter to resetDefaultQSOFields to keep DXCC-related UI state (country, callsign_info text/title/class, dxcc_id, CQ zone, ITU zone) when requested, preventing badge/country flicker. Update the callsign focusout flow to use this option. Also remove unnecessary .trigger('change') calls on dxcc_id assignments to avoid redundant change events and adjust field clearing/restoration order accordingly.
Add a cached DXCC lookup and a jsondxcc endpoint to speed up country resolution and reduce DB load (file-cache with 1h TTL). Introduce cached_dxcc_lookup(), build_confirmation_where(), and callsign_status() in the Logbook controller; refactor confirmed_grid_before() and worked_grid_before() to accept logbook relationships and confirmation prefs to avoid redundant queries. Use a new Logbook_model::get_recent_callsign_details() to populate recent name/gridsquare/qth/iota/qsl/state/county values in a single query. Update JS to better manage lookup state, invalidate in-flight requests, and perform a debounced quick DXCC lookup to improve UX. Tweak previous-contacts pagination to a compact sliding window and remove a redundant UI note.
Prevent the logbook auto-refresh from overwriting callsign lookup results by introducing a previousContactsLookupMode flag and pauseAutoRefresh()/resumeAutoRefresh() helpers that remove/restore the htmx hx-trigger on the qso list element. Clear and hide partial_view on reset and resume auto-refresh there. Show an explicit "no past QSOs" info message when a callsign is found but has no previous QSOs, and ensure the previous-contacts panel state is set deterministically. Also harden CAT radioID checking to treat undefined and falsy values as invalid. Changes touch qso.js and the footer view.
Treat lookup.partial defensively (ensure it's a string) before injecting into #partial_view, and determine whether to show previous-contacts panel based on trimmed content instead of always enabling it. Clear #partial_view when hiding the panel to avoid stale content, and simplify the htmx init check to rely on the presence of content rather than visibility. These changes prevent accidental HTML insertion and make panel toggling deterministic.
Hide the #partial_view container by default and only reveal the previous-contacts panel when it contains non-empty HTML. Invoke getDxccResult after injecting the partial result so the DXX summary is fetched and displayed. Add handling to reset QSO fields and switch back to the Previous Contacts tab when the callsign is cleared, and remove duplicated/unused code in the callsign focusout handler. This prevents showing an empty lookup panel and cleans up the logic around loading lookup details.
After saving a QSO, switch to the QSP tab if present (using bootstrap.Tab.show()). Enhance reset_fields() to clear wwff and pota info (HTML and title) and safely clear the sota_ref Selectize control (if initialized) instead of using .val(""), preventing leftover values/tooltips and avoiding errors when Selectize isn't present.
Add setPreviousContactsPanelState(showLookupDetails) to centralize show/hide logic for #qso-last-table, its trailing <small>, and #partial_view. Replace inline show/hide calls with this helper, update resetToPreviousContactsTab to use it, and add an htmx:afterSwap listener to reapply the visibility state after HTMX updates the previous contacts markup. This ensures the lookup details and default previous-contacts table remain consistent across dynamic updates.
Add a suppressNextResetHandler flag to avoid running the reset event handler when the QSO form is reset programmatically (set the flag before calling qsoFormElement.reset()). Introduce clearCatTrackedFieldState() to remove stored 'catValue' data from frequency/satellite/mode/power fields and call it from reset_fields(). Also initialize suppressNextResetHandler and short-circuit the '#qso_input' reset handler when the flag is set to prevent unintended UI side effects.
Add request/version tracking to CAT JSON handling to avoid applying stale responses when radio selection changes. Introduce catRequestCounter, lastProcessedCatRequest and catSelectionContextVersion, compare request IDs and context version before updating UI, and increment context version on radio selection change. Also add a syncFromSelectedRadioAfterReset helper in qso.js (with a throttled user notice) and call it after form reset and on escape-based reset so the form prefers live CAT values from the selected radio.
Before resetting the QSO form, capture the user's current operating context (band, mode, satellite name/mode, propagation). After qsoForm.reset() and the built-in reset handlers run, reapply those captured values (with a 150ms timeout) so the UI doesn't revert to server-session defaults or the previous QSO values. Also call setRst(mode) if available to update RST for the restored mode.
Ensure satellite fields are cleared whenever propagation mode is not 'SAT' and when the QSO form is reset. In Qso.php, sat_name and sat_mode are set to empty strings if prop_mode != 'SAT' (added in two handling points). In assets/js/sections/qso.js, added clearSatelliteFields() to clear sat_name, sat_mode, satellite_modes_list and related state, call it from reset_fields(), and invoke the form reset flow to ensure no stale satellite data remains after resetting or changing propagation mode.
When a QSO is saved, preserve the selected mode, satellite name, and satellite mode so the user doesn't have to reselect them for the next entry. Capture savedMode, savedSatName, and savedSatMode into postSaveDefaults and call a new reapplyPostSaveDefaults() after reset_fields(). Added reapplyPostSaveDefaults() to restore band, mode, sat_name, sat_mode and call setRst() if available.
When resetting QSO fields, reapply the default RST for the current mode. The change calls setRst($('.mode').val()) if the setRst function exists, ensuring mode-specific defaults (e.g., CW => 599) are restored after a form reset to avoid stale RST values.
Add escapeNoticeValue to sanitize user-provided strings (&, <, >, ", ') to prevent XSS in notice messages. Use a new savedBand variable and update saveMessage assembly to include both callsign and band when available, with fallbacks for when only one is present. Changes are in assets/js/sections/qso.js.
Introduce an AJAX-based QSO save flow: add QSO::ajax_saveqso() in the controller to validate input, set session/cookies, create the QSO and return JSON success/error payloads. Update the QSO view to include a data-ajax-save-url on the form and add a notice-alerts container location. Enhance the qso.js client: add isSubmitting guard, showQsoNotice helper, intercept form submit to POST serialized form data to the AJAX endpoint, handle success (reset form, show notice, refresh recent QSOs via htmx), display validation/server errors, and restore UI state when complete. These changes avoid full page reloads on save and provide inline validation feedback.
Introduce a frontend QRA utilities module and switch QSO locator/bearing/distance logic to run client-side. Added assets/js/qra-utils.js (ported from the PHP Qra library), injected measurement_base and station_gridsquares into the QSO view, and updated application/controllers/Qso.php to provide the measurement_base for the frontend. Footer now loads qra-utils.js before qso.js. Modified assets/js/sections/qso.js to debounce locator input, place map markers from local grid→lat/lng math, and compute bearing/distance via QraUtils (removes several AJAX calls to server endpoints). This reduces server round-trips and keeps frontend behavior consistent with the PHP implementation.
Replace jQuery $(function() {}) with document.addEventListener('DOMContentLoaded') in the QSO view and harden selectize usage in assets/js/sections/qso.js. Add existence checks (for elements and selectize instances) before accessing .selectize to avoid null/undefined dereferences, and consolidate selectize clearing logic. These changes improve robustness when selectize or jQuery readiness assumptions aren't met and prevent runtime errors.
Always render the DOK field wrapper but mark it with data-user-hidden when the field is disabled for the user, and make toggleDokField skip showing the field in that case. Add defensive checks around Selectize accesses in assets/js/sections/qso.js (ensure $select[0] exists and dok_selectize is non-null before calling methods) to avoid JS errors when the DOK input is absent or not initialized. Changes touch application/views/qso/index.php and assets/js/sections/qso.js to prevent runtime errors and correctly honor user-hidden DOK configuration.
Adjust indentation in assets/js/sections/qso.js so the $('#dxcc_id').val(...) line is properly nested within the surrounding block. This is a whitespace/readability fix only and introduces no functional change.
Call toggleDokField()/toggleUsaFields() on jQuery ready and ensure programmatic updates to #dxcc_id fire change handlers. Replaced the previous DOMContentLoaded init with a jQuery $(function()) call to initialise the toggle state, added .trigger('change') where #dxcc_id is set programmatically, and invoke the toggle functions from the dxcc change handler to keep UI fields in sync.
Implement server-side pagination for previous contacts and add a DXCC Summary tab. Controller Qso now uses last_custom_paginated and exposes total_rows/total_pages/current_page/limit. Logbook_model gained last_custom_paginated and last_custom_count to support paged queries. The previous_contacts view was updated with HTMX pagination controls and wrapping for a scrollable table; qso/index was refactored to a tabbed UI (Previous Contacts / DXCC Summary). Lookup result display was improved: responsive table, sticky header, consolidation of LSB/USB into SSB and filtering out empty modes. JS and CSS updates load DXCC HTML into the new tab, hide legacy dxccsummary elements, and add form reset / Escape handling to return focus to the previous contacts tab.
Add normalization helpers and update callhistory renderers to avoid showing redundant membership numbers or names when they are contained in or equal to other fields. Introduces normalizeCallhistoryText and qsoCallhistoryNormalizeText, converts values to strings, trims and lowercases them for comparisons, and only appends #exch1 or name when they would be distinct from the organization label or each other. Applies the change to assets/js/sections/contesting.js and assets/js/sections/qso.js to clean up callhistory display logic.
Introduce a new Call History feature: adds Callhistory controller, Callhistory_model, migration (create callhistory_files table) and view for uploading/managing call history files. Implements CSV/TXT upload handling, storage per-user, activation/priority controls, checksum, and server-side lookup that scans active files for matching callsigns. Integrates UI: header menu link, contesting and QSO views show call history results inline, and JavaScript to perform lookups and render results with copy-to-SIG functionality. Also updates .gitignore to exclude uploaded callhistory directory and bumps migration_version to 261.
Enable createOnBlur and selectOnTab on selectize instances for SOTA, WWFF and POTA reference fields in both the QSO form and the QSO edit dialog (assets/js/sections/qso.js and assets/js/sections/common.js). This improves UX by allowing new entries to be created on blur and enabling selection with the Tab key.
Keep callsign lookup retriggered on correction while preventing silent data loss.
Add a Bootstrap modal that lists conflicting fields and allows keep existing, replace selected, or replace all.
Fix stale lookup race handling with request IDs and correct callsign comparison guard to avoid assignment bug.
Make callsign-change resets non-destructive for user-entered fields while still refreshing DXCC/metadata and past-QSO context.
Introduces a submission state flag to prevent double submissions of the QSO form, disables the submit button during processing, and restores its state if the page visibility changes or fields are reset. Also adds handling to prevent Enter key from causing duplicate submissions.