Page MenuHomePhabricator

Voting dialog shows infinite loading state when logged out, with no error displayed
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Create a new wish or edit a wish that has no votes yet
  • Copy that same wish on a second tab, but log out.
  • Attempt to submit the vote in the first tab

What happens?:
While logged out, it shows the voting dialog in the loading state, with no error reported to the user
This also happens when it's Offline as seen in the gif below too

What should have happened instead?:
Some kind of error should be reported to the user

Other information (browser name/version, screenshots, etc.):

Logged OutOffline Network
2025-09-15_14-33-38.mp4.gif (1×1 px, 2 MB)

Derived Requirement

The voting dialog must handle error states when a user is logged out or offline. Instead of remaining in an infinite loading state, the system should:

  • Detect when the user is logged out and display a clear error message prompting login before voting.
  • Detect when the network is offline and display an error message about connectivity.
  • Ensure the loading state does not persist indefinitely without user feedback.
Test Steps

Test Case 1: Logged-Out Voting Attempt

  1. Log in and open a wish voting dialog.
  2. Open the same wish in a new tab and log out.
  3. Return to the first tab and attempt to submit a vote.
  4. ✅❓❌⬜ AC1: Confirm the voting dialog does not stay in an infinite loading state.
  5. ✅❓❌⬜ AC2: Confirm an error message is displayed prompting the user to log in.

Test Case 2: Offline Voting Attempt

  1. Log in and open the voting dialog for a wish.
  2. Disable network connectivity (simulate offline mode).
  3. Attempt to submit a vote.
  4. ✅❓❌⬜ AC3: Confirm the dialog does not stay in an infinite loading state.
  5. ✅❓❌⬜ AC4: Confirm an error message about network connectivity is displayed.

QA Results - Meta Beta

Event Timeline

GMikesell-WMF renamed this task from Community Wishlist- Voting Offline to Voting dialog shows infinite loading state when logged out, with no error displayed.Sep 15 2025, 10:09 PM
GMikesell-WMF updated the task description. (Show Details)

@Samwilson I just wanted to give you a heads up that I updated the description a little by also adding a GIF for offline since they will probably be related.

Thanks! That's useful. I'll fix it for all error states.

Change #1188906 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/CommunityRequests@master] Handle more API errors when voting

https://gerrit.wikimedia.org/r/1188906

Change #1188906 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Handle more API errors when voting

https://gerrit.wikimedia.org/r/1188906

@Samwilson Confirmed the voting dialog does not stay in an infinite loading state when logged out or offline, as seen in the videos below. I will mark this as Resolved. Thanks for all your work!

Test Result - Meta Beta

Status: ✅ PASS
Environment: Meta Beta
OS: macOS Tahoe 26.0
Browser: Chrome 140
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Logged-Out Voting Attempt

  1. Log in and open a wish voting dialog.
  2. Open the same wish in a new tab and log out.
  3. Return to the first tab and attempt to submit a vote.
  4. AC1: Confirm the voting dialog does not stay in an infinite loading state.

  1. AC2: Confirm an error message is displayed prompting the user to log in.

See AC1

Test Case 2: Offline Voting Attempt

  1. Log in and open the voting dialog for a wish.
  2. Disable network connectivity (simulate offline mode).
  3. Attempt to submit a vote.
  4. AC3: Confirm the dialog does not stay in an infinite loading state.

  1. AC4: Confirm an error message about network connectivity is displayed.

See AC3

GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.