Skip to content

Optionally open last used folder #241

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

Closed
Tracked by #255
stirby opened this issue Apr 17, 2024 · 5 comments · Fixed by coder/modules#248
Closed
Tracked by #255

Optionally open last used folder #241

stirby opened this issue Apr 17, 2024 · 5 comments · Fixed by coder/modules#248
Assignees

Comments

@stirby
Copy link
Contributor

stirby commented Apr 17, 2024

A customer requested that we add an option to open the last used directory in VSCode, rather than the one configured by the agent.

If VSCode desktop is configured without the folder, it should default to the last-used directory. However, if the coder_agent is given a default directory to use for ssh connections, this will override that behavior.

It would be nice if in the terraform provider we could explicitly enforce opening the last-used directory.

We want to mimic the desktop behavior as closely as possible.

resource "coder_app" "vscode" {
  agent_id     = agent_id
  icon         = "/icon/code.svg"
  slug         = "vscode"
  display_name = "VS Code Desktop"
  order        = var.order
  ...
  open_recent = true # defaults to false
}
@kylecarbs
Copy link
Member

Good idea

@bpmct
Copy link
Member

bpmct commented Apr 23, 2024

This would be huge!

@code-asher
Copy link
Member

code-asher commented May 15, 2024

I added it to the VS Code desktop app module, do note though that it will not affect the builtin VS Code desktop app since we expose no options for configuring that. At least, I think?

Does that seem sufficient or do you think we might need a way to configure this for the built-in app? Or make opening recent the default for the built-in app?

Ideal is to move people to the module if they need configuration, I think.

@stirby
Copy link
Contributor Author

stirby commented May 20, 2024

@code-asher that's great. I agree we should direct customers to the registry when possible.

However, the requesting customer can't use our modules (airgapped), so we'd have to support something in the built-in app too. I initially imagined adding a new field under display_apps in coder_agent; I now realize that's not possible.

We should just make opening recent the default for the built-in app.

Ideal behaviour:

  • First connection uses the ssh folder configured in the agent
  • Subsequent connections use last-used folder

Again, rationale is emulating local VSCode.

@code-asher
Copy link
Member

code-asher commented May 20, 2024

Sounds good, I will just make it the default! Seems pretty reasonable to me anyway, especially since the built-in has no way to configure a separate folder from the agent.

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 a pull request may close this issue.

5 participants