Description
In a C# Command Palette extension, I need to update the Markdown details pane asynchronously for the currently selected result. This is needed for non-blocking details such as loaded images, rich web details, or streamed AI answers.
IDetails can implement INotifyPropChanged and raise PropChanged for Body, but the visible details pane does not update live. The user has to move selection to another item and come back to see the new Markdown.
A workaround is to rebuild the list and call RaiseItemsChanged() when the details content changes. That does refresh the details pane, but it resets the selected result / scroll position back to the first item, which is disruptive while the user is navigating results.
Expected behavior
There should be a supported way for an extension to refresh the details pane for the currently focused item without rebuilding the full list and without resetting selection/scroll.
Possible fixes could be:
- make
IDetails.Body observable when IDetails implements INotifyPropChanged, or
- expose an API to invalidate/refresh the currently focused details pane, or
- preserve selection and scroll when a list refresh replaces equivalent items.
Actual behavior
- Updating
IDetails.Body and raising PropChanged(nameof(Body)) does not update the visible Markdown pane live.
- Replacing details through a list rebuild updates the pane, but Command Palette jumps back to the first item.
Repro outline
- Create a
DynamicListPage with results that have a custom IDetails implementation.
- Return an initial
Body, then update it later from an async operation.
- Raise
PropChanged for Body.
- Observe that the visible details pane does not update until selection changes.
- Add a workaround that rebuilds list items and calls
RaiseItemsChanged().
- Observe that the details pane updates, but the selected item / scroll position is reset.
Related issue
This is related to #39216, but the remaining problem is the practical workaround: rebuilding the list forces the live update but breaks navigation state.
Impact
Async/lazy details are important for Command Palette extensions because search results should stay fast. Extensions should be able to show immediate results first, then update the details pane later without causing list navigation resets.
Description
In a C# Command Palette extension, I need to update the Markdown details pane asynchronously for the currently selected result. This is needed for non-blocking details such as loaded images, rich web details, or streamed AI answers.
IDetailscan implementINotifyPropChangedand raisePropChangedforBody, but the visible details pane does not update live. The user has to move selection to another item and come back to see the new Markdown.A workaround is to rebuild the list and call
RaiseItemsChanged()when the details content changes. That does refresh the details pane, but it resets the selected result / scroll position back to the first item, which is disruptive while the user is navigating results.Expected behavior
There should be a supported way for an extension to refresh the details pane for the currently focused item without rebuilding the full list and without resetting selection/scroll.
Possible fixes could be:
IDetails.Bodyobservable whenIDetailsimplementsINotifyPropChanged, orActual behavior
IDetails.Bodyand raisingPropChanged(nameof(Body))does not update the visible Markdown pane live.Repro outline
DynamicListPagewith results that have a customIDetailsimplementation.Body, then update it later from an async operation.PropChangedforBody.RaiseItemsChanged().Related issue
This is related to #39216, but the remaining problem is the practical workaround: rebuilding the list forces the live update but breaks navigation state.
Impact
Async/lazy details are important for Command Palette extensions because search results should stay fast. Extensions should be able to show immediate results first, then update the details pane later without causing list navigation resets.