Skip to content

feat(desktop): default UI backend to webview#35442

Merged
bartlomieju merged 1 commit into
mainfrom
feat/desktop-webview-default
Jun 23, 2026
Merged

feat(desktop): default UI backend to webview#35442
bartlomieju merged 1 commit into
mainfrom
feat/desktop-webview-default

Conversation

@bartlomieju

Copy link
Copy Markdown
Member

Changes the default UI backend for the deno desktop subcommand from
cef to webview. The CLI default value and the runtime fallbacks in
the macOS, Linux, and Windows packaging paths are all updated, matching
the backend already used by the HMR/inspector path.

The documentation at https://docs.deno.com/runtime/desktop/backends/
already states that webview is the default, but a bare deno desktop
invocation was pulling CEF from GitHub and building the app with CEF
instead. This aligns the implementation with the documented behaviour.

Added unit tests covering the new default and explicit --backend
selection.

Closes #35433

Changes the default backend for the `deno desktop` subcommand from cef
to webview. The CLI default value and the macOS, Linux, and Windows
packaging fallbacks are all updated, matching the backend already used by
the HMR/inspector path.
@bartlomieju
bartlomieju merged commit a4d902c into main Jun 23, 2026
136 checks passed
@bartlomieju
bartlomieju deleted the feat/desktop-webview-default branch June 23, 2026 11:11
Tsudrat added a commit to Tsudrat/deno that referenced this pull request Jul 6, 2026
The `--backend` flag had `default_value("webview")`, so
`desktop_flags.backend` was always `Some("webview")` even when the
flag wasn't passed. This defeated the config merge in `desktop()`
(whose condition is `desktop_flags.backend.is_none()`), so
`desktop.backend` in deno.json could never take effect — only the
CLI flag worked.

Drop the `default_value` so the flag is `None` when absent, letting
the existing merge apply the priority chain:

  CLI --backend  >  deno.json desktop.backend  >  webview

Extract the merge into a pure `apply_desktop_config_to_flags` helper
and add unit tests covering the chain. Update `desktop_backend_default`
to expect `None` when the flag is absent.

Regression from denoland#35442 (which fixed denoland#35433).

Co-Authored-By: GLM-5.2 <[email protected]>
Signed-off-by: Tsudrat <[email protected]>
Tsudrat added a commit to Tsudrat/deno that referenced this pull request Jul 6, 2026
The `--backend` flag had `default_value("webview")`, so
`desktop_flags.backend` was always `Some("webview")` even when the
flag wasn't passed. This defeated the config merge in `desktop()`
(whose condition is `desktop_flags.backend.is_none()`), so
`desktop.backend` in deno.json could never take effect — only the
CLI flag worked.

Drop the `default_value` so the flag is `None` when absent, letting
the existing merge apply the priority chain:

  CLI --backend  >  deno.json desktop.backend  >  webview

Extract the merge into a pure `apply_desktop_config_to_flags` helper
and add unit tests covering the chain. Update `desktop_backend_default`
to expect `None` when the flag is absent.

Regression from denoland#35442 (which fixed denoland#35433).

Co-Authored-By: GLM-5.2 <[email protected]>
Signed-off-by: Tsudrat <[email protected]>
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 this pull request may close these issues.

Default deno desktop backend is CEF, contradicting docs

1 participant