* 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> * feat(desktop): add configurable window controls position by OS Add desktopWindowControlsPosition setting (auto/left/right) with OS-aware defaults: Linux left, Windows right. Wire frameless chrome controls in Header, TitlebarLeftControls, and MiniChatLayout, plus a Sessions settings control for Windows and Linux desktop shells. Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com> * fix(desktop): address Linux AppImage release review findings Propagate updater capability errors to the UI, treat missing latest-linux.yml feeds as no-update, stop installed-apps IPC spam on Linux, document FUSE/AppImage limits, add CHANGELOG entry, migrate remaining btriapitsyn URLs, and run Electron Linux unit tests on PRs. 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>
48 lines
1.3 KiB
JavaScript
48 lines
1.3 KiB
JavaScript
import fs from 'node:fs';
|
|
|
|
export const PRODUCTION_UPDATER_FEED = Object.freeze({
|
|
provider: 'github',
|
|
owner: 'openchamber',
|
|
repo: 'openchamber',
|
|
});
|
|
|
|
const isLoopbackHostname = (hostname) => {
|
|
if (hostname === '::1' || hostname === '[::1]') return true;
|
|
const octets = hostname.split('.');
|
|
if (octets.length !== 4 || octets.some((octet) => !/^\d{1,3}$/.test(octet))) return false;
|
|
const values = octets.map(Number);
|
|
return values[0] === 127 && values.every((value) => value <= 255);
|
|
};
|
|
|
|
export const parseLoopbackUpdaterUrl = (value) => {
|
|
if (!value) return null;
|
|
try {
|
|
const url = new URL(value);
|
|
if ((url.protocol !== 'http:' && url.protocol !== 'https:')
|
|
|| !isLoopbackHostname(url.hostname)
|
|
|| url.username
|
|
|| url.password
|
|
|| url.search
|
|
|| url.hash) {
|
|
return null;
|
|
}
|
|
return url.toString();
|
|
} catch {
|
|
return null;
|
|
}
|
|
};
|
|
|
|
export const resolveUpdaterFeed = ({
|
|
environment = process.env,
|
|
testBuild = false,
|
|
} = {}) => {
|
|
if (environment.OPENCHAMBER_E2E !== '1'
|
|
|| testBuild !== true) {
|
|
return PRODUCTION_UPDATER_FEED;
|
|
}
|
|
|
|
const url = parseLoopbackUpdaterUrl(environment.OPENCHAMBER_UPDATER_E2E_URL);
|
|
if (!url) return PRODUCTION_UPDATER_FEED;
|
|
return { provider: 'generic', url };
|
|
};
|