feat(desktop): default UI backend to webview#35442
Merged
Merged
Conversation
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.
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]>
This was referenced Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes the default UI backend for the
deno desktopsubcommand fromceftowebview. The CLI default value and the runtime fallbacks inthe 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 desktopinvocation 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
--backendselection.
Closes #35433