Files
openchamber/packages/ui/src/lib/openInApps.ts
T
18b58bdb6b feat(desktop): Linux AppImage releases and desktop feature parity (#2398)
* feat(electron): add Linux AppImage releases

* ci: cache Linux OpenCode CLI artifacts

* fix(ci): await Linux release inventory check

* fix(electron): add frameless window controls on Linux desktop

Linux AppImages were created without native WM decorations and without
in-app controls, leaving users unable to close the window with a mouse.

Treat Linux like Windows: frameless BrowserWindow plus the existing
WindowsWindowControls header buttons and app-menu entry. macOS keeps
hidden title bar with traffic lights unchanged.

Shared usesFramelessElectronChrome() helper drives main window, mini
chat, header insets, and titlebar controls.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

* Linux desktop feature parity: Open in, background start, tray, multi-window (#2392)

* feat(electron): Linux parity for Open in, background start, and tray

Enable Linux desktop feature parity with macOS/Windows: open projects in
the default file manager and discovered apps, XDG autostart with
--background launches, system tray (including minimize-to-tray), and
tray sync from the renderer.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

* fix(electron): allow packaged UI protocol navigations on Linux

Prevent openchamber-ui:// navigations from being handed to
shell.openExternal, which fails on Linux and blocked desktop UI flows.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

* fix(ui): surface Linux tray settings in settings search

Include isLinux in settings search runtime context so minimize-to-tray
is discoverable on Linux desktop, matching Windows search behavior.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

* fix(electron): stop Linux AppImage Waiting-for-OpenCode flicker

Sync updated boot-outcome init scripts to all BrowserWindows after
desktop_hosts_set, and prefer state.initScript on dom-ready so chooser
reloads inject local/ok instead of a stale not-configured outcome.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

* fix(desktop): restore Linux AppImage updater feed and error UX (#2396)

Treat missing latest-linux*.yml (404) as no update available instead of a
hard failure, and stop swallowing updater capability/download errors in the
desktop bridge so About/sidebar can show actionable messages.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

* docs: credit Linux AppImage contributors in changelog

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

---------

Co-authored-by: jibanez-staticduo <staticduo@gmail.com>
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-07-24 09:59:32 +03:00

61 lines
2.4 KiB
TypeScript

export type OpenInApp = {
id: string;
label: string;
appName: string;
};
export const OPEN_IN_APPS: OpenInApp[] = [
{ id: 'finder', label: 'Finder', appName: 'Finder' },
{ id: 'terminal', label: 'Terminal', appName: 'Terminal' },
{ id: 'iterm2', label: 'iTerm2', appName: 'iTerm' },
{ id: 'ghostty', label: 'Ghostty', appName: 'Ghostty' },
{ id: 'vscode', label: 'VS Code', appName: 'Visual Studio Code' },
{ id: 'vscode-insiders', label: 'VS Code Insiders', appName: 'Visual Studio Code - Insiders' },
{ id: 'intellij', label: 'IntelliJ', appName: 'IntelliJ IDEA' },
{ id: 'visual-studio', label: 'Visual Studio', appName: 'Visual Studio' },
{ id: 'cursor', label: 'Cursor', appName: 'Cursor' },
{ id: 'android-studio', label: 'Android Studio', appName: 'Android Studio' },
{ id: 'pycharm', label: 'PyCharm', appName: 'PyCharm' },
{ id: 'xcode', label: 'Xcode', appName: 'Xcode' },
{ id: 'sublime-text', label: 'Sublime', appName: 'Sublime Text' },
{ id: 'webstorm', label: 'WebStorm', appName: 'WebStorm' },
{ id: 'rider', label: 'Rider', appName: 'Rider' },
{ id: 'zed', label: 'Zed', appName: 'Zed' },
{ id: 'phpstorm', label: 'PhpStorm', appName: 'PhpStorm' },
{ id: 'eclipse', label: 'Eclipse', appName: 'Eclipse' },
{ id: 'windsurf', label: 'Windsurf', appName: 'Windsurf' },
{ id: 'vscodium', label: 'VSCodium', appName: 'VSCodium' },
{ id: 'rustrover', label: 'RustRover', appName: 'RustRover' },
{ id: 'kiro', label: 'Kiro', appName: 'Kiro' },
{ id: 'antigravity', label: 'Antigravity', appName: 'Antigravity' },
{ id: 'trae', label: 'Trae', appName: 'Trae' },
];
export const DEFAULT_OPEN_IN_APP_ID = 'finder';
export const OPEN_IN_ALWAYS_AVAILABLE_APP_IDS = new Set(['finder', 'terminal']);
export const getPlatformOpenInApp = (app: OpenInApp): OpenInApp => {
if (typeof window === 'undefined') {
return app;
}
const platform = window.__OPENCHAMBER_PLATFORM__;
if (app.id === 'finder') {
if (platform === 'win32') {
return { ...app, label: 'Explorer', appName: 'File Explorer' };
}
if (platform === 'linux') {
return { ...app, label: 'File Manager' };
}
}
return app;
};
export const getOpenInAppById = (id: string | null | undefined): OpenInApp | null => {
if (!id) {
return null;
}
const app = OPEN_IN_APPS.find((candidate) => candidate.id === id) ?? null;
return app ? getPlatformOpenInApp(app) : null;
};