Skip to content
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

Task reconnection status does not work for default build task #159639

Closed
bpasero opened this issue Aug 31, 2022 · 8 comments · Fixed by #163598 or #165110
Closed

Task reconnection status does not work for default build task #159639

bpasero opened this issue Aug 31, 2022 · 8 comments · Fixed by #163598 or #165110
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders papercut 🩸 A particularly annoying issue impacting someone on the team tasks Task system issues verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Aug 31, 2022

Recording 2022-08-31 at 08 20 47

I urge to selfhost on this for a bit. Status bar never shows the state for me, I think never has after window reload.

@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Aug 31, 2022
@bpasero bpasero added the papercut 🩸 A particularly annoying issue impacting someone on the team label Aug 31, 2022
@bpasero bpasero changed the title Task reconnection does not work for default build task Task reconnection status does not work for default build task Aug 31, 2022
@meganrogge
Copy link
Contributor

how often do you see this? I've tried a lot to repro and haven't seen it yet.

If you see it often, could you pls turn on trace logging?

@meganrogge meganrogge added info-needed Issue requires more information from poster tasks Task system issues labels Sep 1, 2022
@bpasero
Copy link
Member Author

bpasero commented Sep 2, 2022

@meganrogge here are my steps that should allow you to reproduce:

  • run code-insiders from an empty fresh --user-data-dir
  • open vscode folder
  • hit Cmd+Shift+B
  • notice the task bar showing 2 tasks and "Building..."
  • reload the window
  • notice the status bar not showing those entries

In your case, you likely have terminals panel visible, but I never have terminals visible typically.

@meganrogge
Copy link
Contributor

Thanks @bpasero when you eventually do open the panel, do the statuses appear? I think I saw what you describe but upon opening the panel, the statuses appeared

@meganrogge
Copy link
Contributor

meganrogge commented Sep 8, 2022

I can repro the statuses not appearing in the status bar until I open the panel

@meganrogge meganrogge removed the info-needed Issue requires more information from poster label Sep 8, 2022
@meganrogge
Copy link
Contributor

meganrogge commented Sep 8, 2022

that's because the tasks aren't reconnected to until the terminals are restored, which doesn't happen when the panel is hidden

this._terminalService.initializeTerminals();

this._register(this.onDidChangeBodyVisibility(async visible => {
this._viewShowing.set(visible);
if (visible) {
const hadTerminals = !!this._terminalGroupService.groups.length;
// Ensure the primary backend is registered as it's important to do before
// initializeTerminals is called.
await this._terminalService.primaryBackendRegistered;
if (this._terminalService.isProcessSupportRegistered) {
if (this._terminalsInitialized) {
if (!hadTerminals) {
this._terminalService.createTerminal({ location: TerminalLocation.Panel });
}
} else {
this._terminalsInitialized = true;
this._terminalService.initializeTerminals();
}
} else {
this._onDidChangeViewWelcomeState.fire();
}
// we don't know here whether or not it should be focused, so
// defer focusing the panel to the focus() call
// to prevent overriding preserveFocus for extensions
this._terminalGroupService.showPanel(false);
} else {
for (const instance of this._terminalGroupService.instances) {
instance.resetFocusContextKey();
}

@bpasero
Copy link
Member Author

bpasero commented Sep 8, 2022

Yes, in all my issues with this, panel is never opened on startup. I typically keep it closed always.

@Tyriar Tyriar added this to the September 2022 milestone Sep 13, 2022
meganrogge added a commit that referenced this issue Oct 6, 2022
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Oct 18, 2022
@sandy081 sandy081 added the verification-found Issue verification failed label Oct 27, 2022
@sandy081 sandy081 reopened this Oct 27, 2022
@vscodenpa vscodenpa removed the insiders-released Patch has been released in VS Code Insiders label Oct 27, 2022
@sandy081
Copy link
Member

I do not think it is working as expected.

  • I see the terminal is shown automatically after reload (even if I have it closed before reload)
  • Status bar does not show the tasks info
  • I do not see the building (progress icon) on the tasks in the terminal

Please see the recording

Kapture.2022-10-27.at.15.57.45.mp4

@meganrogge meganrogge removed this from the October 2022 milestone Oct 27, 2022
@jeanp413
Copy link
Contributor

jeanp413 commented Nov 1, 2022

Created a PR fixing this #165110

meganrogge added a commit that referenced this issue Nov 1, 2022
@meganrogge meganrogge removed the verification-found Issue verification failed label Nov 1, 2022
meganrogge added a commit that referenced this issue Nov 1, 2022
…165110)

Fixes #159639

Co-authored-by: Megan Rogge <merogge@microsoft.com>
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Nov 1, 2022
@bpasero bpasero added the verified Verification succeeded label Nov 30, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders papercut 🩸 A particularly annoying issue impacting someone on the team tasks Task system issues verified Verification succeeded
Projects
None yet
6 participants