-
Notifications
You must be signed in to change notification settings - Fork 37.9k
Fix question carousel reappearing after window reload #295007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
During deserialization, mark unused question carousels and confirmations as isUsed=true since the extension is no longer listening for responses after a reload. Without this fix, the _pendingInfo derived observable would find an unused carousel, reset the model state to NeedsInput, and cause the carousel to render as active again. Co-authored-by: meganrogge <[email protected]>
Co-authored-by: meganrogge <[email protected]>
|
Works! reload.mov |
a0b4f0d to
973a69a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a bug where question carousels and confirmations in chat responses reappear as interactive widgets after reloading the window. The issue occurred because deserialized responses with isUsed: false on these parts would trigger the _pendingInfo observable to reset the model state from Cancelled to NeedsInput, making the response appear incomplete.
Changes:
- Mark
questionCarouselandconfirmationresponse parts asisUsed: trueduring deserialization, since extensions are no longer listening after a reload - Add comprehensive tests for both question carousel and confirmation deserialization scenarios
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/common/model/chatModel.ts | Added logic in _deserializeRequest to mark interactive parts (questionCarousel and confirmation) as used after deserialization to prevent state reset |
| src/vs/workbench/contrib/chat/test/common/model/chatModel.test.ts | Added two test cases verifying that question carousels and confirmations are correctly marked as used during deserialization and that responses are complete |
After reloading the window, unused
questionCarouselparts in deserialized responses cause the_pendingInfoderived observable to reset the model state fromCancelledback toNeedsInput, makingisCompletereturnfalseand re-rendering the carousel as an active interactive widget.questionCarouselparts asisUsed = trueduring_deserializeRequest, since the extension is no longer listening for responses after a reloadWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
disallowed.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --crashpad-handler-pid=9667 --enable-crash-reporter=43d9cd5e-5107-4a33-947d-42ed92cf8610,no_channel --user-data-dir=/tmp/vscode-tests-1770924378572 --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8420567749569371929,3669952871162495567,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --trace-process-track-uuid=3190708989122997041 node_modules/.bi--inlineSources eSources false --sourceMap sh(dns block).build/electron/code-oss .build/electron/code-oss test/unit/electron/index.js --crash-reporter-directory=/home/REDACTED/work/vscode/vscode/.build/crashes src/vs/workbench/contrib/chat/test/common/model/chatModel.test.ts /opt�� ript-language-features/web/tsconfig.json --pretty false --sourceMap --inlineSources --project n/node eSources false --sourceMap node n/ts�� /vscode/vscode/efalse st-import-aid/ts--sourceMap ode eSources false(dns block)example.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --crashpad-handler-pid=9667 --enable-crash-reporter=43d9cd5e-5107-4a33-947d-42ed92cf8610,no_channel --user-data-dir=/tmp/vscode-tests-1770924378572 --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8420567749569371929,3669952871162495567,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --trace-process-track-uuid=3190708989122997041 node_modules/.bi--inlineSources eSources false --sourceMap sh(dns block).build/electron/code-oss .build/electron/code-oss test/unit/electron/index.js --crash-reporter-directory=/home/REDACTED/work/vscode/vscode/.build/crashes src/vs/workbench/contrib/chat/test/common/model/chatModel.test.ts /opt�� ript-language-features/web/tsconfig.json --pretty false --sourceMap --inlineSources --project n/node eSources false --sourceMap node n/ts�� /vscode/vscode/efalse st-import-aid/ts--sourceMap ode eSources false(dns block)mobile.events.data.microsoft.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --crashpad-handler-pid=9667 --enable-crash-reporter=43d9cd5e-5107-4a33-947d-42ed92cf8610,no_channel --user-data-dir=/tmp/vscode-tests-1770924378572 --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8420567749569371929,3669952871162495567,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --trace-process-track-uuid=3190708989122997041 node_modules/.bi--inlineSources eSources false --sourceMap sh(dns block).build/electron/code-oss .build/electron/code-oss test/unit/electron/index.js --crash-reporter-directory=/home/REDACTED/work/vscode/vscode/.build/crashes src/vs/workbench/contrib/chat/test/common/model/chatModel.test.ts /opt�� ript-language-features/web/tsconfig.json --pretty false --sourceMap --inlineSources --project n/node eSources false --sourceMap node n/ts�� /vscode/vscode/efalse st-import-aid/ts--sourceMap ode eSources false(dns block)redirector.gvt1.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --crashpad-handler-pid=7847 --enable-crash-reporter=43d9cd5e-5107-4a33-947d-42ed92cf8610,no_channel --user-data-dir=/tmp/vscode-tests-1770924099540 --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13890897903409096516,9502107667153939566,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --trace-process-track-uuid=3190708989122997041(dns block).build/electron/code-oss .build/electron/code-oss test/unit/electron/index.js --crash-reporter-directory=/home/REDACTED/work/vscode/vscode/.build/crashes src/vs/workbench/contrib/chat/test/common/model/chatModel.test.ts --grep deserialization marks unused(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --crashpad-handler-pid=9485 --enable-crash-reporter=43d9cd5e-5107-4a33-947d-42ed92cf8610,no_channel --user-data-dir=/tmp/vscode-tests-1770924361045 --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,2961030899437313286,2199298086106852755,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --trace-process-track-uuid=3190708989122997041 node_modules/.bi--inlineSources(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.