Page MenuHomePhabricator

AbuseFilter editor shifts off-screen when using long lines of code with line wrap disabled
Open, Needs TriagePublicBUG REPORT

Description

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

  • Ensure line wrapping is enabled (should be the default in AbuseFilter since T399673)
  • Open a filter containing a long line of code, such as itwiki's filter 795 (or the original enwiki's filter 793)
  • Press Ctrl +Shift+,
  • Uncheck "Wrap lines"

What happens?:

The editor apparently disappears, leaving a blank page. It actually shifted far to the right side of the screen, as better noticeable when zooming out a few times (Ctrl + -)

What should have happened instead?:

Edit window should remain visible.

Event Timeline

I think a temporary workaround is to lock the preference of line wrapping (and perhaps add a horizontal resizability so users can have a wider editor and less line wrapping if that is desired).

@MusikAnimal This looks like a severe bug that we may want to handle quickly.

Change #1275243 had a related patch set uploaded (by Bhsd; author: Bhsd):

[mediawiki/extensions/AbuseFilter@master] ext.abuseFilter.edit.js: temporary locking of CodeMirror lineWrapping

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

Possibly should be UBN.

Change #1275512 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/AbuseFilter@master] ext.abuseFilter.edit: rework CodeMirror integration

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

Change #1275243 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] ext.abuseFilter.edit.js: temporary locking of CodeMirror lineWrapping

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

Change #1275760 had a related patch set uploaded (by MusikAnimal; author: Bhsd):

[mediawiki/extensions/AbuseFilter@wmf/1.46.0-wmf.24] ext.abuseFilter.edit.js: temporary locking of CodeMirror lineWrapping

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

Change #1275760 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@wmf/1.46.0-wmf.24] ext.abuseFilter.edit.js: temporary locking of CodeMirror lineWrapping

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

Mentioned in SAL (#wikimedia-operations) [2026-04-21T08:10:52Z] <musikanimal@deploy1003> Started scap sync-world: Backport for [[gerrit:1275760|ext.abuseFilter.edit.js: temporary locking of CodeMirror lineWrapping (T423773 T423756)]]

Mentioned in SAL (#wikimedia-operations) [2026-04-21T08:12:34Z] <musikanimal@deploy1003> musikanimal: Backport for [[gerrit:1275760|ext.abuseFilter.edit.js: temporary locking of CodeMirror lineWrapping (T423773 T423756)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-04-21T08:17:54Z] <musikanimal@deploy1003> Finished scap sync-world: Backport for [[gerrit:1275760|ext.abuseFilter.edit.js: temporary locking of CodeMirror lineWrapping (T423773 T423756)]] (duration: 07m 01s)

MusikAnimal raised the priority of this task from High to Needs Triage.Tue, Apr 21, 6:43 PM

Hotfix deployed so the issue is not as pressing now. A more permanent fix, and one that allows disabling line wrapping, is still in-progress.