Problem/Motivation

applyReaderPreferences is a network operation that fetches fragments in batches of 50, kicked off from inside a BigPipe lazy-builder placeholder. A reader with depth: -1 and density: full first sees ~10 one-line subjects, then the whole layout is replaced seconds later with scroll drift. This is not a one-frame flash; it is a visible re-layout. Issue G covers focus and no-JS, not this.

There is also no way back to the site default. comment-thread.twig:28 offers only Apply, Cancel and Close, and selecting the injected configured value at comment-thread.js:1368 pins that value rather than restoring "follow site configuration". Stored preferences are origin-wide and permanent, so a reader who changes density once can never return to whatever the site builder configures later.

Steps to reproduce

  • Set reader preferences to a deeper/fuller view.
  • Reload; observe the initial summary-only render, then the full thread replacing it after a network round trip.

Proposed resolution

  • Apply the saved density and depth at server render time (from the saved preferences), so the first paint matches the reader's choice.
  • Otherwise, keep the placeholder minimal and avoid layout-shifting replacements.
  • Add a reset control to the reader-settings dialog that removes both localStorage keys (advancedCommentThreads.unreadOnly and advancedCommentThreads.reading) so the reader returns to following site configuration.

Remaining tasks

  • Verify the first paint matches the reader's saved preferences.

User interface changes

First paint matches the reader's saved density and depth.

API changes

None anticipated.

Data model changes

None anticipated.

AI-Generated: Yes (Used Opus 5 and DeepSeek Flash to review and discover these issues)

Comments

freelock created an issue. See original summary.

  • freelock committed f085ee59 on 1.0.x
    fix: #3623182 Reader preferences apply only after first paint
    
freelock’s picture

Status: Active » Fixed

Fixed.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.