Skip to content

Commit 02c2622

Browse files
fix(server): expand Linux browser launch candidates (NeuralNomadsAI#475)
## Summary - Expands Linux `--launch` browser discovery for Brave and Vivaldi package variants (`brave-browser-stable`, `brave`, `vivaldi-stable`). - Adds snap path candidates for Brave and Vivaldi plus Flatpak launch commands. - Adds `xdg-open` as the final fallback when direct browser app-mode launch candidates are unavailable. ## Validation - Attempted `npm run typecheck --workspace @neuralnomads/codenomad`, but it failed before checking this change because the worktree is missing the `node` type definitions (`TS2688: Cannot find type definition file for 'node'`). Fixes NeuralNomadsAI#469 -- Yours, [CodeNomadBot](https://github.com/NeuralNomadsAI/CodeNomad) --------- Co-authored-by: Shantur Rathore <i@shantur.com>
1 parent 02860e1 commit 02c2622

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

packages/server/src/launcher.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,20 @@ function buildLinuxCandidates(): BrowserCandidate[] {
143143
"chromium",
144144
"chromium-browser",
145145
"brave-browser",
146+
"brave-browser-stable",
147+
"brave",
148+
"/snap/bin/brave",
146149
"microsoft-edge",
147150
"microsoft-edge-stable",
148151
"vivaldi",
152+
"vivaldi-stable",
153+
"/snap/bin/vivaldi",
149154
]
150155

151-
return names.map((name) => ({ name, command: name, args: APP_ARGS }))
156+
return [
157+
...names.map((name) => ({ name, command: name, args: APP_ARGS })),
158+
{ name: "xdg-open", command: "xdg-open", args: (url: string) => [url] },
159+
]
152160
}
153161

154162
function buildMacManualExamples(url: string) {
@@ -172,6 +180,9 @@ function buildLinuxManualExamples(url: string) {
172180
`google-chrome --app="${url}" --new-window`,
173181
`chromium --app="${url}" --new-window`,
174182
`brave-browser --app="${url}" --new-window`,
183+
`brave-browser-stable --app="${url}" --new-window`,
175184
`microsoft-edge --app="${url}" --new-window`,
185+
`vivaldi-stable --app="${url}" --new-window`,
186+
`xdg-open "${url}"`,
176187
]
177188
}

0 commit comments

Comments
 (0)