fix: stabilize settings tree and also fixes during startup to stop ghost scrolls from early extension registrations.#278931
Conversation
…ost scrolls from early extension registrations.
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @rzhao271Matched files:
|
|
@microsoft-github-policy-service agree |
Update search result model and refresh settings tree on changes.
|
Sry to bother you @rzhao271, What are your reviews on this ? |
|
No problem. I plan to take a look on Monday. |
|
When trying Ben's steps from the original issue, I now see the following error: I'll check whether that issue also shows up before this PR. Feel free to also take a look in the meantime. Edit: Even though there's no more console error upon selecting another table of contents entry thanks to the hasElement check, the settings list still fails to scroll to that entry. I'd prefer that the fix also resolves the desync issue itself. |
|
@rzhao271 will be committing a fix it soon |
Enhance settings tree element handling by searching for equivalent old objects when the current element is not found. This includes a recursive search through the tree nodes to reveal the appropriate element.
|
Sorry for that PR, and wasting your time. I was so distracted by ghost scrolling that might have overlooked the required fix. Thank you for your time Screen.Recording.2025-12-02.at.10.30.12.AM.mov |
|
Hey @rzhao271, Just a quick check-in is this ready for review? I appreciate you taking the time to look at it. Thanks, |
|
Hi Kanishk, The team is currently working on housekeeping. I would like to take a look in January if that works for you. Thanks, |
|
Hi rzhao271, Yes, of course !! Best, |
|
Ref #145589 |
src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts
Outdated
Show resolved
Hide resolved
rzhao271
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the fix!
Fixes #277787
This PR fixes a crash in the Settings UI triggered when interacting with the Editor: Default Formatter dropdown while VS Code is still discovering extensions during startup.
The issue occurs because this dropdown dynamically updates its schema as new formatters become available, causing repeated Settings Tree rebuilds. During this “startup storm,” the TOC (sidebar) and Main Settings Tree enter a feedback loop where they exchange stale element references.
while working on this I noticed that the Settings Editor viewport often drifts or jumps (usually by ~38px) when extensions load or configuration schemas update in the background
I implemented a scroll anchoring mechanism within onConfigUpdate to stabilize the view:
GhostScroll.mov