code-server icon indicating copy to clipboard operation
code-server copied to clipboard

Integrated Terminal does not open at startup and is not persistent on refresh

Open schettn opened this issue 1 year ago • 10 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: MacOS
  • Remote OS:
  • Remote Architecture:
  • code-server --version: 1.84.2 0c98611e6b43803a9d5dba222d7023b569abfb49 x64

Steps to Reproduce

  1. Open code-server in browser
  2. See that there is no integrated terminal open at startup
  3. Open a new terminal
  4. Reload window
  5. See that the terminal does not re-open.

Expected

  1. A integrated terminal should be opened on first load
  2. The terminal should persist on reloads.

Both points do work in to GitHub CodeSpaces.

Actual

Neither.

Logs

No response

Screenshot/Video

https://github.com/user-attachments/assets/45b0c27c-e310-4de8-a7f7-cf3b8bb3b7a2

Does this bug reproduce in native VS Code?

I did not test native VS Code

Does this bug reproduce in GitHub Codespaces?

No, this works as expected in GitHub Codespaces

Are you accessing code-server over a secure context?

  • [X] I am using a secure context.

Notes

With "persisted" I do not mean the terminal sessions but the persistence of of the opening state.

schettn avatar Jul 24 '24 07:07 schettn

Codespaces:

https://github.com/user-attachments/assets/9afdf37f-c80f-4be9-8af1-80b812c18f37

schettn avatar Jul 24 '24 08:07 schettn

1.84.2 is a bit old (Codespaces is running 1.91.1), does this persist on code-server 4.91.1?

code-asher avatar Jul 24 '24 21:07 code-asher

I installed coder just recently by following https://coder.com/docs/install.

I thought that I am on the latest version. How can I check the version of code-server?

coder version
Coder v2.13.0+56bf386 Tue Jul  2 17:54:06 UTC 2024
https://github.com/coder/coder/commit/56bf386b15128c986ad4172c1932c13bed626d58

Full build of Coder, supports the  server  subcommand.

schettn avatar Jul 25 '24 06:07 schettn

code-server --version: 1.84.2 https://github.com/coder/code-server/commit/0c98611e6b43803a9d5dba222d7023b569abfb49 x64

What is the use for this commit hash? According to the commit I am on v4.91.1, don't I?

schettn avatar Jul 25 '24 06:07 schettn

Your is on v4.19.1-rc.2 (19, not 91).

Coder and code-server are two separate unrelated products (although they are often used together), looks like you have the latest version of Coder but not the latest version of code-server.

code-asher avatar Jul 25 '24 16:07 code-asher

I could not figure out how to update this because I am on the latest coder version and I thought that coder updates code-server.

Now I figured out that the code-server version is specified in the terraform file of the template. It seems like your docker getting-started template use an old version of code-server.

image

schettn avatar Jul 26 '24 09:07 schettn

Oh! Yeah you are right. I will update the template, thank you for pointing that out.

code-asher avatar Jul 26 '24 17:07 code-asher

https://github.com/coder/coder/pull/14030

code-asher avatar Jul 26 '24 18:07 code-asher

@code-asher Do you know a way to open up the terminal the first time after the workspace is created?

schettn avatar Aug 05 '24 09:08 schettn

I am not sure if you can do it only the first time, but it might work to use tasks.json, for example:

{
  "version": "2.0.0",
  "tasks": [{
    "label": "open terminal on folder open",
    "command": "${command:workbench.action.terminal.toggleTerminal}",
    "runOptions": {
      "runOn": "folderOpen"
    }
  }]
}

code-asher avatar Aug 06 '24 17:08 code-asher

Closing for now but let me know if you come back to this and it reproduces in the latest version.

code-asher avatar Sep 19 '24 19:09 code-asher