Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

After reloading the window, unused questionCarousel parts in deserialized responses cause the _pendingInfo derived observable to reset the model state from Cancelled back to NeedsInput, making isComplete return false and re-rendering the carousel as an active interactive widget.

  • Mark questionCarousel parts as isUsed = true during _deserializeRequest, since the extension is no longer listening for responses after a reload
  • Add tests for question carousel deserialization
// In _deserializeRequest, after modelState normalization:
if (raw.response) {
    for (const part of raw.response) {
        if (hasKey(part, { kind: true }) && part.kind === 'questionCarousel') {
            part.isUsed = true;
        }
    }
}

Warning

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
    • Triggering command: /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)
    • Triggering command: .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
    • Triggering command: /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)
    • Triggering command: .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
    • Triggering command: /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)
    • Triggering command: .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
    • Triggering command: /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)
    • Triggering command: .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)
    • Triggering command: /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

This section details on the original issue you should resolve

<issue_title>Reloading the window brings the question display back</issue_title>
<issue_description>https://github.com/user-attachments/assets/92c66d52-582d-4743-b22c-c35212a73541

</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 12, 2026 19:28
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]>
Copilot AI changed the title [WIP] Fix reloading the window to prevent question display Fix question carousel reappearing after window reload Feb 12, 2026
Copilot AI requested a review from meganrogge February 12, 2026 19:34
@meganrogge meganrogge added this to the February 2026 milestone Feb 12, 2026
@meganrogge
Copy link
Collaborator

Works!

reload.mov

@meganrogge meganrogge marked this pull request as ready for review February 12, 2026 21:01
Copilot AI review requested due to automatic review settings February 12, 2026 21:02
@meganrogge meganrogge enabled auto-merge (squash) February 12, 2026 21:02
@meganrogge meganrogge force-pushed the copilot/fix-reloading-question-display branch from a0b4f0d to 973a69a Compare February 12, 2026 21:04
Copy link
Contributor

Copilot AI left a 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 questionCarousel and confirmation response parts as isUsed: true during 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reloading the window brings the question display back

2 participants