Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 9, 2025

The WAS (Worked All States) award was displaying inconsistent progress between the main awards page and the detail page, confusing users about their actual progress.

Problem

  • Main awards page (/awards): Showed 49/50 (98%) using confirmed states
  • WAS detail page (/awards/was): Showed 50/50 (100%) using worked states

This inconsistency occurred because the two pages were using different metrics:

  • Main page: confirmed_states/total_states (states with QSL confirmation)
  • Detail page: worked_states/total_states (states contacted)

Solution

Updated the main awards page to use the same metric as the detail page:

  • Changed progress display from confirmed_states to worked_states
  • Updated completion status logic from confirmed_states >= 50 to worked_states >= 50
  • Added missing progress_percentage property to TypeScript interface

Both pages now consistently show worked states as the primary progress metric, with confirmed states displayed separately as additional achievement. This aligns with amateur radio conventions where "worked" (contacted) is the main progress indicator.

Result

Users now see consistent 50/50 (100%) progress on both pages when they have worked all 50 states, eliminating confusion about their WAS award status.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Aug 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nodelog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 10, 2025 8:21pm

Copilot AI changed the title [WIP] Fix WAS - showing 51 states required Fix WAS award counting - exclude DC from state count Aug 9, 2025
Copilot AI requested a review from patrickrb August 9, 2025 13:38
Copy link
Owner

@patrickrb patrickrb left a comment

Choose a reason for hiding this comment

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

@copilot it seems like the entire WAS award is broken now, no data is showing for any states

image

Copy link
Contributor Author

Copilot AI commented Aug 10, 2025

@copilot it seems like the entire WAS award is broken now, no data is showing for any states

<img width="1314" height="1061" alt="image" src="https://github.com/user-attachments/assets/d0cb424b-b1a...

Fixed the issue! The problem was that my original fix used AND type = 'State' which depends on the type column being properly populated. I've changed it to use AND code != 'DC' instead, which is more defensive and works with any database schema.

The new approach:

  • Still excludes DC from the state count (50 states instead of 51)
  • Works even if the type column doesn't exist or isn't populated
  • More robust for different database setups

Commit: 5594d35

Copilot AI changed the title Fix WAS award counting - exclude DC from state count Fix WAS award showing 0/0 states - use defensive database query approach Aug 10, 2025
Copilot AI requested a review from patrickrb August 10, 2025 15:38
Copy link
Owner

@patrickrb patrickrb left a comment

Choose a reason for hiding this comment

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

the main /awards page is showing that I have 49/50 for WAS award, but the WAS page is showing I have 50/50 and 100%

/awards page:
Image

/awards/was page:

Image

Copy link
Owner

@patrickrb patrickrb left a comment

Choose a reason for hiding this comment

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

@copilot

the main /awards page is showing that I have 49/50 for WAS award, but the WAS page is showing I have 50/50 and 100%

/awards page:
Image

/awards/was page:
Image

Copy link
Contributor Author

Copilot AI commented Aug 10, 2025

@copilot

the main /awards page is showing that I have 49/50 for WAS award, but the WAS page is showing I have 50/50 and 100%...

Fixed the inconsistency! The main awards page was showing confirmed states (49/50) while the WAS detail page was showing worked states (50/50). Both pages now consistently use worked states as the primary progress metric, so you'll see 50/50 (100%) on both pages.

The change aligns with amateur radio conventions where "worked" (contacted) is the main progress indicator, and "confirmed" (QSL received) is shown separately as additional achievement.

Commit: cb8f219

Copilot AI changed the title Fix WAS award showing 0/0 states - use defensive database query approach Fix WAS award progress inconsistency between main awards page and detail page Aug 10, 2025
Copilot AI requested a review from patrickrb August 10, 2025 20:21
@patrickrb patrickrb marked this pull request as ready for review August 11, 2025 00:06
Copy link
Owner

@patrickrb patrickrb left a comment

Choose a reason for hiding this comment

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

tested deployed env, LGTM, merging

@patrickrb patrickrb merged commit 8d0f73d into main Aug 11, 2025
4 checks passed
@patrickrb patrickrb deleted the copilot/fix-113 branch August 11, 2025 00:06
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