Skip to content

Improve experience when using Codespaces #111

@andreamah

Description

@andreamah

Currently, as mentioned in #58, the embedded preview will not immediately work in Codespaces upon first launching (or sometimes just upon forwarding a port). This is because the content at the local address is not actually available until the user goes through some redirects in their browser. Since one of these redirects is github.com and github can't be framed in an iframe, it shows an error.

There isn't a way to see whether this failure happened from the extension side, so it's difficult to implement some type of fix upon failure.

Without help from the GitHub side in regards to detecting whether these redirects have happened and no way to perform the redirects programmatically, we could probably do something like:

  • Upon port forwarding, show an info message containing a link to tell you how to get around the issue OR a button that runs the open external preview command immediately. There should be a "don't show again" on this and perhaps some info on how to fix the issue yourself. However, I'm not too sure if there's currently an API to show a warning message, as PortAttributes does not seem to support this.

In the most ideal case, we would have a way to programmatically trigger the redirects, although they are most likely there for a reason (security, cookies).

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions