Skip to content

fix(new-contact): refresh path and QRZ panel on every callsign search#211

Open
patrickrb wants to merge 1 commit into
mainfrom
fix/qso-callsign-lookup
Open

fix(new-contact): refresh path and QRZ panel on every callsign search#211
patrickrb wants to merge 1 commit into
mainfrom
fix/qso-callsign-lookup

Conversation

@patrickrb
Copy link
Copy Markdown
Owner

Summary

Two fixes on the Log a contact page when looking up a callsign:

  • Stale data persisted across searches. The lookup handler merged its result with the previous form state (data.grid_locator || prev.gridLocator), so when the new operator's QRZ record didn't carry a grid the previous operator's grid (and lat/lng) silently survived — the path map never moved. The callsign field also held the old name/qth/grid while the next lookup was in flight. Lookup-derived fields now reset on every callsign change and are replaced (not merged) when the new lookup returns.
  • The verified panel only showed initials + last name + grid + country + qth, throwing away most of QRZ's response. The panel now shows the operator's QRZ profile image (with initials fallback on missing or broken image), nickname, an address line (city, state, country), license-class chip (Extra/General/Tech/Club…), LoTW/eQSL participation chips, QSL via, and a View on QRZ link. lib/qrz.ts now parses image, nickname, aliases, city, state, class, lotw, eqsl from the XML.

Test plan

  • Type a known callsign with a QRZ photo (e.g. your own) → image renders in the result panel
  • Type a callsign with no QRZ photo → initials avatar fallback renders
  • Search a callsign with a grid (e.g. W1AWFN31pr), then change to one with no grid → grid input + path map clear instead of holding the previous one
  • Backspacing the callsign clears the result panel and the path map empties immediately
  • Click View on QRZ → opens qrz.com/db/<CALL> in a new tab
  • Save a QSO afterwards and confirm the right grid/lat/lng land on the contact

🤖 Generated with Claude Code

Two issues on the Log a contact page when searching a callsign:

1. Stale data persisted across searches. The lookup handler merged
   results with `prev` (`data.grid_locator || prev.gridLocator`), so
   when a new operator's QRZ record returned no grid, the previous
   operator's grid (and lat/lng) silently survived and the path map
   never moved. The callsign field also held the old name/qth/grid
   while the next lookup was in flight. Now the lookup-derived fields
   reset on every callsign change and are replaced (not merged) when
   the new lookup returns.

2. The "verified" panel only displayed initials + name + grid + country
   + qth, throwing away the rest of QRZ's response. The panel now shows
   the operator's QRZ profile image (with initials fallback on missing
   or broken image), nickname, MapPin'd address line, license-class
   chip (Extra/General/Tech/Club/...), LoTW/eQSL participation chips,
   QSL via, and a View on QRZ link. lib/qrz.ts now parses image,
   nickname, aliases, city, state, class, lotw, eqsl from the XML.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodelog Ready Ready Preview, Comment May 12, 2026 3:41am

Request Review

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.

1 participant