Skip to content

Commit 9fbbf06

Browse files
committed
feat: support configurable web terminal rendering
- Added a deployment option for configuring web terminal rendering. Valid values are 'webgl', 'canvas', and 'dom'.
1 parent eb4826a commit 9fbbf06

File tree

13 files changed

+61
-10
lines changed

13 files changed

+61
-10
lines changed

cli/testdata/coder_server_--help.golden

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ Clients include the coder cli, vs code extension, and the web UI.
6666
--ssh-hostname-prefix string, $CODER_SSH_HOSTNAME_PREFIX (default: coder.)
6767
The SSH deployment prefix is used in the Host of the ssh config.
6868

69+
--web-terminal-renderer string, $CODER_WEB_TERMINAL_RENDERER (default: webgl)
70+
The framework to use when rendering the terminal. Valid values are
71+
'canvas', 'webgl', or 'dom'.
72+
6973
CONFIG OPTIONS:
7074
Use a YAML configuration file when your server launch become unwieldy.
7175

cli/testdata/server-config.yaml.golden

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,10 @@ client:
411411
# incorrectly can break SSH to your deployment, use cautiously.
412412
# (default: <unset>, type: string-array)
413413
sshConfigOptions: []
414+
# The framework to use when rendering the terminal. Valid values are 'canvas',
415+
# 'webgl', or 'dom'.
416+
# (default: webgl, type: string)
417+
webTerminalRenderer: webgl
414418
# Support links to display in the top right drop down menu.
415419
# (default: <unset>, type: struct[[]codersdk.LinkConfig])
416420
supportLinks: []

coderd/apidoc/docs.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codersdk/deployment.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ type DeploymentValues struct {
180180
ProxyHealthStatusInterval clibase.Duration `json:"proxy_health_status_interval,omitempty" typescript:",notnull"`
181181
EnableTerraformDebugMode clibase.Bool `json:"enable_terraform_debug_mode,omitempty" typescript:",notnull"`
182182
UserQuietHoursSchedule UserQuietHoursScheduleConfig `json:"user_quiet_hours_schedule,omitempty" typescript:",notnull"`
183+
WebTerminalRenderer clibase.String `json:"web_terminal_renderer,omitempty" typescript:",notnull"`
183184

184185
Config clibase.YAMLConfigPath `json:"config,omitempty" typescript:",notnull"`
185186
WriteConfig clibase.Bool `json:"write_config,omitempty" typescript:",notnull"`
@@ -1761,7 +1762,18 @@ Write out the current server config as YAML to stdout.`,
17611762
Group: &deploymentGroupUserQuietHoursSchedule,
17621763
YAML: "defaultQuietHoursSchedule",
17631764
},
1765+
{
1766+
Name: "Web Terminal Renderer",
1767+
Description: "The framework to use when rendering the terminal. Valid values are 'canvas', 'webgl', or 'dom'.",
1768+
Flag: "web-terminal-renderer",
1769+
Env: "CODER_WEB_TERMINAL_RENDERER",
1770+
Default: "webgl",
1771+
Value: &c.WebTerminalRenderer,
1772+
Group: &deploymentGroupClient,
1773+
YAML: "webTerminalRenderer",
1774+
},
17641775
}
1776+
17651777
return opts
17661778
}
17671779

docs/api/general.md

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/schemas.md

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/cli/server.md

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enterprise/cli/testdata/coder_server_--help.golden

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ Clients include the coder cli, vs code extension, and the web UI.
6767
--ssh-hostname-prefix string, $CODER_SSH_HOSTNAME_PREFIX (default: coder.)
6868
The SSH deployment prefix is used in the Host of the ssh config.
6969

70+
--web-terminal-renderer string, $CODER_WEB_TERMINAL_RENDERER (default: webgl)
71+
The framework to use when rendering the terminal. Valid values are
72+
'canvas', 'webgl', or 'dom'.
73+
7074
CONFIG OPTIONS:
7175
Use a YAML configuration file when your server launch become unwieldy.
7276

site/src/AppRouter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ export const AppRouter: FC = () => {
338338
{/* Terminal and CLI auth pages don't have the dashboard layout */}
339339
<Route
340340
path="/:username/:workspace/terminal"
341-
element={<TerminalPage renderer="webgl" />}
341+
element={<TerminalPage />}
342342
/>
343343
<Route path="cli-auth" element={<CliAuthenticationPage />} />
344344
</Route>

0 commit comments

Comments
 (0)