The shell expands ~ in command-line arguments, but values read from
config.yaml were passed to path.resolve as-is, so
`user-data-dir: ~/.config/code-server-data` resolved to
`<cwd>/~/.config/code-server-data`.
Options like `enable-remote-storage: false` in config.yaml are converted to
`--enable-remote-storage=false`, but the parser set any boolean option to
true regardless of its value. Booleans set to false are now ignored, the
same way optional strings set to false already are.
* Update Code to 1.139.1
* Bump proxy-addr to 2.0.8
* Add preinstall setup to build
Already had this in the release build step, not sure why it is not in
the main build step. But we started getting errors building native
modules in ci, and this seems to be why.
* Fix quick input
It types too quickly, before the input is visible.
The lower bound check ran before the parser had resolved the value, so it
only saw a value with the --idle-timeout-seconds=<value> form. With the
space-separated form the value was still undefined at that point,
Number(undefined) is NaN, and NaN <= 60 is false, so anything got through.
Move the check below the block that pulls the value from the next
argument so both forms are validated the same way.
* Update Code to 1.136.1
* Do not click on tab during test file opens
It will already be the selected tab, and if any other tab is already
open (like the welcome tab), it will click that instead.
We disable the welcome page so this is not supposed to actually matter,
but that Setting appears not to be working.
Also add the quick input widget selector in the disabled downloads test,
since if the widget never shows up it would mistakenly pass.
We use the cookie parser to remove the code-server token but by default
it encodes using encodeURIComponent, which encodes more than is strictly
necessary and can break proxied applications.
Now we pass the cookies through unchanged (other than removing the
code-server token).
Fixes#7927.
- Get rid of the global isActive mock; in particular the way it shadows
local ones seemed sketchy.
- No need for requireActual from my testing.
- Reword the comment for why we need setImmediate.
- Add the setImmediate to another test that seemed to only pass because
of an await on the timer call which is not actually a promise but had
the side effect of yielding.
- Always set fake/real timers in the before/after handlers and never in
individual tests.
Since this functionality requires information placed onto the request by
code-server (req.args) and Express (req.cookies), move the standalone
tests into the integration tests as the proxy can no longer run
correctly on its own without that context.
We could strip the header elsewhere or refactor in some way (pass in a
callback function for the stripping or something) but this seems like
the simplest and safest place at the moment to ensure we catch all uses
of the proxy.
In any case, I think it does lend more confidence to know we are testing
the proxy the way it will be used in practice. The downside is some
additional complexity when setting up tests, but at the moment I do not
think that exchange is overly burdensome.
* Update Code to 1.116.0
* Add copilot extension build
Seems the vscode build requires this separately now.
* Disable welcome popup
A giant modal window asking you to sign in for AI features is blocking
the tests. Rather than have to click through it, disable it. It looks like
this has to be a user setting, so switch to that instead of machine (we
used machine because user settings were in the browser, but they have
been since moved back to disk).
---------
Co-authored-by: Asher <ash@coder.com>
* feat: expose --reconnection-grace-time CLI flag
Pass through VS Code Server's --reconnection-grace-time argument,
allowing users to configure how long the server waits for a
disconnected client to reconnect before cleaning up the session.
This is useful for users whose client machines sleep overnight, causing
the default 3-hour grace period to expire and forcing a "Reload Window"
on wake. The flag can also be set via CODE_SERVER_RECONNECTION_GRACE_TIME
env var or in config.yaml.