Page MenuHomePhabricator

WikimediaBackend ignores the last change to "backend" dropdown
Closed, ResolvedPublicBUG REPORT

Description

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

  • Open popup.
  • Select backend (leave state to "Off").
  • Close popup.
  • Reopen popup.
  • Actual: Choice lost.
  • Expected: Choice remembered.

Another way:

  • Open popup.
  • Turn state to "On", then select a backend.
  • Close popup.
  • Reopen popup.
  • Actual: Choice lost.
  • Expected: Choice remembered.

Another way:

  • Open popup.
  • Turn state to "On".
  • Close popup.
  • Reopen popup.
  • Select a backend.
  • Close popup.
  • Reopen popup.
  • Actual: Choice lost.
  • Expected: Choice remembered.

The initial state has backend: null, which means the condition here skipped adding a 'change' event listener to the backend dropdown menu. So, when opening the popup, no matter what backend you select, it doesn't send a message to the background process, and thus it doesn't won't be used or remembered.

It is not completely broken, though, so long as you select your backend before toggling the main switch to "On", then that interaction will send a message, and that later message will contain the complete state, including the selected backend.

But, if you toggle it "On" first and then select your backend, it will actually use the first/default of k8s-mwdebug instead of your selected backend. Which isn't obvious since you don't generally re-open the popup after that. Except you'll see that when you open it again afterward the selection has seemingly gone back to the default, but in fact was never applied in the first place. Even before you "discover" the value going back to the default, it was still internally always the default.

Event Timeline

Change #1149824 had a related patch set uploaded (by Krinkle; author: Krinkle):

[performance/WikimediaDebug@master] popup: Fix forgetful "backend" dropdown

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

Change #1149825 had a related patch set uploaded (by Krinkle; author: Krinkle):

[performance/WikimediaDebug@master] Add debug instrumentation

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

Change #1149824 merged by jenkins-bot:

[performance/WikimediaDebug@master] popup: Fix forgetful "backend" dropdown

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

Change #1149825 merged by jenkins-bot:

[performance/WikimediaDebug@master] Add debug instrumentation

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

Change #1151696 had a related patch set uploaded (by Hashar; author: Hashar):

[performance/WikimediaDebug@master] v3.1.0: Update changelog

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

Change #1151696 merged by jenkins-bot:

[performance/WikimediaDebug@master] v3.1.0: Update changelog

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

Krinkle claimed this task.

Mentioned in SAL (#wikimedia-releng) [2025-05-29T22:11:58Z] <bd808> Submitted WikimediaDebug v3.1.0 to Chrome Web Store for review (T395190, T315111)

Mentioned in SAL (#wikimedia-releng) [2025-05-29T22:18:08Z] <bd808> Submitted WikimediaDebug v3.1.0 to addons.mozilla.org for review (T395190, T315111)

https://addons.mozilla.org/en-US/firefox/addon/wikimedia-debug-header/versions/ shows that version 3.1.0 is available.

I received an email about the approval yesterday afternoon (about 17 hours ago). I assumed that you would have received one too since you are an owner of the extensions and you initiated the submission.