* 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>
78 lines
2.6 KiB
JavaScript
78 lines
2.6 KiB
JavaScript
import fs from 'node:fs/promises';
|
|
import os from 'node:os';
|
|
import path from 'node:path';
|
|
import { validateLocalPath, unsupportedAppSpecificOpenError } from '../path-open-utils.mjs';
|
|
|
|
const assert = (condition, message) => {
|
|
if (!condition) {
|
|
throw new Error(message);
|
|
}
|
|
};
|
|
|
|
const expectRejects = async (label, callback, expected) => {
|
|
try {
|
|
await callback();
|
|
} catch (error) {
|
|
const message = error instanceof Error ? error.message : String(error);
|
|
assert(message.includes(expected), `${label}: expected "${expected}" in "${message}"`);
|
|
return message;
|
|
}
|
|
throw new Error(`${label}: expected rejection`);
|
|
};
|
|
|
|
const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'openchamber-path-open-'));
|
|
try {
|
|
const existingFile = path.join(tempRoot, 'existing.txt');
|
|
await fs.writeFile(existingFile, 'ok', 'utf8');
|
|
|
|
const validated = await validateLocalPath(existingFile);
|
|
assert(validated.path === existingFile, 'valid file path should resolve to the same absolute path');
|
|
assert(validated.stats.isFile(), 'valid file path should return file stats');
|
|
|
|
const validatedDirectory = await validateLocalPath(tempRoot, 'Directory');
|
|
assert(validatedDirectory.path === tempRoot, 'valid directory path should resolve to the same absolute path');
|
|
assert(validatedDirectory.stats.isDirectory(), 'valid directory path should return directory stats');
|
|
|
|
const missingMessage = await expectRejects(
|
|
'missing path',
|
|
() => validateLocalPath(path.join(tempRoot, 'missing.txt')),
|
|
'does not exist',
|
|
);
|
|
const emptyMessage = await expectRejects(
|
|
'empty path',
|
|
() => validateLocalPath(' '),
|
|
'Path is required',
|
|
);
|
|
const inaccessiblePath = path.join(tempRoot, 'inaccessible');
|
|
await fs.mkdir(inaccessiblePath, { mode: 0o700 });
|
|
await fs.chmod(inaccessiblePath, 0o000);
|
|
let inaccessibleMessage = '';
|
|
try {
|
|
inaccessibleMessage = await expectRejects(
|
|
'inaccessible path',
|
|
() => validateLocalPath(inaccessiblePath),
|
|
'is not accessible',
|
|
);
|
|
} finally {
|
|
await fs.chmod(inaccessiblePath, 0o700).catch(() => {});
|
|
}
|
|
|
|
const unsupported = unsupportedAppSpecificOpenError('projects', 'linux');
|
|
assert(
|
|
unsupported.includes('not supported on Linux') && unsupported.includes('default open action'),
|
|
'unsupported app-specific Linux message should point to default open action',
|
|
);
|
|
|
|
console.log(JSON.stringify({
|
|
ok: true,
|
|
validated: validated.path,
|
|
validatedDirectory: validatedDirectory.path,
|
|
missingMessage,
|
|
emptyMessage,
|
|
inaccessibleMessage,
|
|
unsupported,
|
|
}, null, 2));
|
|
} finally {
|
|
await fs.rm(tempRoot, { recursive: true, force: true });
|
|
}
|