Skip to content

A desktop coding agent with free access to frontier models.

TypeScript

feat(desktop): make in-app updates work

ogsamrat846aa367b505
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml
index 903c6f2f..291a39ee 100644
--- a/.github/workflows/release-desktop.yml
+++ b/.github/workflows/release-desktop.yml
@@ -75,16 +75,19 @@ jobs:
platform: macos
target: aarch64-apple-darwin
builder_args: --mac --arm64
+ update_manifest: latest-mac.yml
- name: Windows x64
runner: windows-2022
platform: windows
target: x86_64-pc-windows-msvc
builder_args: --win --x64
+ update_manifest: latest.yml
- name: Linux x64
runner: ubuntu-22.04
platform: linux
target: x86_64-unknown-linux-gnu
builder_args: --linux --x64
+ update_manifest: latest-linux.yml
runs-on: ${{ matrix.runner }}
env:
RELEASE_TAG: ${{ needs.prepare.outputs.tag }}
@@ -152,9 +155,28 @@ jobs:
shell: bash
run: node apps/desktop/scripts/verify-packaged-imports.mjs
- - name: Verify and upload installers
+ # electron-updater discovers updates through this manifest. A release
+ # without it (or with checksums that do not match the uploaded
+ # installers) leaves every installed app unable to update.
+ - name: Verify update manifest
+ env:
+ UPDATE_MANIFEST: ${{ matrix.update_manifest }}
+ shell: bash
+ run: |
+ set -euo pipefail
+ if [ ! -f "apps/desktop/dist-electron/$UPDATE_MANIFEST" ]; then
+ echo "electron-builder did not emit apps/desktop/dist-electron/$UPDATE_MANIFEST; in-app updates would 404." >&2
+ find apps/desktop/dist-electron -maxdepth 1 -type f -print >&2 || true
+ exit 1
+ fi
+ node apps/desktop/scripts/verify-update-manifest.mjs \
+ --manifest "apps/desktop/dist-electron/$UPDATE_MANIFEST" \
+ --version "$RELEASE_VERSION"
+
+ - name: Verify and upload installers and update manifest
env:
GH_TOKEN: ${{ github.token }}
+ UPDATE_MANIFEST: ${{ matrix.update_manifest }}
shell: bash
run: |
set -euo pipefail
@@ -165,6 +187,12 @@ jobs:
find apps/desktop/dist-electron -maxdepth 1 -type f -print >&2 || true
exit 1
fi
+ manifest="apps/desktop/dist-electron/$UPDATE_MANIFEST"
+ if [ ! -f "$manifest" ]; then
+ echo "Update manifest $manifest is missing; refusing to publish installers the app cannot update to." >&2
+ exit 1
+ fi
+ assets+=("$manifest")
printf 'Uploading %s\n' "${assets[@]}"
gh release upload "$RELEASE_TAG" "${assets[@]}" \
--repo "$GITHUB_REPOSITORY" \
diff --git a/README.md b/README.md
index 4bcfa12c..c9d97349 100644
--- a/README.md
+++ b/README.md
@@ -16,14 +16,15 @@ Installers are published on the [latest release page](https://github.com/omnirus
| --- | --- | --- |
| macOS | Apple Silicon | `.dmg` and `.zip` |
| Windows | x64 | `.exe` installer |
-| Linux | x64 | `.AppImage` and `.tar.gz` |
+| Linux | x64 | `.deb`, `.AppImage` and `.tar.gz` |
Builds are not notarized or Windows-signed yet, so the first launch needs one confirmation:
- **macOS 15 and later**: the first open shows "Apple could not verify OmniRush.ai.app is free of malware" with only a Done button. Click Done, open System Settings > Privacy & Security, scroll to Security and click **Open Anyway** next to OmniRush.ai.app, then Open. Alternatively, in Terminal: `xattr -dr com.apple.quarantine /Applications/OmniRush.ai.app`.
- **macOS keychain**: when the app asks to use "omnirush.ai Safe Storage" in your keychain, enter your Mac login password and choose Always Allow. That item only holds the key that encrypts your own omnirush.ai sign-in on this Mac; it is asked again when the app binary changes.
- **Windows**: on the SmartScreen dialog choose More info > Run anyway. If setup reports "Extract: error writing to file", the download is incomplete or blocked: download again, compare the hash with `SHA256SUMS.txt`, free disk space, and retry.
-- **Linux**: `chmod +x` the AppImage, or unpack the tar.gz.
+- **Linux**: install the `.deb` on Debian/Ubuntu (it pulls in the GTK runtime automatically). The AppImage and tar.gz need that runtime installed first: `sudo apt install libgtk-3-0 libnss3 libatk-bridge2.0-0 libasound2` (Ubuntu 24.04: `libasound2t64`), then `chmod +x` the AppImage or unpack the tar.gz. A missing `libatk-1.0.so.0` means those packages are absent.
+- **Updates**: the app checks GitHub releases for new versions; see [docs/updates.md](docs/updates.md) for how checks work and why unsigned macOS builds open the installer instead of updating in place.
## What it does
diff --git a/apps/app/scripts/remote-workspace-diagnostics.test.ts b/apps/app/scripts/remote-workspace-diagnostics.test.ts
index c337c88f..3c67b5a3 100644
--- a/apps/app/scripts/remote-workspace-diagnostics.test.ts
+++ b/apps/app/scripts/remote-workspace-diagnostics.test.ts
@@ -143,7 +143,7 @@ describe("resolveRemoteWorkspaceConnectionTarget", () => {
expect(target.ok).toBe(false);
if (target.ok) return;
expect(target.state.status).toBe("error");
- expect(target.state.message).toContain("OmniRush.ai remote workers");
+ expect(target.state.message).toContain("omnirush.ai remote workers");
});
test("does not run OmniRush.ai probes against stale OmniRush.ai fields on non-OmniRush.ai remotes", () => {
@@ -158,7 +158,7 @@ describe("resolveRemoteWorkspaceConnectionTarget", () => {
expect(target.ok).toBe(false);
if (target.ok) return;
- expect(target.state.message).toContain("OmniRush.ai remote workers");
+ expect(target.state.message).toContain("omnirush.ai remote workers");
});
});
@@ -185,8 +185,8 @@ describe("testRemoteWorkspaceConnection", () => {
expect(result.ok).toBe(false);
expect(result.state.status).toBe("error");
expect(result.state.message).toContain("Token is missing");
- expect(result.state.message).toContain("Upgrade the OmniRush.ai host");
- expect(result.state.message).toContain("[email protected]");
+ expect(result.state.message).toContain("Upgrade the omnirush.ai host");
+ expect(result.state.message).toContain("https://github.com/omnirush-ai/omnirush-gui/issues");
});
test("reports unhealthy health responses as endpoint failures", async () => {
@@ -200,8 +200,8 @@ describe("testRemoteWorkspaceConnection", () => {
expect(result.ok).toBe(false);
expect(result.state.status).toBe("error");
expect(result.state.message).toContain("unhealthy response");
- expect(result.state.message).toContain("Upgrade the OmniRush.ai host");
- expect(result.state.message).toContain("[email protected]");
+ expect(result.state.message).toContain("Upgrade the omnirush.ai host");
+ expect(result.state.message).toContain("https://github.com/omnirush-ai/omnirush-gui/issues");
});
test("uses fallback OmniRush.ai tokens saved on older workspace records", async () => {
@@ -234,8 +234,8 @@ describe("testRemoteWorkspaceConnection", () => {
expect(result.ok).toBe(false);
expect(result.state.status).toBe("error");
expect(result.state.message).toContain("Token was rejected by worker.example.com");
- expect(result.state.message).toContain("Upgrade the OmniRush.ai host");
- expect(result.state.message).toContain("[email protected]");
+ expect(result.state.message).toContain("Upgrade the omnirush.ai host");
+ expect(result.state.message).toContain("https://github.com/omnirush-ai/omnirush-gui/issues");
});
test("reports a missing workspace separately from a dead worker", async () => {
@@ -251,8 +251,8 @@ describe("testRemoteWorkspaceConnection", () => {
expect(result.ok).toBe(false);
expect(result.state.status).toBe("error");
expect(result.state.message).toContain("Workspace ws_remote was not found");
- expect(result.state.message).toContain("Upgrade the OmniRush.ai host");
- expect(result.state.message).toContain("[email protected]");
+ expect(result.state.message).toContain("Upgrade the omnirush.ai host");
+ expect(result.state.message).toContain("https://github.com/omnirush-ai/omnirush-gui/issues");
});
test("uses workspace list when the saved remote target is not workspace-scoped", async () => {
@@ -299,8 +299,8 @@ describe("testRemoteWorkspaceConnection", () => {
expect(result.ok).toBe(false);
expect(result.state.status).toBe("error");
expect(result.state.message).toContain("Token was rejected by worker.example.com");
- expect(result.state.message).toContain("Upgrade the OmniRush.ai host");
- expect(result.state.message).toContain("[email protected]");
+ expect(result.state.message).toContain("Upgrade the omnirush.ai host");
+ expect(result.state.message).toContain("https://github.com/omnirush-ai/omnirush-gui/issues");
});
test("reports unauthorized workspace status separately from bad credentials", async () => {
@@ -316,8 +316,8 @@ describe("testRemoteWorkspaceConnection", () => {
expect(result.ok).toBe(false);
expect(result.state.status).toBe("error");
expect(result.state.message).toContain("is not authorized");
- expect(result.state.message).toContain("Upgrade the OmniRush.ai host");
- expect(result.state.message).toContain("[email protected]");
+ expect(result.state.message).toContain("Upgrade the omnirush.ai host");
+ expect(result.state.message).toContain("https://github.com/omnirush-ai/omnirush-gui/issues");
});
test("reports endpoint reachability failures from the health probe", async () => {
@@ -333,8 +333,8 @@ describe("testRemoteWorkspaceConnection", () => {
expect(result.ok).toBe(false);
expect(result.state.status).toBe("error");
expect(result.state.message).toContain("Cannot reach worker.example.com");
- expect(result.state.message).toContain("Upgrade the OmniRush.ai host");
- expect(result.state.message).toContain("[email protected]");
+ expect(result.state.message).toContain("Upgrade the omnirush.ai host");
+ expect(result.state.message).toContain("https://github.com/omnirush-ai/omnirush-gui/issues");
});
test("redacts token-like values from diagnostic error messages", async () => {
diff --git a/apps/app/src/app/constants.ts b/apps/app/src/app/constants.ts
index 2c2ce1cb..508cc202 100644
--- a/apps/app/src/app/constants.ts
+++ b/apps/app/src/app/constants.ts
@@ -176,9 +176,10 @@ export const MCP_QUICK_CONNECT: McpDirectoryInfo[] = [
// never at the web app's root (see
// packages/docs/cloud/run-in-the-cloud/cloud-mcp.mdx).
try {
- return `${getDenMcpUrl()}/agent`;
+ const mcpUrl = getDenMcpUrl();
+ return mcpUrl ? `${mcpUrl}/agent` : "";
} catch {
- return "https://api.app.omnirushlabs.com/mcp/agent";
+ return "";
}
},
type: "remote",
diff --git a/apps/app/src/app/lib/den.ts b/apps/app/src/app/lib/den.ts
index a190ac53..1ab4c962 100644
--- a/apps/app/src/app/lib/den.ts
+++ b/apps/app/src/app/lib/den.ts
@@ -83,10 +83,14 @@ const ORG_SCOPE_HEADER = "x-omnirush-org-id";
const DEFAULT_DEN_TIMEOUT_MS = 12_000;
export const DEFAULT_DEN_AUTH_NAME = "omnirush.ai User";
+// omnirush.ai ships without a hosted Den control plane, so the build default
+// is empty: a Den base URL exists only when VITE_DEN_BASE_URL,
+// desktop-bootstrap.json, a connect link, the local gateway, or the user's
+// settings provide one. Nothing may contact a control plane by default.
const BUILD_DEN_BASE_URL =
(typeof import.meta !== "undefined" && typeof import.meta.env?.VITE_DEN_BASE_URL === "string"
? import.meta.env.VITE_DEN_BASE_URL
- : "").trim() || "https://app.omnirushlabs.com";
+ : "").trim();
const BUILD_DEN_REQUIRE_SIGNIN =
(typeof import.meta !== "undefined" && typeof import.meta.env?.VITE_DEN_REQUIRE_SIGNIN === "string"
? /^(1|true|yes|on)$/i.test(import.meta.env.VITE_DEN_REQUIRE_SIGNIN.trim())
@@ -110,8 +114,7 @@ function readForceEnvDenSettings(): boolean {
: false);
}
-export const HOSTED_DEFAULT_DEN_BASE_URL = "https://app.omnirushlabs.com";
-export const HOSTED_DEFAULT_DEN_API_BASE_URL = "https://api.app.omnirushlabs.com";
+/** Empty unless the build pins a control plane (see BUILD_DEN_BASE_URL). */
export const DEFAULT_DEN_BASE_URL = BUILD_DEN_BASE_URL;
export const DEN_INFERENCE_PATH = "/dashboard/inference";
@@ -701,16 +704,23 @@ export function denOriginComparisonKey(input: string | null | undefined): string
}
/**
- * True when the effective Den control plane is not the hosted omnirush.ai Cloud
- * (app.omnirushlabs.com). Self-hosted deployments point the app at their own
- * control plane via VITE_DEN_BASE_URL or the desktop bootstrap config, so
- * hosted-only surfaces (e.g. omnirush.ai Models upsells) should stay hidden.
+ * omnirush.ai has no hosted Den: every configured control plane is
+ * self-hosted, so hosted-only surfaces (e.g. omnirush.ai Models upsells)
+ * always stay hidden.
*/
export function isSelfHostedControlPlane(): boolean {
- return (
- denOriginComparisonKey(readDenSettings().baseUrl) !==
- denOriginComparisonKey(HOSTED_DEFAULT_DEN_BASE_URL)
- );
+ return true;
+}
+
+/**
+ * True when some source (build env, desktop-bootstrap.json, a connect link,
+ * the local gateway, or the user's settings) provides a Den control plane.
+ * Den-backed features must check this before making any request instead of
+ * assuming a default host exists.
+ */
+export function isDenControlPlaneConfigured(): boolean {
+ const settings = readDenSettings();
+ return Boolean(normalizeDenBaseUrl(settings.baseUrl) || normalizeDenBaseUrl(settings.apiBaseUrl));
}
export function getDenInferenceUrl(baseUrl?: string | null): string {
@@ -722,22 +732,6 @@ function isHostedWebAppHost(hostname: string): boolean {
return hostname.trim().toLowerCase().startsWith("app.");
}
-function directHostedApiMcpResourceUrl(input: URL): string | null {
- if (input.protocol !== "https:" || input.hostname.toLowerCase() !== "app.omnirushlabs.com") {
- return null;
- }
- const pathname = input.pathname.replace(/\/+$/, "");
- if (pathname !== "/mcp" && pathname !== "/api/den/mcp") {
- return null;
- }
- const output = new URL(input.toString());
- output.hostname = "api.app.omnirushlabs.com";
- output.pathname = "/mcp";
- output.search = "";
- output.hash = "";
- return output.toString().replace(/\/+$/, "");
-}
-
function stripDenApiBasePath(input: string | null | undefined): string | null {
const normalized = normalizeDenBaseUrl(input);
if (!normalized) return null;
@@ -775,27 +769,16 @@ function ensureDenApiBasePath(input: string | null | undefined): string | null {
}
}
-const HOSTED_DEN_APEX_HOST = "omnirushlabs.com";
-
-function isHostedDenHost(hostname: string): boolean {
- const normalized = hostname.trim().toLowerCase();
- return normalized === HOSTED_DEN_APEX_HOST || normalized.endsWith(`.${HOSTED_DEN_APEX_HOST}`);
-}
-
/**
* The deterministic API origin for a Den base URL, without runtime config.
*
- * Only two shapes are known ahead of time:
- * - An explicit API host (`api.*`) is already the API origin.
- * - Hosted omnirush.ai Cloud (`*.omnirushlabs.com`) serves its API at the
- * `api.`-prefixed host.
- *
- * Every other deployment (self-hosted single host, localhost, tunnel or
- * sandbox preview hosts with single-label wildcard certificates) keeps the
- * same-origin `/api/den` proxy. Inventing `api.<host>` there produced
- * unreachable origins and TLS names the deployment's certificate cannot
- * cover, which broke desktop sign-in. Runtime config (`denApiUrl`) remains
- * the source of truth when present.
+ * Only one shape is known ahead of time: an explicit API host (`api.*`) is
+ * already the API origin. Every other deployment (self-hosted single host,
+ * localhost, tunnel or sandbox preview hosts with single-label wildcard
+ * certificates) keeps the same-origin `/api/den` proxy. Inventing `api.<host>`
+ * there produced unreachable origins and TLS names the deployment's
+ * certificate cannot cover, which broke desktop sign-in. Runtime config
+ * (`denApiUrl`) remains the source of truth when present.
*/
function denApiOriginForDenBaseUrl(input: string | null | undefined): string | null {
const normalized = normalizeDenBaseUrl(input);
@@ -804,13 +787,9 @@ function denApiOriginForDenBaseUrl(input: string | null | undefined): string | n
try {
const url = new URL(normalized);
const hostname = url.hostname.toLowerCase();
- const isExplicitApiHost = hostname === "api" || hostname.startsWith("api.");
- if (!isExplicitApiHost && !isHostedDenHost(hostname)) {
+ if (hostname !== "api" && !hostname.startsWith("api.")) {
return null;
}
- if (!isExplicitApiHost) {
- url.hostname = `api.${hostname}`;
- }
url.pathname = "";
url.search = "";
url.hash = "";
@@ -828,11 +807,13 @@ export function resolveDenBaseUrls(input: { baseUrl?: string | null; apiBaseUrl?
if (gatewayOrigin) {
const normalizedGatewayOrigin = normalizeDenBaseUrl(gatewayOrigin) ?? gatewayOrigin;
+ // Behind the gateway the Den web app is served from the gateway itself
+ // unless a different web base was configured explicitly.
const gatewayBaseUrl =
normalizedBaseUrl && denOriginComparisonKey(normalizedBaseUrl) !== denOriginComparisonKey(normalizedGatewayOrigin)
? normalizedBaseUrl
- : DEFAULT_DEN_BASE_URL;
- const baseUrl = stripDenApiBasePath(gatewayBaseUrl) ?? DEFAULT_DEN_BASE_URL;
+ : DEFAULT_DEN_BASE_URL || normalizedGatewayOrigin;
+ const baseUrl = stripDenApiBasePath(gatewayBaseUrl) ?? gatewayBaseUrl;
return {
baseUrl,
@@ -876,16 +857,20 @@ function resolveDenClientBaseUrls(options: { baseUrl: string; apiBaseUrl?: strin
return resolveDenBaseUrls(options);
}
-/** The MCP endpoint served from the resolved Den API base URL. */
+/**
+ * The MCP endpoint served from the resolved Den API base URL, or an empty
+ * string when no control plane is configured.
+ */
export function getDenMcpUrl(): string {
const { apiBaseUrl } = resolveDenBaseUrls(readDenBootstrapConfig());
+ if (!normalizeDenBaseUrl(apiBaseUrl)) return "";
return `${apiBaseUrl.replace(/\/+$/, "")}/mcp`;
}
/**
* Detects MCP URLs written by older builds that pointed `/mcp` at the bare
- * web-app origin (e.g. `https://app.omnirushlabs.com/mcp`). Nothing serves
- * MCP there — those entries fail with a 404 and must be reconfigured.
+ * web-app origin (e.g. `https://app.example.com/mcp`). Nothing serves MCP
+ * there — those entries fail with a 404 and must be reconfigured.
*/
export function isLegacyWebAppMcpUrl(input: string | null | undefined): boolean {
if (!input) return false;
@@ -900,10 +885,10 @@ export function isLegacyWebAppMcpUrl(input: string | null | undefined): boolean
/**
* Resolve the URL the cloud MCP entry should connect to from a minted
* token's `resource`. Older den-api builds mint the bare web-app origin
- * (`https://app.omnirushlabs.com/mcp`) where nothing serves MCP — heal
- * those to the `/api/den` proxy on the same origin instead of trusting
- * them verbatim. Returns null when the resource is unusable so callers
- * can keep their bootstrap-derived URL.
+ * (`https://app.example.com/mcp`) where nothing serves MCP — heal those to
+ * the `/api/den` proxy on the same origin instead of trusting them
+ * verbatim. Returns null when the resource is unusable so callers can keep
+ * their bootstrap-derived URL.
*/
export function resolveCloudMcpResourceUrl(resource: string | null | undefined): string | null {
const trimmed = resource?.trim() ?? "";
@@ -911,8 +896,6 @@ export function resolveCloudMcpResourceUrl(resource: string | null | undefined):
try {
const url = new URL(trimmed);
if (url.protocol !== "http:" && url.protocol !== "https:") return null;
- const directHostedApiResource = directHostedApiMcpResourceUrl(url);
- if (directHostedApiResource) return directHostedApiResource;
if (isLegacyWebAppMcpUrl(trimmed)) {
url.pathname = "/api/den/mcp";
}
@@ -1007,11 +990,9 @@ async function resolveDenBootstrapConfigWithRuntimeApi(
if (!isDesktopRuntime()) {
return resolved;
}
- if (
- resolved.source === "default"
- && resolved.requireSignin === false
- && resolved.baseUrl === HOSTED_DEFAULT_DEN_BASE_URL
- ) {
+ // No control plane means no runtime-config probe: the empty default must
+ // never turn into a request.
+ if (!normalizeDenBaseUrl(resolved.baseUrl)) {
return resolved;
}
@@ -1261,7 +1242,7 @@ export async function initializeDenBootstrapConfig(): Promise<DenBootstrapConfig
// recovery placeholder, not a real hosted selection, so retained
// credentials remain quarantined until an authoritative read succeeds.
desktopBootstrapConfig = resolveDenBootstrapConfig({
- baseUrl: HOSTED_DEFAULT_DEN_BASE_URL,
+ baseUrl: BUILD_DEN_BASE_URL,
requireSignin: BUILD_DEN_REQUIRE_SIGNIN,
});
desktopBootstrapResolution = "unresolved";
@@ -1393,7 +1374,11 @@ function canUseCloudWebAuthReturn(origin: string): boolean {
}
export function buildDenAuthUrl(baseUrl: string, mode: "sign-in" | "sign-up"): string {
- const target = new URL(resolveDenBaseUrls(baseUrl).baseUrl);
+ const resolvedBaseUrl = resolveDenBaseUrls(baseUrl).baseUrl;
+ if (!normalizeDenBaseUrl(resolvedBaseUrl)) {
+ throw new Error("No Den control plane is configured. Set your organization's server URL before signing in.");
+ }
+ const target = new URL(resolvedBaseUrl);
target.searchParams.set("mode", mode);
const webReturnOrigin =
isWebDeployment() && typeof window !== "undefined" ? window.location.origin : null;
diff --git a/apps/app/src/app/lib/desktop.ts b/apps/app/src/app/lib/desktop.ts
index 3faf8751..1d017b38 100644
--- a/apps/app/src/app/lib/desktop.ts
+++ b/apps/app/src/app/lib/desktop.ts
@@ -147,6 +147,14 @@ export type RecoveryActionResult = {
// Electron bridge surface
// ---------------------------------------------------------------------------
+/**
+ * How the desktop shell applies a downloaded update. "in-place" is
+ * electron-updater's swap (Squirrel.Mac, NSIS, AppImage); "manual-dmg" means
+ * the running macOS app is not Developer ID signed, so the shell downloads
+ * the DMG and opens it for a drag-to-Applications install instead.
+ */
+export type UpdaterInstallMode = "in-place" | "manual-dmg";
+
declare global {
interface Window {
__omnirushRecoveryControl?: {
@@ -212,11 +220,15 @@ declare global {
channel: "stable" | "alpha";
feedUrl: string;
currentVersion: string;
+ installMode?: UpdaterInstallMode;
+ alphaChannelSupported?: boolean;
}>;
setChannel?: (channel: "stable" | "alpha") => Promise<{
channel: "stable" | "alpha";
feedUrl: string;
currentVersion: string;
+ installMode?: UpdaterInstallMode;
+ alphaChannelSupported?: boolean;
}>;
check?: (channel?: "stable" | "alpha", targetVersion?: string) => Promise<{
available: boolean;
@@ -227,9 +239,11 @@ declare global {
channel?: "stable" | "alpha";
feedUrl?: string;
reason?: string;
+ installMode?: UpdaterInstallMode;
+ alphaChannelSupported?: boolean;
}>;
- download?: () => Promise<{ ok: boolean; reason?: string }>;
- installAndRestart?: () => Promise<{ ok: boolean; reason?: string }>;
+ download?: () => Promise<{ ok: boolean; reason?: string; mode?: UpdaterInstallMode }>;
+ installAndRestart?: () => Promise<{ ok: boolean; reason?: string; mode?: UpdaterInstallMode; path?: string }>;
};
recovery?: {
recordHealthy?: () => Promise<unknown>;
diff --git a/apps/app/src/app/lib/feedback.ts b/apps/app/src/app/lib/feedback.ts
index da081e23..667437a5 100644
--- a/apps/app/src/app/lib/feedback.ts
+++ b/apps/app/src/app/lib/feedback.ts
@@ -1,8 +1,10 @@
const ENV_FEEDBACK_URL = String(import.meta.env.VITE_OMNIRUSH_FEEDBACK_URL ?? "").trim();
const ENV_APP_VERSION = String(import.meta.env.VITE_OMNIRUSH_APP_VERSION ?? "").trim();
+// Feedback lands in the public issue tracker unless a deployment provides its
+// own form; the query parameters below become context for the report.
export const DEFAULT_FEEDBACK_URL =
- ENV_FEEDBACK_URL || "https://omnirushlabs.com/feedback";
+ ENV_FEEDBACK_URL || "https://github.com/omnirush-ai/omnirush-gui/issues/new";
type FeedbackUrlOptions = {
entrypoint: string;
diff --git a/apps/app/src/app/lib/version-gate.ts b/apps/app/src/app/lib/version-gate.ts
index aded353f..0d041879 100644
--- a/apps/app/src/app/lib/version-gate.ts
+++ b/apps/app/src/app/lib/version-gate.ts
@@ -6,6 +6,7 @@
import {
createDenClient,
+ isDenControlPlaneConfigured,
readDenSettings,
type DenAppVersionMetadata,
type DenDesktopConfig,
@@ -341,10 +342,15 @@ export async function resolveAutomaticStableDesktopUpdate(input: {
* this returns `false` — the caller must treat that as "do not surface
* the update".
*
+ * Without a configured control plane (omnirush.ai ships none) there is no
+ * inventory to consult: the GitHub release feed the shell reads is the only
+ * authority, so the update is supported and no other host is contacted.
+ *
* No-op safe: callers can invoke this without any Den auth; the client
* will omit the token when none is persisted.
*/
export async function isUpdateSupportedByDen(updateVersion: string): Promise<boolean> {
+ if (!isDenControlPlaneConfigured()) return true;
const latestAppVersion = await readDenLatestAppVersion();
if (!latestAppVersion) return false;
const comparison = compareVersions(updateVersion, latestAppVersion);
@@ -364,6 +370,7 @@ export async function isAlphaUpdateAllowed(
currentVersion?: string | null,
): Promise<boolean> {
if (!isAlphaChannelAllowedByDesktopConfig(desktopConfig)) return false;
+ if (!isDenControlPlaneConfigured()) return true;
const latestAppVersion = await readDenLatestAppVersion();
if (!latestAppVersion) return false;
return isAlphaUpdateAllowedByVersionCeiling({
diff --git a/apps/app/src/i18n/locales/ca.ts b/apps/app/src/i18n/locales/ca.ts
index 2eb4456d..ce64ce39 100644
--- a/apps/app/src/i18n/locales/ca.ts
+++ b/apps/app/src/i18n/locales/ca.ts
@@ -980,6 +980,11 @@ export default {
"settings.update_download_button": "Descarregar",
"settings.update_downloading": "S'està baixant...",
"settings.update_install_button": "Instal·la i reinicia",
+ "settings.update_open_installer_button": "Obre l'instal·lador",
+ "settings.update_installer_opened": "L'instal·lador s'ha obert. Arrossega omnirush.ai a Aplicacions, substitueix la còpia antiga i torna a obrir-lo.",
+ "settings.update_manual_install_hint": "Aquesta versió no està signada amb un Developer ID, així que no es pot substituir a si mateixa. S'obrirà l'instal·lador i omnirush.ai es tancarà.",
+ "settings.update_open_installer_now_title": "Vols obrir l'instal·lador?",
+ "settings.update_open_installer_now_message": "{appName} es tancarà i s'obrirà l'instal·lador. Arrossega omnirush.ai a Aplicacions, substitueix la còpia antiga i torna a obrir-lo.",
"settings.update_last_checked": "Darrera comprovació {time}",
"settings.update_published": "Publicat {date}",
"settings.update_ready": "A punt per instal·lar: v",
diff --git a/apps/app/src/i18n/locales/en.ts b/apps/app/src/i18n/locales/en.ts
index 1e51ff26..2783267c 100644
--- a/apps/app/src/i18n/locales/en.ts
+++ b/apps/app/src/i18n/locales/en.ts
@@ -1814,6 +1814,11 @@ export default {
"settings.update_restart_now_title": "Restart {appName}?",
"settings.update_restart_now_message": "{appName} will close and reopen with the latest version. Eligible running tasks resume gradually after restart; tasks waiting for input or with an uncertain outcome stay paused. You can keep working and the update will install when you quit.",
"settings.update_install_button": "Install & restart",
+ "settings.update_open_installer_button": "Open installer",
+ "settings.update_installer_opened": "Installer opened. Drag omnirush.ai to Applications, replace the old copy, then reopen it.",
+ "settings.update_manual_install_hint": "This build is not signed with a Developer ID, so it cannot replace itself. The installer opens and omnirush.ai quits.",
+ "settings.update_open_installer_now_title": "Open the installer?",
+ "settings.update_open_installer_now_message": "{appName} will quit and the installer will open. Drag omnirush.ai to Applications, replace the old copy, then reopen it.",
"settings.update_install_failed": "Couldn't install the update",
"settings.update_last_checked": "Last checked {time}",
"settings.update_published": "Released {date}",
diff --git a/apps/app/src/i18n/locales/es.ts b/apps/app/src/i18n/locales/es.ts
index 056282ec..9ba21b9e 100644
--- a/apps/app/src/i18n/locales/es.ts
+++ b/apps/app/src/i18n/locales/es.ts
@@ -980,6 +980,11 @@ export default {
"settings.update_download_button": "Descargar",
"settings.update_downloading": "Descargando...",
"settings.update_install_button": "Instalar y reiniciar",
+ "settings.update_open_installer_button": "Abrir instalador",
+ "settings.update_installer_opened": "Instalador abierto. Arrastra omnirush.ai a Aplicaciones, reemplaza la copia anterior y vuelve a abrirlo.",
+ "settings.update_manual_install_hint": "Esta versión no está firmada con un Developer ID, así que no puede reemplazarse a sí misma. Se abrirá el instalador y omnirush.ai se cerrará.",
+ "settings.update_open_installer_now_title": "¿Abrir el instalador?",
+ "settings.update_open_installer_now_message": "{appName} se cerrará y se abrirá el instalador. Arrastra omnirush.ai a Aplicaciones, reemplaza la copia anterior y vuelve a abrirlo.",
"settings.update_last_checked": "Última comprobación {time}",
"settings.update_published": "Publicado {date}",
"settings.update_ready": "Listo para instalar: v",
diff --git a/apps/app/src/i18n/locales/fr.ts b/apps/app/src/i18n/locales/fr.ts
index 83027868..39586107 100644
--- a/apps/app/src/i18n/locales/fr.ts
+++ b/apps/app/src/i18n/locales/fr.ts
@@ -980,6 +980,11 @@ export default {
"settings.update_download_button": "Télécharger",
"settings.update_downloading": "Téléchargement...",
"settings.update_install_button": "Installer et redémarrer",
+ "settings.update_open_installer_button": "Ouvrir l'installateur",
+ "settings.update_installer_opened": "Installateur ouvert. Glissez omnirush.ai dans Applications, remplacez l'ancienne copie, puis rouvrez l'application.",
+ "settings.update_manual_install_hint": "Cette version n'est pas signée avec un Developer ID et ne peut donc pas se remplacer elle-même. L'installateur s'ouvre et omnirush.ai se ferme.",
+ "settings.update_open_installer_now_title": "Ouvrir l'installateur ?",
+ "settings.update_open_installer_now_message": "{appName} va se fermer et l'installateur va s'ouvrir. Glissez omnirush.ai dans Applications, remplacez l'ancienne copie, puis rouvrez l'application.",
"settings.update_last_checked": "Dernière vérification {time}",
"settings.update_published": "Publié le {date}",
"settings.update_ready": "Prêt à installer : v",
diff --git a/apps/app/src/i18n/locales/ja.ts b/apps/app/src/i18n/locales/ja.ts
index f98a09d3..1121e652 100644
--- a/apps/app/src/i18n/locales/ja.ts
+++ b/apps/app/src/i18n/locales/ja.ts
@@ -972,6 +972,11 @@ export default {
"settings.update_download_button": "ダウンロード",
"settings.update_downloading": "ダウンロード中…",
"settings.update_install_button": "インストールして再起動",
+ "settings.update_open_installer_button": "インストーラーを開く",
+ "settings.update_installer_opened": "インストーラーを開きました。omnirush.ai をアプリケーションフォルダにドラッグして古いコピーを置き換え、再度開いてください。",
+ "settings.update_manual_install_hint": "このビルドは Developer ID で署名されていないため、自動で置き換えられません。インストーラーが開き、omnirush.ai は終了します。",
+ "settings.update_open_installer_now_title": "インストーラーを開きますか?",
+ "settings.update_open_installer_now_message": "{appName} を終了してインストーラーを開きます。omnirush.ai をアプリケーションフォルダにドラッグして古いコピーを置き換え、再度開いてください。",
"settings.update_last_checked": "最終確認 {time}",
"settings.update_published": "公開日 {date}",
"settings.update_ready": "インストール準備完了: v",
diff --git a/apps/app/src/i18n/locales/pt-BR.ts b/apps/app/src/i18n/locales/pt-BR.ts
index be929462..9582d5e0 100644
--- a/apps/app/src/i18n/locales/pt-BR.ts
+++ b/apps/app/src/i18n/locales/pt-BR.ts
@@ -978,6 +978,11 @@ export default {
"settings.update_download_button": "Baixar",
"settings.update_downloading": "Baixando...",
"settings.update_install_button": "Instalar e Reiniciar",
+ "settings.update_open_installer_button": "Abrir instalador",
+ "settings.update_installer_opened": "Instalador aberto. Arraste o omnirush.ai para Aplicativos, substitua a cópia antiga e abra-o novamente.",
+ "settings.update_manual_install_hint": "Esta versão não é assinada com um Developer ID, então não consegue se substituir. O instalador abre e o omnirush.ai é encerrado.",
+ "settings.update_open_installer_now_title": "Abrir o instalador?",
+ "settings.update_open_installer_now_message": "O {appName} será encerrado e o instalador será aberto. Arraste o omnirush.ai para Aplicativos, substitua a cópia antiga e abra-o novamente.",
"settings.update_last_checked": "Última verificação {time}",
"settings.update_published": "Publicado em {date}",
"settings.update_ready": "Pronto para instalar: v",
diff --git a/apps/app/src/i18n/locales/ru.ts b/apps/app/src/i18n/locales/ru.ts
index 6ecd8eb6..af0d5e24 100644
--- a/apps/app/src/i18n/locales/ru.ts
+++ b/apps/app/src/i18n/locales/ru.ts
@@ -1165,6 +1165,11 @@ export default {
"settings.update_download_button": "Скачать",
"settings.update_downloading": "Скачивание...",
"settings.update_install_button": "Установить и перезапустить",
+ "settings.update_open_installer_button": "Открыть установщик",
+ "settings.update_installer_opened": "Установщик открыт. Перетащите omnirush.ai в папку «Программы», замените старую копию и откройте приложение заново.",
+ "settings.update_manual_install_hint": "Эта сборка не подписана Developer ID, поэтому не может заменить себя сама. Откроется установщик, а omnirush.ai закроется.",
+ "settings.update_open_installer_now_title": "Открыть установщик?",
+ "settings.update_open_installer_now_message": "{appName} закроется, и откроется установщик. Перетащите omnirush.ai в папку «Программы», замените старую копию и откройте приложение заново.",
"settings.update_last_checked": "Последняя проверка {time}",
"settings.update_published": "Опубликовано {date}",
"settings.update_ready": "Готово к установке: v",
diff --git a/apps/app/src/i18n/locales/th.ts b/apps/app/src/i18n/locales/th.ts
index 1f9711c1..e5920bfd 100644
--- a/apps/app/src/i18n/locales/th.ts
+++ b/apps/app/src/i18n/locales/th.ts
@@ -973,6 +973,11 @@ export default {
"settings.update_download_button": "ดาวน์โหลด",
"settings.update_downloading": "กำลังดาวน์โหลด...",
"settings.update_install_button": "ติดตั้งและรีสตาร์ท",
+ "settings.update_open_installer_button": "เปิดตัวติดตั้ง",
+ "settings.update_installer_opened": "เปิดตัวติดตั้งแล้ว ลาก omnirush.ai ไปยัง Applications แทนที่สำเนาเดิม แล้วเปิดใหม่อีกครั้ง",
+ "settings.update_manual_install_hint": "บิลด์นี้ไม่ได้ลงนามด้วย Developer ID จึงไม่สามารถแทนที่ตัวเองได้ ตัวติดตั้งจะเปิดขึ้นและ omnirush.ai จะปิดตัวลง",
+ "settings.update_open_installer_now_title": "เปิดตัวติดตั้งหรือไม่?",
+ "settings.update_open_installer_now_message": "{appName} จะปิดตัวลงและตัวติดตั้งจะเปิดขึ้น ลาก omnirush.ai ไปยัง Applications แทนที่สำเนาเดิม แล้วเปิดใหม่อีกครั้ง",
"settings.update_last_checked": "ตรวจสอบล่าสุด {time}",
"settings.update_published": "เผยแพร่ {date}",
"settings.update_ready": "พร้อมติดตั้ง: v",
diff --git a/apps/app/src/i18n/locales/vi.ts b/apps/app/src/i18n/locales/vi.ts
index 5cf425cc..a3045445 100644
--- a/apps/app/src/i18n/locales/vi.ts
+++ b/apps/app/src/i18n/locales/vi.ts
@@ -973,6 +973,11 @@ export default {
"settings.update_download_button": "Tải xuống",
"settings.update_downloading": "Đang tải xuống...",
"settings.update_install_button": "Cài đặt & Khởi động lại",
+ "settings.update_open_installer_button": "Mở trình cài đặt",
+ "settings.update_installer_opened": "Đã mở trình cài đặt. Kéo omnirush.ai vào Applications, thay thế bản cũ, rồi mở lại.",
+ "settings.update_manual_install_hint": "Bản dựng này không được ký bằng Developer ID nên không thể tự thay thế. Trình cài đặt sẽ mở và omnirush.ai sẽ thoát.",
+ "settings.update_open_installer_now_title": "Mở trình cài đặt?",
+ "settings.update_open_installer_now_message": "{appName} sẽ thoát và trình cài đặt sẽ mở. Kéo omnirush.ai vào Applications, thay thế bản cũ, rồi mở lại.",
"settings.update_last_checked": "Kiểm tra lần cuối {time}",
"settings.update_published": "Phát hành {date}",
"settings.update_ready": "Sẵn sàng cài đặt: v",
diff --git a/apps/app/src/i18n/locales/zh.ts b/apps/app/src/i18n/locales/zh.ts
index a2ebd9a5..7bdfeed9 100644
--- a/apps/app/src/i18n/locales/zh.ts
+++ b/apps/app/src/i18n/locales/zh.ts
@@ -976,6 +976,11 @@ export default {
"settings.update_download_button": "下载",
"settings.update_downloading": "下载中...",
"settings.update_install_button": "安装并重启",
+ "settings.update_open_installer_button": "打开安装程序",
+ "settings.update_installer_opened": "安装程序已打开。将 omnirush.ai 拖入“应用程序”文件夹以替换旧版本,然后重新打开。",
+ "settings.update_manual_install_hint": "此构建未使用 Developer ID 签名,无法自行替换。安装程序将打开,omnirush.ai 将退出。",
+ "settings.update_open_installer_now_title": "要打开安装程序吗?",
+ "settings.update_open_installer_now_message": "{appName} 将退出并打开安装程序。将 omnirush.ai 拖入“应用程序”文件夹以替换旧版本,然后重新打开。",
"settings.update_last_checked": "上次检查{time}",
"settings.update_published": "发布时间{date}",
"settings.update_ready": "准备安装:v",
diff --git a/apps/app/src/react-app/design-system/provider-logo-src.ts b/apps/app/src/react-app/design-system/provider-logo-src.ts
index e5533da0..c07325a5 100644
--- a/apps/app/src/react-app/design-system/provider-logo-src.ts
+++ b/apps/app/src/react-app/design-system/provider-logo-src.ts
@@ -62,7 +62,7 @@ const PROVIDER_DOMAINS: Record<string, string> = {
ollama: "ollama.com",
xai: "x.ai",
opencode: "opencode.ai",
- omnirush: "omnirushlabs.com",
+ omnirush: "omnirush.ai",
abacus: "abacus.ai",
};
diff --git a/apps/app/src/react-app/domains/cloud/forced-signin-page.tsx b/apps/app/src/react-app/domains/cloud/forced-signin-page.tsx
index a871fe1a..130ab541 100644
--- a/apps/app/src/react-app/domains/cloud/forced-signin-page.tsx
+++ b/apps/app/src/react-app/domains/cloud/forced-signin-page.tsx
@@ -78,7 +78,16 @@ export function ForcedSigninPage({ developerMode }: ForcedSigninPageProps) {
const openBrowserAuth = useCallback(
(mode: "sign-in" | "sign-up") => {
- const url = buildDenAuthUrl(baseUrl, mode);
+ let url: string;
+ try {
+ url = buildDenAuthUrl(baseUrl, mode);
+ } catch (error) {
+ // No control plane configured: surface it next to the server URL
+ // field instead of failing silently inside the click handler.
+ setStatusMessage(null);
+ setAuthError(error instanceof Error ? error.message : t("den.error_base_url"));
+ return;
+ }
markDesktopSignInInitiated();
setSigninFallbackUrl(url);
setStatusMessage(
diff --git a/apps/app/src/react-app/domains/cloud/omnirush-models-promo.test.ts b/apps/app/src/react-app/domains/cloud/omnirush-models-promo.test.ts
index 2b6f9550..f7fc6041 100644
--- a/apps/app/src/react-app/domains/cloud/omnirush-models-promo.test.ts
+++ b/apps/app/src/react-app/domains/cloud/omnirush-models-promo.test.ts
@@ -5,7 +5,7 @@ declare const expect: (value: unknown) => {
toBe: (expected: unknown) => void;
};
-import { DEFAULT_DEN_BASE_URL, HOSTED_DEFAULT_DEN_BASE_URL, setDenBootstrapConfig } from "../../../app/lib/den";
+import { DEFAULT_DEN_BASE_URL, setDenBootstrapConfig } from "../../../app/lib/den";
import {
hasOmniRushModelsAvailable,
isOmniRushModelsPromoEligible,
@@ -20,8 +20,9 @@ afterEach(async () => {
});
describe("omnirush.ai Models promo eligibility", () => {
- test("allows promotions on the default Den URL after normalization", () => {
- expect(isOmniRushModelsPromoEligibleForDenBaseUrl(`${HOSTED_DEFAULT_DEN_BASE_URL}/api/den/`)).toBe(true);
+ test("never promotes hosted models: omnirush.ai has no hosted control plane", () => {
+ expect(isOmniRushModelsPromoEligibleForDenBaseUrl("https://den.example.com/api/den/")).toBe(false);
+ expect(isOmniRushModelsPromoEligible()).toBe(false);
});
test("suppresses promotions for custom configured Den URLs", async () => {
diff --git a/apps/app/src/react-app/domains/cloud/omnirush-models-promo.ts b/apps/app/src/react-app/domains/cloud/omnirush-models-promo.ts
index 6f253d80..d8563105 100644
--- a/apps/app/src/react-app/domains/cloud/omnirush-models-promo.ts
+++ b/apps/app/src/react-app/domains/cloud/omnirush-models-promo.ts
@@ -4,11 +4,9 @@ import {
buildDenAuthUrl,
getDenInferenceUrl,
isSelfHostedControlPlane,
- HOSTED_DEFAULT_DEN_BASE_URL,
readDenBootstrapConfig,
readDenSettings,
} from "../../../app/lib/den";
-import { isDefaultControlPlaneUrl } from "../settings/cloud/control-plane-url";
import { denSettingsChangedEvent } from "../../../app/lib/den-session-events";
import { useSyncExternalStore } from "react";
@@ -31,8 +29,10 @@ export function areOmniRushModelsPromosDisabled() {
return isSelfHostedControlPlane();
}
-export function isOmniRushModelsPromoEligibleForDenBaseUrl(baseUrl: string) {
- return !areOmniRushModelsPromosDisabled() && isDefaultControlPlaneUrl(baseUrl, HOSTED_DEFAULT_DEN_BASE_URL);
+export function isOmniRushModelsPromoEligibleForDenBaseUrl(_baseUrl: string) {
+ // The promo advertised the hosted omnirush.ai Cloud models, which no
+ // control plane serves any more.
+ return !areOmniRushModelsPromosDisabled();
}
export function isOmniRushModelsPromoEligible() {
diff --git a/apps/app/src/react-app/domains/cloud/omnirush-web-access-gate.tsx b/apps/app/src/react-app/domains/cloud/omnirush-web-access-gate.tsx
index 7c1aad6d..fa1181fb 100644
--- a/apps/app/src/react-app/domains/cloud/omnirush-web-access-gate.tsx
+++ b/apps/app/src/react-app/domains/cloud/omnirush-web-access-gate.tsx
@@ -41,11 +41,24 @@ function subscribeToDenSettings(onStoreChange: () => void) {
return () => window.removeEventListener(denSettingsChangedEvent, onStoreChange);
}
+function currentPageOrigin() {
+ if (typeof window === "undefined") return "";
+ const origin = window.location?.origin?.trim() ?? "";
+ return /^https?:\/\//i.test(origin) ? origin : "";
+}
+
+/**
+ * The Den billing page for omnirush.ai Web. The gate and the workspace
+ * takeover only render behind the gateway, where the Den web app is served
+ * from the page's own origin, so an unconfigured base URL resolves there
+ * instead of producing an empty link.
+ */
export function denWebBillingUrl(baseUrl: string) {
+ const base = baseUrl.trim() || currentPageOrigin();
try {
- return new URL("/dashboard/web", baseUrl).toString();
+ return new URL("/dashboard/web", base).toString();
} catch {
- return baseUrl;
+ return base;
}
}
diff --git a/apps/app/src/react-app/domains/cloud/use-den-control-plane-configured.ts b/apps/app/src/react-app/domains/cloud/use-den-control-plane-configured.ts
new file mode 100644
index 00000000..daaaa49e
--- /dev/null
+++ b/apps/app/src/react-app/domains/cloud/use-den-control-plane-configured.ts
@@ -0,0 +1,25 @@
+import { useSyncExternalStore } from "react";
+
+import { isDenControlPlaneConfigured } from "@/app/lib/den";
+import { denSettingsChangedEvent } from "@/app/lib/den-session-events";
+
+function subscribeToDenSettings(onStoreChange: () => void) {
+ if (typeof window === "undefined") return () => {};
+ window.addEventListener(denSettingsChangedEvent, onStoreChange);
+ return () => window.removeEventListener(denSettingsChangedEvent, onStoreChange);
+}
+
+/**
+ * True while some source (build env, desktop-bootstrap.json, a connect link,
+ * the local gateway, or the user's settings) provides a Den control plane.
+ * omnirush.ai ships without a hosted Den, so browser sign-in entry points
+ * hide themselves until a server URL exists; `buildDenAuthUrl` throws
+ * otherwise.
+ */
+export function useDenControlPlaneConfigured(): boolean {
+ return useSyncExternalStore(
+ subscribeToDenSettings,
+ isDenControlPlaneConfigured,
+ isDenControlPlaneConfigured,
+ );
+}
diff --git a/apps/app/src/react-app/domains/session/chat/session-page.tsx b/apps/app/src/react-app/domains/session/chat/session-page.tsx
index f5a858a6..64e3648c 100644
--- a/apps/app/src/react-app/domains/session/chat/session-page.tsx
+++ b/apps/app/src/react-app/domains/session/chat/session-page.tsx
@@ -9,6 +9,7 @@ import { resolveExtensionIconSrc } from "@/react-app/design-system/extension-ico
import { t } from "../../../../i18n";
import { buildDenAuthUrl, readDenBootstrapConfig } from "../../../../app/lib/den";
import { markDesktopSignInInitiated } from "../../../../app/lib/den-sign-in-intent";
+import { useDenControlPlaneConfigured } from "../../cloud/use-den-control-plane-configured";
import { type OmniRushServerClient, type OmniRushServerStatus } from "../../../../app/lib/omnirush-server";
import { getDisplaySessionTitle } from "../../../../app/lib/session-title";
import type { BootPhase } from "../../../../app/lib/startup-boot";
@@ -475,12 +476,21 @@ export function SessionPage(props: SessionPageProps) {
const activeSidePanel = sessionSidePanel;
const sidePanelOpen = activeSidePanel !== null;
const panelRailActive = activeSidePanel === "panel";
- const showCloudSignIn = shellConfig.cloudSignin && !denAuth.isSignedIn && denAuth.status !== "checking";
+ const denControlPlaneConfigured = useDenControlPlaneConfigured();
+ const showCloudSignIn =
+ shellConfig.cloudSignin && denControlPlaneConfigured && !denAuth.isSignedIn && denAuth.status !== "checking";
const openCloudSignIn = useCallback(() => {
- const baseUrl = readDenBootstrapConfig().baseUrl;
+ let url: string;
+ try {
+ // Label stays "Sign in"; opens the sign-up tab so new users aren't defaulted into sign-in.
+ url = buildDenAuthUrl(readDenBootstrapConfig().baseUrl, "sign-up");
+ } catch {
+ // No control plane configured: the button is hidden in that state, and
+ // the sign-in intent must not be marked without a URL to open.
+ return;
+ }
markDesktopSignInInitiated();
- // Label stays "Sign in"; opens the sign-up tab so new users aren't defaulted into sign-in.
- platform.openLink(buildDenAuthUrl(baseUrl, "sign-up"));
+ platform.openLink(url);
}, [platform]);
useReactRenderWatchdog("SessionPage", {
diff --git a/apps/app/src/react-app/domains/session/panel/side-panel.tsx b/apps/app/src/react-app/domains/session/panel/side-panel.tsx
index 6198f227..5d814ff1 100644
--- a/apps/app/src/react-app/domains/session/panel/side-panel.tsx
+++ b/apps/app/src/react-app/domains/session/panel/side-panel.tsx
@@ -67,7 +67,7 @@ if (import.meta.hot) {
const MARKDOWN_PRIMITIVE_ARTIFACT_CONTENT = `# Artifact Markdown Proof
-The artifact preview keeps **outside-chat Markdown** readable with inline \`surface renderer\`, a fenced code block, and [omnirush.ai](https://omnirushlabs.com).
+The artifact preview keeps **outside-chat Markdown** readable with inline \`surface renderer\`, a fenced code block, and [omnirush.ai](https://omnirush.ai).
\`\`\`ts
const surface = "shared markdown primitive";
diff --git a/apps/app/src/react-app/domains/session/sidebar/account-status-menu.tsx b/apps/app/src/react-app/domains/session/sidebar/account-status-menu.tsx
index 6cc7a0d0..8407e69a 100644
--- a/apps/app/src/react-app/domains/session/sidebar/account-status-menu.tsx
+++ b/apps/app/src/react-app/domains/session/sidebar/account-status-menu.tsx
@@ -27,6 +27,7 @@ import { cn } from "@/lib/utils";
import { t } from "@/i18n";
import { usePlatform } from "../../../kernel/platform";
import { isDenSessionRestoring, useDenAuth } from "../../cloud/den-auth-provider";
+import { useDenControlPlaneConfigured } from "../../cloud/use-den-control-plane-configured";
import { useDesktopRestriction } from "../../cloud/desktop-config-provider";
import { useControlAction, type OmniRushControlAction } from "../../../shell/control/control-provider";
import { useShellConfig } from "../../../shell/shell-config";
@@ -48,7 +49,7 @@ import {
} from "../../connections/omnirush-connect-status";
import type { SessionCloudMcpMaintenanceState } from "../../connections/use-session-mcp-maintenance";
-const DOCS_URL = "https://omnirushlabs.com/docs";
+const DOCS_URL = "https://github.com/omnirush-ai/omnirush-gui#readme";
const BOOT_STARTED_AT = Date.now();
const INITIALIZING_MS = 15_000;
@@ -193,6 +194,7 @@ export function AccountStatusMenu(props: AccountStatusMenuProps) {
const [pasteBusy, setPasteBusy] = useState(false);
const [pasteError, setPasteError] = useState<string | null>(null);
const [manualAuthOpen, setManualAuthOpen] = useState(false);
+ const denControlPlaneConfigured = useDenControlPlaneConfigured();
const [initializing, setInitializing] = useState(
() => Date.now() - BOOT_STARTED_AT < INITIALIZING_MS,
);
@@ -281,8 +283,18 @@ export function AccountStatusMenu(props: AccountStatusMenuProps) {
const showStatus = shellConfig.statusBar && (runtimeStatus !== null || connectStatus !== null);
const openSignIn = () => {
+ let url: string;
+ try {
+ url = buildDenAuthUrl(readDenBootstrapConfig().baseUrl, "sign-up");
+ } catch (error) {
+ // No control plane configured: show the reason in the manual sign-in
+ // panel (a pasted sign-in link carries its own server URL).
+ setPasteError(error instanceof Error ? error.message : t("den.error_base_url"));
+ setManualAuthOpen(true);
+ return;
+ }
markDesktopSignInInitiated();
- platform.openLink(buildDenAuthUrl(readDenBootstrapConfig().baseUrl, "sign-up"));
+ platform.openLink(url);
};
const submitPastedCode = async () => {
@@ -471,18 +483,20 @@ export function AccountStatusMenu(props: AccountStatusMenuProps) {
onPointerDown={(event) => event.stopPropagation()}
onKeyDown={(event) => event.stopPropagation()}
>
- <Button
- type="button"
- className="h-11 w-full justify-between px-3 text-sm"
- onClick={openSignIn}
- data-testid="account-cloud-signin-button"
- >
- <span className="inline-flex min-w-0 items-center gap-2">
- <UserRound className="size-3.5" />
- <span className="truncate">Sign in to omnirush.ai Cloud</span>
- </span>
- <ArrowUpRight className="size-3.5" />
- </Button>
+ {denControlPlaneConfigured ? (
+ <Button
+ type="button"
+ className="h-11 w-full justify-between px-3 text-sm"
+ onClick={openSignIn}
+ data-testid="account-cloud-signin-button"
+ >
+ <span className="inline-flex min-w-0 items-center gap-2">
+ <UserRound className="size-3.5" />
+ <span className="truncate">Sign in to omnirush.ai Cloud</span>
+ </span>
+ <ArrowUpRight className="size-3.5" />
+ </Button>
+ ) : null}
<button
type="button"
diff --git a/apps/app/src/react-app/domains/session/surface/session-surface.tsx b/apps/app/src/react-app/domains/session/surface/session-surface.tsx
index e71df66f..86a8a56c 100644
--- a/apps/app/src/react-app/domains/session/surface/session-surface.tsx
+++ b/apps/app/src/react-app/domains/session/surface/session-surface.tsx
@@ -177,7 +177,7 @@ function sanitizedInspectorDiagnosticText(value: string) {
const MARKDOWN_PRIMITIVE_EVAL_TEXT = `# Markdown proof heading
-This shared renderer keeps **bold proof text**, inline \`renderMarkdownHtml\`, and [omnirush.ai link](https://omnirushlabs.com) readable in one message.
+This shared renderer keeps **bold proof text**, inline \`renderMarkdownHtml\`, and [omnirush.ai link](https://omnirush.ai) readable in one message.
\`\`\`ts
const pipeline = "shared markdown primitive";
@@ -363,7 +363,7 @@ function createChatTranscriptEvalMessages(sessionId: string) {
},
{
type: "text",
- text: "Your plan is drafted — details in [omnirush.ai](https://omnirushlabs.com). Search token: chat-transcript-proof.",
+ text: "Your plan is drafted — details in [omnirush.ai](https://omnirush.ai). Search token: chat-transcript-proof.",
},
],
// `completed` makes the finished turn fold behind a real
diff --git a/apps/app/src/react-app/domains/settings/cloud/control-plane-url-editor.tsx b/apps/app/src/react-app/domains/settings/cloud/control-plane-url-editor.tsx
index 846f4ade..3e36877e 100644
--- a/apps/app/src/react-app/domains/settings/cloud/control-plane-url-editor.tsx
+++ b/apps/app/src/react-app/domains/settings/cloud/control-plane-url-editor.tsx
@@ -29,7 +29,7 @@ export function ControlPlaneUrlEditor(props: ControlPlaneUrlEditorProps) {
label={props.label}
value={props.value}
onChange={(event) => props.onValueChange(event.currentTarget.value)}
- placeholder={props.placeholder ?? DEFAULT_DEN_BASE_URL}
+ placeholder={props.placeholder ?? (DEFAULT_DEN_BASE_URL || "https://den.example.com")}
hint={props.hint}
disabled={props.disabled}
/>
diff --git a/apps/app/src/react-app/domains/settings/cloud/use-den-session.tsx b/apps/app/src/react-app/domains/settings/cloud/use-den-session.tsx
index 25030dbd..e610e5fa 100644
--- a/apps/app/src/react-app/domains/settings/cloud/use-den-session.tsx
+++ b/apps/app/src/react-app/domains/settings/cloud/use-den-session.tsx
@@ -221,7 +221,16 @@ export function useDenSession({
const openBrowserAuth = React.useCallback(
(mode: "sign-in" | "sign-up") => {
- const url = buildDenAuthUrl(baseUrl, mode);
+ let url: string;
+ try {
+ url = buildDenAuthUrl(baseUrl, mode);
+ } catch (error) {
+ // No control plane configured: say so next to the server URL field
+ // instead of failing silently inside the click handler.
+ setStatusMessage(null);
+ setAuthError(error instanceof Error ? error.message : t("den.error_base_url"));
+ return;
+ }
const usesPasteHandoff = new URL(url).searchParams.get("desktopAuth") === "1";
markDesktopSignInInitiated();
setSigninFallbackUrl(url);
diff --git a/apps/app/src/react-app/domains/settings/pages/updates-view.tsx b/apps/app/src/react-app/domains/settings/pages/updates-view.tsx
index df8653f9..6b2cd0cc 100644
--- a/apps/app/src/react-app/domains/settings/pages/updates-view.tsx
+++ b/apps/app/src/react-app/domains/settings/pages/updates-view.tsx
@@ -18,6 +18,7 @@ import { Switch } from "@/components/ui/switch";
import { formatBytes, formatRelativeTime } from "../../../../app/utils";
import { t } from "../../../../i18n";
import type { ReleaseChannel } from "../../../../app/types";
+import type { UpdaterInstallMode } from "../../../../app/lib/desktop";
import type { SettingsUpdateStatus } from "../state/electron-updater-state";
import {
LayoutSectionItem,
@@ -82,11 +83,17 @@ export type UpdatesViewProps = {
*/
onReleaseChannelChange?: (next: ReleaseChannel) => void;
/**
- * Whether the alpha channel is available on this platform. Alpha is
- * macOS-only today; other platforms should receive `false` so the
- * toggle is hidden.
+ * Whether this distribution ships an Alpha feed. The public build does
+ * not, so the channel selector stays hidden unless the desktop shell
+ * reports a feed.
*/
alphaChannelSupported?: boolean;
+ /**
+ * How the shell applies a downloaded update. "manual-dmg" (macOS builds
+ * without a Developer ID signature) opens the installer instead of
+ * restarting in place, so the buttons say so.
+ */
+ installMode?: UpdaterInstallMode | null;
};
export function UpdatesView(props: UpdatesViewProps) {
@@ -104,6 +111,10 @@ export function UpdatesView(props: UpdatesViewProps) {
? t("settings.update_download_failed")
: t("settings.update_check_failed");
const updateNotes = props.updateStatus?.notes ?? null;
+ const manualInstall = props.installMode === "manual-dmg";
+ const installButtonLabel = manualInstall
+ ? t("settings.update_open_installer_button")
+ : t("settings.update_install_button");
const updateRestartActiveRunsMessage =
updateState === "ready" && props.anyActiveRuns
@@ -131,7 +142,7 @@ export function UpdatesView(props: UpdatesViewProps) {
? t("settings.update_blocked_version", undefined, { version: updateVersion ?? "" })
: updateState === "downloading"
? t("settings.update_downloading")
- : updateState === "ready"
+ : updateState === "ready" || updateState === "installer-opened"
? t("settings.update_ready_version", undefined, { version: updateVersion ?? "" })
: updateState === "error"
? updateErrorTitle
@@ -179,7 +190,7 @@ export function UpdatesView(props: UpdatesViewProps) {
}}
disabled={props.busy}
>
- {t("settings.update_install_button")}
+ {installButtonLabel}
</Button>
) : null}
</div>
@@ -204,6 +215,20 @@ export function UpdatesView(props: UpdatesViewProps) {
</Alert>
) : null}
+ {updateState === "ready" && manualInstall ? (
+ <Alert>
+ <Info />
+ <AlertDescription>{t("settings.update_manual_install_hint")}</AlertDescription>
+ </Alert>
+ ) : null}
+
+ {updateState === "installer-opened" ? (
+ <Alert>
+ <Info />
+ <AlertDescription>{t("settings.update_installer_opened")}</AlertDescription>
+ </Alert>
+ ) : null}
+
{updateRestartActiveRunsMessage ? (
<Alert>
<Info />
@@ -215,7 +240,7 @@ export function UpdatesView(props: UpdatesViewProps) {
open={confirmRestartOpen}
title={t("settings.update_restart_confirm_title")}
message={t("settings.update_restart_confirm_message")}
- confirmLabel={t("settings.update_install_button")}
+ confirmLabel={installButtonLabel}
cancelLabel={t("common.cancel")}
onConfirm={() => {
setConfirmRestartOpen(false);
@@ -247,7 +272,7 @@ export function UpdatesView(props: UpdatesViewProps) {
<LayoutSectionItemHeader>
<LayoutSectionItemTitle>Release channel</LayoutSectionItemTitle>
<LayoutSectionItemDescription>
- Stable gets fully tested releases. Alpha includes the very latest changes but may be less polished (macOS only).
+ Stable gets fully tested releases. Alpha includes the very latest changes but may be less polished.
</LayoutSectionItemDescription>
<LayoutSectionItemHeaderActions>
<Select
diff --git a/apps/app/src/react-app/domains/settings/state/desktop-updater-provider.tsx b/apps/app/src/react-app/domains/settings/state/desktop-updater-provider.tsx
index 2ed8d110..e1515a05 100644
--- a/apps/app/src/react-app/domains/settings/state/desktop-updater-provider.tsx
+++ b/apps/app/src/react-app/domains/settings/state/desktop-updater-provider.tsx
@@ -70,6 +70,10 @@ export function DesktopUpdateButton() {
const appName = useBrandAppName();
const [confirmRestart, setConfirmRestart] = useState(false);
if (updater?.updateStatus?.state !== "ready") return null;
+ // macOS builds without a Developer ID signature cannot swap themselves:
+ // the shell opens the downloaded DMG and quits, so say that instead of
+ // promising a restart.
+ const manualInstall = updater.installMode === "manual-dmg";
return (
<>
<Tooltip>
@@ -82,22 +86,32 @@ export function DesktopUpdateButton() {
className="mac:titlebar-no-drag h-7 gap-1.5 rounded-lg border border-foreground/[0.06] bg-foreground/[0.04] px-2.5 text-xs font-medium text-foreground/80 shadow-none transition-colors hover:bg-foreground/[0.08] hover:text-foreground"
>
<RotateCw className="size-3.5 opacity-70" strokeWidth={1.75} aria-hidden="true" />
- {t("settings.update_restart_button")}
+ {manualInstall ? t("settings.update_open_installer_button") : t("settings.update_restart_button")}
</Button>
} />
- <TooltipContent side="bottom" align="end">{t("settings.update_on_quit_hint")}</TooltipContent>
+ <TooltipContent side="bottom" align="end">
+ {manualInstall ? t("settings.update_manual_install_hint") : t("settings.update_on_quit_hint")}
+ </TooltipContent>
</Tooltip>
<AlertDialog open={confirmRestart} onOpenChange={setConfirmRestart}>
<AlertDialogContent className="max-w-[340px] gap-0 rounded-[15px] border border-border p-6 ring-0 sm:max-w-[340px]">
<RotateCw className="mb-3 size-6 text-muted-foreground" aria-hidden="true" />
- <AlertDialogTitle className="mb-2 text-[19px] leading-tight tracking-tight">{t("settings.update_restart_now_title", undefined, { appName })}</AlertDialogTitle>
- <AlertDialogDescription className="text-xs leading-[1.75]">{t("settings.update_restart_now_message", undefined, { appName })}</AlertDialogDescription>
+ <AlertDialogTitle className="mb-2 text-[19px] leading-tight tracking-tight">
+ {manualInstall
+ ? t("settings.update_open_installer_now_title")
+ : t("settings.update_restart_now_title", undefined, { appName })}
+ </AlertDialogTitle>
+ <AlertDialogDescription className="text-xs leading-[1.75]">
+ {manualInstall
+ ? t("settings.update_open_installer_now_message", undefined, { appName })
+ : t("settings.update_restart_now_message", undefined, { appName })}
+ </AlertDialogDescription>
<AlertDialogFooter className="mt-5">
<AlertDialogCancel variant="ghost" size="sm" className="rounded-[7px] text-[11px] text-muted-foreground">{t("settings.update_keep_working")}</AlertDialogCancel>
<AlertDialogAction size="sm" className="rounded-[7px] text-[11px]" onClick={() => {
setConfirmRestart(false);
void updater.installUpdateAndRestart();
- }}>{t("settings.update_restart_confirm_action")}</AlertDialogAction>
+ }}>{manualInstall ? t("settings.update_open_installer_button") : t("settings.update_restart_confirm_action")}</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
diff --git a/apps/app/src/react-app/domains/settings/state/electron-updater-state.test.ts b/apps/app/src/react-app/domains/settings/state/electron-updater-state.test.ts
index b3e061e9..57c1d145 100644
--- a/apps/app/src/react-app/domains/settings/state/electron-updater-state.test.ts
+++ b/apps/app/src/react-app/domains/settings/state/electron-updater-state.test.ts
@@ -2,13 +2,16 @@ declare const describe: (name: string, fn: () => void) => void;
declare const test: (name: string, fn: () => void) => void;
declare const expect: (value: unknown) => {
toBe: (expected: unknown) => void;
+ toContain: (expected: unknown) => void;
toEqual: (expected: unknown) => void;
};
import {
ELECTRON_UPDATER_UNSUPPORTED_REASON,
+ describeError,
resolveCheckedUpdateState,
shouldScheduleElectronUpdateAutoCheck,
+ stripRemoteMethodErrorPrefix,
unsupportedElectronUpdaterEnvState,
} from "./electron-updater-state";
@@ -20,6 +23,8 @@ describe("electron updater web unsupported state", () => {
supported: false,
reason: ELECTRON_UPDATER_UNSUPPORTED_REASON,
},
+ installMode: null,
+ alphaChannelSupported: null,
});
});
@@ -33,6 +38,29 @@ describe("electron updater web unsupported state", () => {
});
});
+describe("electron updater error text", () => {
+ test("strips the Electron remote-method prefix from bridge failures", () => {
+ expect(describeError(new Error(
+ "Error invoking remote method 'omnirush:desktop': Error: net::ERR_NAME_NOT_RESOLVED",
+ ))).toBe("net::ERR_NAME_NOT_RESOLVED");
+ expect(stripRemoteMethodErrorPrefix(
+ "Error invoking remote method 'omnirush:updater:check': Error: Error invoking remote method 'omnirush:desktop': Error: HTTP 404",
+ )).toBe("HTTP 404");
+ expect(stripRemoteMethodErrorPrefix("Error invoking remote method 'omnirush:desktop': Request timed out.")).toBe(
+ "Request timed out.",
+ );
+ });
+
+ test("leaves ordinary messages and non-errors alone", () => {
+ expect(describeError(new Error("network flake"))).toBe("network flake");
+ expect(describeError("plain text")).toBe("\"plain text\"");
+ expect(describeError({ reason: "boom" })).toContain("\"reason\": \"boom\"");
+ expect(stripRemoteMethodErrorPrefix("Error invoking remote method 'omnirush:desktop': ")).toBe(
+ "Error invoking remote method 'omnirush:desktop':",
+ );
+ });
+});
+
describe("electron updater availability state", () => {
test("does not report a policy-blocked available update as current", () => {
expect(resolveCheckedUpdateState({ available: true, allowed: false })).toBe("blocked");
diff --git a/apps/app/src/react-app/domains/settings/state/electron-updater-state.ts b/apps/app/src/react-app/domains/settings/state/electron-updater-state.ts
index 3d553c9a..9ec10c83 100644
--- a/apps/app/src/react-app/domains/settings/state/electron-updater-state.ts
+++ b/apps/app/src/react-app/domains/settings/state/electron-updater-state.ts
@@ -1,7 +1,8 @@
/** @jsxImportSource react */
import { useCallback, useEffect, useReducer, useRef, useState } from "react";
-import type { DenDesktopConfig } from "../../../../app/lib/den";
+import { isDenControlPlaneConfigured, type DenDesktopConfig } from "../../../../app/lib/den";
+import type { UpdaterInstallMode } from "../../../../app/lib/desktop";
import {
isAlphaChannelAllowedByDesktopConfig,
isAlphaUpdateAllowed,
@@ -17,7 +18,7 @@ import { t } from "../../../../i18n";
import { useUpdateCheckRequestStore } from "./update-check-request";
export type SettingsUpdateStatus = {
- state: "idle" | "checking" | "available" | "blocked" | "downloading" | "ready" | "error";
+ state: "idle" | "checking" | "available" | "blocked" | "downloading" | "ready" | "installer-opened" | "error";
lastCheckedAt?: number | null;
version?: string;
date?: string;
@@ -51,6 +52,13 @@ type UseElectronUpdaterStateOptions = {
export type ElectronUpdaterEnvState = {
appVersion: string | null;
updateEnv: { supported?: boolean; reason?: string | null } | null;
+ /** How the shell applies updates; null until the bridge reports it. */
+ installMode: UpdaterInstallMode | null;
+ /**
+ * Whether this distribution ships an Alpha feed. null until the bridge
+ * reports it so a stored Alpha preference is not rewritten before we know.
+ */
+ alphaChannelSupported: boolean | null;
};
export const ELECTRON_UPDATER_UNSUPPORTED_REASON = "Electron updater bridge is unavailable.";
@@ -59,6 +67,8 @@ export function unsupportedElectronUpdaterEnvState(): ElectronUpdaterEnvState {
return {
appVersion: null,
updateEnv: { supported: false, reason: ELECTRON_UPDATER_UNSUPPORTED_REASON },
+ installMode: null,
+ alphaChannelSupported: null,
};
}
@@ -83,6 +93,7 @@ export function resolveCheckedUpdateState(input: {
type ElectronUpdaterEnvAction =
| { type: "app-version"; appVersion: string | null }
+ | { type: "capabilities"; installMode?: UpdaterInstallMode | null; alphaChannelSupported?: boolean | null }
| { type: "unsupported"; reason: string };
function electronUpdaterEnvReducer(
@@ -92,6 +103,12 @@ function electronUpdaterEnvReducer(
switch (action.type) {
case "app-version":
return { ...state, appVersion: action.appVersion };
+ case "capabilities": {
+ const installMode = action.installMode ?? state.installMode;
+ const alphaChannelSupported = action.alphaChannelSupported ?? state.alphaChannelSupported;
+ if (installMode === state.installMode && alphaChannelSupported === state.alphaChannelSupported) return state;
+ return { ...state, installMode, alphaChannelSupported };
+ }
case "unsupported":
return {
...state,
@@ -100,6 +117,17 @@ function electronUpdaterEnvReducer(
}
}
+function capabilitiesFromBridge(state: {
+ installMode?: UpdaterInstallMode;
+ alphaChannelSupported?: boolean;
+} | null | undefined): ElectronUpdaterEnvAction {
+ return {
+ type: "capabilities",
+ installMode: state?.installMode === "manual-dmg" || state?.installMode === "in-place" ? state.installMode : null,
+ alphaChannelSupported: typeof state?.alphaChannelSupported === "boolean" ? state.alphaChannelSupported : null,
+ };
+}
+
function electronUpdaterBridge(): ElectronUpdaterBridge | null {
if (typeof window === "undefined") return null;
if (import.meta.env.DEV && window.__omnirushUpdaterEvalBridge) {
@@ -108,10 +136,25 @@ function electronUpdaterBridge(): ElectronUpdaterBridge | null {
return window.__OMNIRUSH_ELECTRON__?.updater ?? null;
}
-function describeError(error: unknown) {
- if (error instanceof Error) return error.message;
+// Electron wraps every rejected ipcRenderer.invoke as
+// "Error invoking remote method '<channel>': Error: <message>", sometimes
+// nested when a bridge call fails inside another. Only the innermost message
+// means anything to the person reading the Updates page.
+const REMOTE_METHOD_ERROR_PREFIX = /^Error invoking remote method '[^']*':\s*(?:Error:\s*)?/;
+
+export function stripRemoteMethodErrorPrefix(message: string): string {
+ let current = message.trim();
+ for (;;) {
+ const next = current.replace(REMOTE_METHOD_ERROR_PREFIX, "").trim();
+ if (next === current || !next) return current;
+ current = next;
+ }
+}
+
+export function describeError(error: unknown): string {
+ if (error instanceof Error) return stripRemoteMethodErrorPrefix(error.message);
const serialized = safeStringify(error);
- return serialized && serialized !== "{}" ? serialized : String(error);
+ return stripRemoteMethodErrorPrefix(serialized && serialized !== "{}" ? serialized : String(error));
}
function releaseNotesToText(value: unknown): string | undefined {
@@ -158,8 +201,10 @@ export function useElectronUpdaterState(options: UseElectronUpdaterStateOptions)
updateEnv: isElectronRuntime()
? null
: { supported: false, reason: ELECTRON_UPDATER_UNSUPPORTED_REASON },
+ installMode: null,
+ alphaChannelSupported: null,
});
- const { appVersion, updateEnv } = envState;
+ const { appVersion, updateEnv, installMode, alphaChannelSupported } = envState;
const updateStatusRef = useRef(updateStatus);
updateStatusRef.current = updateStatus;
const lastAutoCheckAtRef = useRef(0);
@@ -171,13 +216,18 @@ export function useElectronUpdaterState(options: UseElectronUpdaterStateOptions)
const downloadedReleaseChannelRef = useRef<ReleaseChannel | null>(null);
const desktopConfigRef = useRef(desktopConfig);
desktopConfigRef.current = desktopConfig;
- const policyReleaseChannel = resolveDesktopUpdateChannel(
- releaseChannel,
- desktopConfig,
- );
+ // Until the shell reports whether this distribution ships an Alpha feed,
+ // the stored preference is left alone; once it says no, Alpha collapses to
+ // Stable everywhere (the public build has no Alpha feed).
+ const policyReleaseChannel = alphaChannelSupported === false
+ ? "stable"
+ : resolveDesktopUpdateChannel(releaseChannel, desktopConfig);
const resolvePolicyReleaseChannel = useCallback(
async (channel: ReleaseChannel) => {
+ if (channel === "alpha" && alphaChannelSupported === false) {
+ return { channel: "stable" as const, desktopConfig };
+ }
if (
channel !== "alpha" ||
!isAlphaChannelAllowedByDesktopConfig(desktopConfig)
@@ -194,7 +244,7 @@ export function useElectronUpdaterState(options: UseElectronUpdaterStateOptions)
desktopConfig: freshDesktopConfig,
};
},
- [desktopConfig, refreshDesktopConfig],
+ [alphaChannelSupported, desktopConfig, refreshDesktopConfig],
);
useEffect(() => {
@@ -233,10 +283,19 @@ export function useElectronUpdaterState(options: UseElectronUpdaterStateOptions)
.then(async (state) => {
if (cancelled) return;
dispatchEnvState({ type: "app-version", appVersion: state.currentVersion ?? null });
- if (state.channel && state.channel !== policyReleaseChannel && bridge.setChannel) {
+ dispatchEnvState(capabilitiesFromBridge(state));
+ // The shell already normalized an unsupported Alpha selection to
+ // Stable; mirror that instead of asking it to switch again.
+ const shellChannel = state.channel ?? null;
+ if (shellChannel && shellChannel !== policyReleaseChannel && bridge.setChannel) {
+ if (state.alphaChannelSupported === false && policyReleaseChannel === "alpha") {
+ onReleaseChannelChange(shellChannel);
+ return;
+ }
const nextState = await bridge.setChannel(policyReleaseChannel);
if (cancelled) return;
dispatchEnvState({ type: "app-version", appVersion: nextState.currentVersion ?? null });
+ dispatchEnvState(capabilitiesFromBridge(nextState));
if (nextState.channel && nextState.channel !== policyReleaseChannel) {
onReleaseChannelChange(nextState.channel);
}
@@ -319,11 +378,12 @@ export function useElectronUpdaterState(options: UseElectronUpdaterStateOptions)
if (!result?.ok) {
setUpdateStatus({
state: "error",
- message: result?.reason ?? "Update download failed.",
+ message: result?.reason ? stripRemoteMethodErrorPrefix(result.reason) : "Update download failed.",
failedAction: "download",
});
return;
}
+ dispatchEnvState(capabilitiesFromBridge({ installMode: result.mode }));
if (
releaseChannelResolution.channel === "alpha" &&
!isAlphaChannelAllowedByDesktopConfig(desktopConfigRef.current)
@@ -389,9 +449,13 @@ export function useElectronUpdaterState(options: UseElectronUpdaterStateOptions)
await bridge.setChannel?.(activeReleaseChannel);
if (!isCurrentRequest()) return;
}
- if (manual && activeReleaseChannel === "stable") {
+ // Den's release inventory only exists when a control plane is
+ // configured. omnirush.ai ships without one: the GitHub feed the shell
+ // reads is then the only authority, and no other host is contacted.
+ if (manual && activeReleaseChannel === "stable" && isDenControlPlaneConfigured()) {
const channelState = await bridge.getChannel?.();
if (!isCurrentRequest()) return;
+ dispatchEnvState(capabilitiesFromBridge(channelState));
const currentVersion = channelState?.currentVersion ?? appVersion;
if (!currentVersion) {
throw new Error("Could not determine the installed omnirush.ai version.");
@@ -430,6 +494,7 @@ export function useElectronUpdaterState(options: UseElectronUpdaterStateOptions)
let result = await bridge.check(activeReleaseChannel, targetVersion);
if (!isCurrentRequest()) return;
dispatchEnvState({ type: "app-version", appVersion: result.currentVersion ?? null });
+ dispatchEnvState(capabilitiesFromBridge(result));
let checkedReleaseChannel = result.channel ?? activeReleaseChannel;
if (
!result.reason &&
@@ -467,7 +532,7 @@ export function useElectronUpdaterState(options: UseElectronUpdaterStateOptions)
if (result.reason) {
setUpdateStatus({
state: "error",
- message: result.reason,
+ message: stripRemoteMethodErrorPrefix(result.reason),
failedAction: "check",
});
return;
@@ -606,9 +671,19 @@ export function useElectronUpdaterState(options: UseElectronUpdaterStateOptions)
}
setUpdateStatus({
state: "error",
- message: result?.reason ?? "Update install failed.",
+ message: result?.reason ? stripRemoteMethodErrorPrefix(result.reason) : "Update install failed.",
failedAction: "install",
});
+ return;
+ }
+ if (result.mode === "manual-dmg") {
+ // The shell opened the DMG and quits shortly; leave the instructions
+ // on screen instead of a stale "Ready to install" button.
+ dispatchEnvState(capabilitiesFromBridge({ installMode: "manual-dmg" }));
+ setUpdateStatus((current) => ({
+ ...(current ?? {}),
+ state: "installer-opened",
+ }));
}
} catch (error) {
if (!isCurrentReleaseChannel()) return;
@@ -635,6 +710,7 @@ export function useElectronUpdaterState(options: UseElectronUpdaterStateOptions)
const state = await bridge.setChannel(allowedReleaseChannel);
if (releaseChannelRequestRef.current !== requestId) return;
dispatchEnvState({ type: "app-version", appVersion: state.currentVersion ?? null });
+ dispatchEnvState(capabilitiesFromBridge(state));
if (state.channel && state.channel !== allowedReleaseChannel) {
onReleaseChannelChange(state.channel);
}
@@ -654,6 +730,8 @@ export function useElectronUpdaterState(options: UseElectronUpdaterStateOptions)
return {
appVersion,
updateEnv,
+ installMode,
+ alphaChannelSupported: alphaChannelSupported === true,
updateStatus,
checkForUpdates,
downloadUpdate,
diff --git a/apps/app/src/react-app/domains/workspace/omnirush-den-help-link.tsx b/apps/app/src/react-app/domains/workspace/omnirush-den-help-link.tsx
index 680360d0..77ac61a6 100644
--- a/apps/app/src/react-app/domains/workspace/omnirush-den-help-link.tsx
+++ b/apps/app/src/react-app/domains/workspace/omnirush-den-help-link.tsx
@@ -12,8 +12,8 @@ import {
DialogTitle,
} from "@/components/ui/dialog";
-const SUPPORT_EMAIL = "[email protected]";
-const SUPPORT_MAILTO = `mailto:${SUPPORT_EMAIL}?subject=omnirush.ai%20Den%20remote%20worker%20upgrade`;
+const SUPPORT_ISSUES_URL = "https://github.com/omnirush-ai/omnirush-gui/issues";
+const SUPPORT_NEW_ISSUE_URL = `${SUPPORT_ISSUES_URL}/new?title=${encodeURIComponent("Den remote worker upgrade")}`;
/**
* Small inline link rendered inside the remote-worker error card. When clicked,
@@ -48,12 +48,14 @@ export function OmniRushDenHelpLink() {
<p>To get back online, you have two options:</p>
<ul className="ml-4 list-disc space-y-2">
<li>
- Email{" "}
+ Open an issue at{" "}
<a
- href={SUPPORT_MAILTO}
+ href={SUPPORT_ISSUES_URL}
+ target="_blank"
+ rel="noreferrer"
className="font-medium text-blue-11 hover:underline"
>
- {SUPPORT_EMAIL}
+ {SUPPORT_ISSUES_URL}
</a>{" "}
and ask us to upgrade your worker.
</li>
@@ -72,10 +74,10 @@ export function OmniRushDenHelpLink() {
<Button
type="button"
onClick={() => {
- window.location.href = SUPPORT_MAILTO;
+ window.open(SUPPORT_NEW_ISSUE_URL, "_blank", "noopener,noreferrer");
}}
>
- Email support
+ Open an issue
</Button>
</DialogFooter>
</DialogContent>
diff --git a/apps/app/src/react-app/domains/workspace/remote-workspace-diagnostics.ts b/apps/app/src/react-app/domains/workspace/remote-workspace-diagnostics.ts
index de23ade5..8e88bb1e 100644
--- a/apps/app/src/react-app/domains/workspace/remote-workspace-diagnostics.ts
+++ b/apps/app/src/react-app/domains/workspace/remote-workspace-diagnostics.ts
@@ -104,7 +104,7 @@ function rejectedTokenMessage(target: RemoteWorkspaceConnectionTarget) {
}
function remoteSupportMessage(message: string) {
- return `${message} Upgrade the omnirush.ai host and try again. If this continues, contact [email protected].`;
+ return `${message} Upgrade the omnirush.ai host and try again. If this continues, open an issue at https://github.com/omnirush-ai/omnirush-gui/issues.`;
}
export function redactRemoteDiagnosticText(value: string): string {
diff --git a/apps/app/src/react-app/shell/settings-route.tsx b/apps/app/src/react-app/shell/settings-route.tsx
index f8a87082..70c9d3d9 100644
--- a/apps/app/src/react-app/shell/settings-route.tsx
+++ b/apps/app/src/react-app/shell/settings-route.tsx
@@ -127,7 +127,6 @@ import {
workspaceSetRuntimeActive,
workspaceSetSelected,
desktopBridge,
- readDesktopDistributionInfo,
type WorkspaceInfo,
type WorkspaceList,
revealDesktopItemInDir,
@@ -2536,12 +2535,14 @@ function SettingsRouteContent(props: SettingsSurfaceProps = {}) {
installUpdateAndRestart={electronUpdaterState.installUpdateAndRestart}
releaseChannel={local.prefs.releaseChannel ?? "stable"}
onReleaseChannelChange={electronUpdaterState.setReleaseChannel}
+ // The shell reports an Alpha feed only for distributions that
+ // ship one; the public build never does.
alphaChannelSupported={
isElectronRuntime() &&
- isMacPlatform() &&
- readDesktopDistributionInfo().flavor === "public" &&
+ electronUpdaterState.alphaChannelSupported &&
desktopConfig.config.allowAlphaUpdates !== false
}
+ installMode={electronUpdaterState.installMode}
/>
);
case "environment":
diff --git a/apps/app/src/react-app/shell/welcome-route.tsx b/apps/app/src/react-app/shell/welcome-route.tsx
index 8b595dac..c898f00a 100644
--- a/apps/app/src/react-app/shell/welcome-route.tsx
+++ b/apps/app/src/react-app/shell/welcome-route.tsx
@@ -23,6 +23,7 @@ import { AttributionStep, type AttributionSource } from "../domains/onboarding/a
import { CreateWorkspaceModal } from "../domains/workspace/create-workspace-modal";
import type { CreateWorkspaceOptions } from "../domains/workspace/types";
import { useDenAuth } from "../domains/cloud/den-auth-provider";
+import { useDenControlPlaneConfigured } from "../domains/cloud/use-den-control-plane-configured";
import { JoinOrganizationDialog } from "../domains/cloud/join-organization-dialog";
import { resolveOmniRushConnection } from "./omnirush-connection";
import { captureAnalyticsEvent } from "../../app/lib/analytics";
@@ -132,6 +133,7 @@ export function WelcomeRoute() {
const navigate = useNavigate();
const local = useLocal();
const platform = usePlatform();
+ const denControlPlaneConfigured = useDenControlPlaneConfigured();
const denAuth = useDenAuth();
const [state, dispatch] = useReducer(welcomeReducer, initialWelcomeState);
const [manualFolder, setManualFolder] = useState("");
@@ -347,10 +349,18 @@ export function WelcomeRoute() {
}, [handleCreateWorkspace, manualFolder]);
const handleTeamSignIn = useCallback(() => {
+ // Resolve the sign-in URL before any side effect: without a control plane
+ // there is nothing to open, so onboarding and the sign-in intent must not
+ // be marked. The button is hidden in that state (see onTeamSignIn below).
+ let url: string;
+ try {
+ url = buildDenAuthUrl(readDenSettings().baseUrl || DEFAULT_DEN_BASE_URL, "sign-in");
+ } catch {
+ return;
+ }
markOnboardingComplete();
- const settings = readDenSettings();
markDesktopSignInInitiated();
- platform.openLink(buildDenAuthUrl(settings.baseUrl || DEFAULT_DEN_BASE_URL, "sign-in"));
+ platform.openLink(url);
}, [markOnboardingComplete, platform]);
const finishOnboarding = useCallback(() => {
@@ -392,7 +402,7 @@ export function WelcomeRoute() {
onManualFolderChange={setManualFolder}
onUseManualFolder={handleUseManualFolder}
showManualFolder={import.meta.env.DEV && isDesktopRuntime()}
- onTeamSignIn={handleTeamSignIn}
+ onTeamSignIn={denControlPlaneConfigured ? handleTeamSignIn : undefined}
onJoinOrganization={() => setJoinOrganizationOpen(true)}
/>
<JoinOrganizationDialog
diff --git a/apps/app/tests/den-bootstrap-origin-coherence.test.ts b/apps/app/tests/den-bootstrap-origin-coherence.test.ts
index 7d02b9d2..96395e08 100644
--- a/apps/app/tests/den-bootstrap-origin-coherence.test.ts
+++ b/apps/app/tests/den-bootstrap-origin-coherence.test.ts
@@ -452,7 +452,9 @@ describe("den bootstrap and retained session origin coherence", () => {
const config = await initializeDenBootstrapConfig();
- expect(config.baseUrl.length).toBeGreaterThan(0);
+ // No build default control plane exists, so the placeholder stays empty
+ // instead of pointing at a host nobody configured.
+ expect(config.baseUrl).toBe("");
expect(getDenBootstrapResolution()).toBe("unresolved");
const settings = readDenSettings();
expect(settings.authToken).toBeNull();
diff --git a/apps/app/tests/den-mcp-url.test.ts b/apps/app/tests/den-mcp-url.test.ts
index b63950c5..300d820c 100644
--- a/apps/app/tests/den-mcp-url.test.ts
+++ b/apps/app/tests/den-mcp-url.test.ts
@@ -47,24 +47,24 @@ describe("resolveDenBaseUrls", () => {
expect(resolved.apiBaseUrl).toBe("https://api.den.example");
});
- test("derives the api subdomain for hosted omnirushlabs.com deployments", () => {
- const resolved = resolveDenBaseUrls({ baseUrl: "https://staging.omnirushlabs.com" });
- expect(resolved.baseUrl).toBe("https://staging.omnirushlabs.com");
- expect(resolved.apiBaseUrl).toBe("https://api.staging.omnirushlabs.com");
+ test("never invents an api subdomain: only explicit api hosts skip the same-origin proxy", () => {
+ const resolved = resolveDenBaseUrls({ baseUrl: "https://app.den.example" });
+ expect(resolved.baseUrl).toBe("https://app.den.example");
+ expect(resolved.apiBaseUrl).toBe("https://app.den.example/api/den");
});
- test("uses the nested hosted API origin for the hosted web default", () => {
- const resolved = resolveDenBaseUrls({ baseUrl: "https://app.omnirushlabs.com" });
- expect(resolved.baseUrl).toBe("https://app.omnirushlabs.com");
- expect(resolved.apiBaseUrl).toBe("https://api.app.omnirushlabs.com");
+ test("resolves to empty base URLs when no control plane is configured", () => {
+ const resolved = resolveDenBaseUrls({ baseUrl: null });
+ expect(resolved.baseUrl).toBe("");
+ expect(resolved.apiBaseUrl).toBe("");
});
});
describe("getDenMcpUrl", () => {
- test("never targets the bare web-app origin", () => {
+ test("never targets the bare web-app origin and is empty without a control plane", () => {
const url = getDenMcpUrl();
expect(isLegacyWebAppMcpUrl(url)).toBe(false);
- expect(url.endsWith("/mcp")).toBe(true);
+ expect(url === "" || url.endsWith("/api/den/mcp")).toBe(true);
});
});
@@ -86,24 +86,15 @@ describe("isLegacyWebAppMcpUrl", () => {
});
describe("resolveCloudMcpResourceUrl", () => {
- test("heals hosted minted web-app resources to the direct API origin", () => {
- expect(resolveCloudMcpResourceUrl("https://app.omnirushlabs.com/mcp")).toBe(
- "https://api.app.omnirushlabs.com/mcp",
- );
- expect(resolveCloudMcpResourceUrl("https://app.omnirushlabs.com/api/den/mcp")).toBe(
- "https://api.app.omnirushlabs.com/mcp",
- );
- });
-
- test("heals non-hosted legacy web-app resources through the /api/den proxy", () => {
+ test("heals legacy web-app resources through the /api/den proxy", () => {
expect(resolveCloudMcpResourceUrl("https://app.omnirush.software/mcp/")).toBe(
"https://app.omnirush.software/api/den/mcp",
);
});
test("keeps healthy resources verbatim", () => {
- expect(resolveCloudMcpResourceUrl("https://api.app.omnirushlabs.com/mcp")).toBe(
- "https://api.app.omnirushlabs.com/mcp",
+ expect(resolveCloudMcpResourceUrl("https://api.den.example/mcp")).toBe(
+ "https://api.den.example/mcp",
);
expect(resolveCloudMcpResourceUrl("https://app.example.com/api/den/mcp")).toBe(
"https://app.example.com/api/den/mcp",
diff --git a/apps/app/tests/den-sign-out.test.ts b/apps/app/tests/den-sign-out.test.ts
index ab9a19a0..a2a6dd21 100644
--- a/apps/app/tests/den-sign-out.test.ts
+++ b/apps/app/tests/den-sign-out.test.ts
@@ -69,7 +69,7 @@ describe("Den sign-out", () => {
expect(requests).toEqual(["https://api.den.test/api/auth/sign-out"]);
});
- test("routes hosted desktop sign-out to the nested hosted API default", async () => {
+ test("routes desktop sign-out through the same-origin API proxy by default", async () => {
const requests: string[] = [];
Object.defineProperty(globalThis, "window", {
configurable: true,
@@ -85,11 +85,11 @@ describe("Den sign-out", () => {
});
await createDenClient({
- baseUrl: "https://app.omnirushlabs.com",
+ baseUrl: "https://den.example.com",
token: "tok_test",
}).signOut();
- expect(requests).toEqual(["https://api.app.omnirushlabs.com/api/auth/sign-out"]);
+ expect(requests).toEqual(["https://den.example.com/api/den/api/auth/sign-out"]);
});
test("keeps legacy desktop proxy API bases working for sign-out", async () => {
diff --git a/apps/app/tests/gateway-runtime.test.ts b/apps/app/tests/gateway-runtime.test.ts
index 1d47a174..22cbe554 100644
--- a/apps/app/tests/gateway-runtime.test.ts
+++ b/apps/app/tests/gateway-runtime.test.ts
@@ -195,16 +195,17 @@ describe("gateway runtime mode", () => {
unsubscribe();
});
- test("keeps Den web on the configured origin and Den API calls on the gateway origin", () => {
+ test("serves Den web from the gateway origin and Den API calls through its proxy when no web base is configured", () => {
const storage = installWindow({ origin: "https://gw.example", gateway: true });
- storage.setItem("omnirush.den.baseUrl", "https://app.omnirushlabs.com");
storage.setItem("omnirush.den.authToken", "den-session-token");
+ // There is no hosted default web base: the gateway itself serves the Den
+ // web app unless a different origin was configured explicitly.
expect(resolveDenBaseUrls("https://gw.example")).toEqual({
- baseUrl: "https://app.omnirushlabs.com",
+ baseUrl: "https://gw.example",
apiBaseUrl: "https://gw.example/api/den",
});
- expect(readDenSettings().baseUrl).toBe("https://app.omnirushlabs.com");
+ expect(readDenSettings().baseUrl).toBe("https://gw.example");
expect(readDenSettings().apiBaseUrl).toBe("https://gw.example/api/den");
expect(readDenSettings().authToken).toBe("den-session-token");
});
@@ -214,7 +215,7 @@ describe("gateway runtime mode", () => {
const authUrl = new URL(buildDenAuthUrl(readDenSettings().baseUrl, "sign-up"));
- expect(authUrl.origin).toBe("https://app.omnirushlabs.com");
+ expect(authUrl.origin).toBe("https://gw.example");
expect(authUrl.searchParams.get("mode")).toBe("sign-up");
expect(authUrl.searchParams.get("webAuth")).toBe("1");
expect(authUrl.searchParams.get("webAuthReturn")).toBe("https://gw.example");
@@ -242,7 +243,7 @@ describe("gateway runtime mode", () => {
await client.getSession();
expect(requestedUrls).toEqual([
- "https://app.omnirushlabs.com/api/auth/sign-in/email",
+ "https://gw.example/api/auth/sign-in/email",
"https://gw.example/api/den/v1/me",
]);
});
@@ -335,7 +336,8 @@ describe("gateway runtime mode", () => {
const second = readDenBootstrapConfig();
expect(second).toBe(first);
- expect(first.baseUrl).toBe("https://app.omnirushlabs.com");
+ // Without a configured web base the gateway serves the Den web app too.
+ expect(first.baseUrl).toBe("https://web.omnirushlabs.com");
expect(first.apiBaseUrl).toBe("https://web.omnirushlabs.com/api/den");
});
@@ -557,24 +559,25 @@ describe("non-gateway connection modes", () => {
test("VITE_DEN_API_BASE_URL pins Den API calls to the proxy while sign-in stays on the web base", () => {
const previous = process.env.VITE_DEN_API_BASE_URL;
process.env.VITE_DEN_API_BASE_URL = "http://127.0.0.1:5178/api/den";
- installWindow({ origin: "http://127.0.0.1:5178" });
+ const storage = installWindow({ origin: "http://127.0.0.1:5178" });
+ storage.setItem("omnirush.den.baseUrl", "https://den.example.com");
try {
const settings = readDenSettings();
- expect(settings.baseUrl).toBe("https://app.omnirushlabs.com");
+ expect(settings.baseUrl).toBe("https://den.example.com");
expect(settings.apiBaseUrl).toBe("http://127.0.0.1:5178/api/den");
// Every Den client derives its API base the same way, so requests go
// through the same-origin proxy even when created from the web base.
const client = createDenClient({ baseUrl: settings.baseUrl, token: "den-token" });
expect(client.baseUrls.apiBaseUrl).toBe("http://127.0.0.1:5178/api/den");
- expect(client.baseUrls.baseUrl).toBe("https://app.omnirushlabs.com");
+ expect(client.baseUrls.baseUrl).toBe("https://den.example.com");
// Sign-in still opens the real Den web app, not the proxy origin.
- // Loopback cannot use webAuth return URLs against hosted Den, so the
+ // Loopback cannot use webAuth return URLs against a remote Den, so the
// URL uses desktopAuth (copy link / paste grant) instead.
const authUrl = new URL(buildDenAuthUrl(settings.baseUrl, "sign-in"));
- expect(authUrl.origin).toBe("https://app.omnirushlabs.com");
+ expect(authUrl.origin).toBe("https://den.example.com");
expect(authUrl.searchParams.get("desktopAuth")).toBe("1");
expect(authUrl.searchParams.get("webAuth")).toBeNull();
} finally {
@@ -583,11 +586,12 @@ describe("non-gateway connection modes", () => {
});
test("loopback web auth uses desktop handoff instead of an unapprovable webAuth return URL", () => {
- installWindow({ origin: "http://127.0.0.1:5178" });
+ const storage = installWindow({ origin: "http://127.0.0.1:5178" });
+ storage.setItem("omnirush.den.baseUrl", "https://den.example.com");
const authUrl = new URL(buildDenAuthUrl(readDenSettings().baseUrl, "sign-in"));
- expect(authUrl.origin).toBe("https://app.omnirushlabs.com");
+ expect(authUrl.origin).toBe("https://den.example.com");
expect(authUrl.searchParams.get("desktopAuth")).toBe("1");
expect(authUrl.searchParams.get("desktopScheme")).toBe("omnirush");
expect(authUrl.searchParams.get("webAuth")).toBeNull();
@@ -603,7 +607,8 @@ describe("non-gateway connection modes", () => {
try {
await initializeDenBootstrapConfig();
expect(storage.getItem("omnirush.den.baseUrl")).toBeNull();
- expect(readDenSettings().baseUrl).toBe("https://app.omnirushlabs.com");
+ // No build default exists, so the cleared setting leaves no control plane.
+ expect(readDenSettings().baseUrl).toBe("");
} finally {
restoreEnv("VITE_OMNIRUSH_FORCE_ENV_SETTINGS", previous);
}
diff --git a/apps/app/tests/omnirush-web-access-gate.test.tsx b/apps/app/tests/omnirush-web-access-gate.test.tsx
index 078d2f54..47cd54b4 100644
--- a/apps/app/tests/omnirush-web-access-gate.test.tsx
+++ b/apps/app/tests/omnirush-web-access-gate.test.tsx
@@ -3,10 +3,25 @@ import { renderToStaticMarkup } from "react-dom/server";
import { parseDenOmniRushWebAccess } from "../src/app/lib/den";
import {
+ denWebBillingUrl,
OmniRushWebAccessGateScreen,
resolveOmniRushWebAccessGateState,
} from "../src/react-app/domains/cloud/omnirush-web-access-gate";
+const originalWindow = globalThis.window;
+
+function withWindowOrigin(origin: string | null, run: () => void) {
+ Object.defineProperty(globalThis, "window", {
+ configurable: true,
+ value: origin === null ? undefined : { location: { origin } },
+ });
+ try {
+ run();
+ } finally {
+ Object.defineProperty(globalThis, "window", { configurable: true, value: originalWindow });
+ }
+}
+
function billingWeb(input: Record<string, unknown>) {
return { billing: { stripe: { web: input } } };
}
@@ -131,3 +146,26 @@ describe("omnirush.ai Web product-origin gate", () => {
expect(unavailable).toContain("Retry");
});
});
+
+describe("omnirush.ai Web billing URL", () => {
+ test("resolves the billing page on the configured Den web base", () => {
+ expect(denWebBillingUrl("https://den.example.test/")).toBe("https://den.example.test/dashboard/web");
+ expect(denWebBillingUrl("https://den.example.test/api/den")).toBe("https://den.example.test/dashboard/web");
+ });
+
+ test("falls back to the page origin behind the gateway when no Den base is configured", () => {
+ withWindowOrigin("https://gw.example", () => {
+ expect(denWebBillingUrl("")).toBe("https://gw.example/dashboard/web");
+ expect(denWebBillingUrl(" ")).toBe("https://gw.example/dashboard/web");
+ });
+ });
+
+ test("never invents a link from a non-web origin or without a window", () => {
+ withWindowOrigin("file://", () => {
+ expect(denWebBillingUrl("")).toBe("");
+ });
+ withWindowOrigin(null, () => {
+ expect(denWebBillingUrl("")).toBe("");
+ });
+ });
+});
diff --git a/apps/app/tests/use-den-control-plane-configured.test.tsx b/apps/app/tests/use-den-control-plane-configured.test.tsx
new file mode 100644
index 00000000..ce663d65
--- /dev/null
+++ b/apps/app/tests/use-den-control-plane-configured.test.tsx
@@ -0,0 +1,65 @@
+import { GlobalRegistrator } from "@happy-dom/global-registrator";
+import { afterEach, beforeEach, describe, expect, test } from "bun:test";
+import { act } from "react";
+import { createRoot, type Root } from "react-dom/client";
+
+import { isDenControlPlaneConfigured, STORAGE_BASE_URL } from "../src/app/lib/den";
+import { dispatchDenSettingsChanged, denSettingsChangedEvent } from "../src/app/lib/den-session-events";
+import { useDenControlPlaneConfigured } from "../src/react-app/domains/cloud/use-den-control-plane-configured";
+
+function Probe() {
+ const configured = useDenControlPlaneConfigured();
+ return <span data-testid="probe">{configured ? "configured" : "unconfigured"}</span>;
+}
+
+describe("useDenControlPlaneConfigured", () => {
+ let registeredDom = false;
+ let container: HTMLDivElement;
+ let root: Root;
+
+ beforeEach(() => {
+ registeredDom = typeof globalThis.window === "undefined" || typeof globalThis.document === "undefined";
+ if (registeredDom) GlobalRegistrator.register({ url: "https://web.example.test/session" });
+ Object.defineProperty(globalThis, "IS_REACT_ACT_ENVIRONMENT", { configurable: true, value: true });
+ window.localStorage.clear();
+ container = document.createElement("div");
+ document.body.append(container);
+ root = createRoot(container);
+ });
+
+ afterEach(async () => {
+ await act(async () => root.unmount());
+ container.remove();
+ window.localStorage.clear();
+ if (registeredDom) await GlobalRegistrator.unregister();
+ });
+
+ test("reports no control plane on a clean install and follows the settings-changed event", async () => {
+ expect(isDenControlPlaneConfigured()).toBe(false);
+ await act(async () => root.render(<Probe />));
+ expect(container.textContent).toBe("unconfigured");
+
+ // Setting a server URL (Join organization, Settings > Cloud, a connect
+ // link) writes the base URL and announces the change on the window.
+ window.localStorage.setItem(STORAGE_BASE_URL, "https://den.example.test");
+ await act(async () => {
+ dispatchDenSettingsChanged({
+ settings: {
+ baseUrl: "https://den.example.test",
+ apiBaseUrl: "https://den.example.test/api/den",
+ authToken: null,
+ activeOrgId: null,
+ activeOrgSlug: null,
+ activeOrgName: null,
+ },
+ });
+ });
+ expect(container.textContent).toBe("configured");
+
+ window.localStorage.removeItem(STORAGE_BASE_URL);
+ await act(async () => {
+ window.dispatchEvent(new Event(denSettingsChangedEvent));
+ });
+ expect(container.textContent).toBe("unconfigured");
+ });
+});
diff --git a/apps/desktop/electron/desktop-distribution.mjs b/apps/desktop/electron/desktop-distribution.mjs
index 79499b78..4e108f1f 100644
--- a/apps/desktop/electron/desktop-distribution.mjs
+++ b/apps/desktop/electron/desktop-distribution.mjs
@@ -5,6 +5,10 @@ export const PUBLIC_DESKTOP_DISTRIBUTION = Object.freeze({
protocolScheme: "omnirush",
requireSignin: false,
requireActivation: false,
+ // GitHub releases publish stable manifests only, so the public build has no
+ // Alpha feed. A distribution enables the Alpha channel by shipping an https
+ // feed directory in its package metadata (see resolveDesktopDistribution).
+ alphaUpdateFeedUrl: null,
});
export const CLOUD_DESKTOP_DISTRIBUTION = Object.freeze({
@@ -14,6 +18,7 @@ export const CLOUD_DESKTOP_DISTRIBUTION = Object.freeze({
protocolScheme: "omnirush",
requireSignin: true,
requireActivation: false,
+ alphaUpdateFeedUrl: null,
});
export const ENTERPRISE_DESKTOP_DISTRIBUTION = Object.freeze({
@@ -23,6 +28,7 @@ export const ENTERPRISE_DESKTOP_DISTRIBUTION = Object.freeze({
protocolScheme: "omnirush",
requireSignin: true,
requireActivation: true,
+ alphaUpdateFeedUrl: null,
});
function normalizeFlavor(value) {
@@ -30,22 +36,51 @@ function normalizeFlavor(value) {
return flavor === "cloud" || flavor === "enterprise" ? flavor : "public";
}
+/**
+ * An Alpha feed is the directory electron-updater reads `latest*.yml` from
+ * (for example `https://example.com/releases/alpha`). Only an https directory
+ * without credentials or query parameters is accepted; anything else leaves
+ * the Alpha channel disabled so the updater never probes a dead feed.
+ */
+export function normalizeAlphaUpdateFeedUrl(value) {
+ const feedUrl = typeof value === "string" ? value.trim().replace(/\/+$/, "") : "";
+ if (!feedUrl) return null;
+ try {
+ const url = new URL(feedUrl);
+ if (url.protocol !== "https:" || url.username || url.password || url.search || url.hash) {
+ return null;
+ }
+ } catch {
+ return null;
+ }
+ return feedUrl;
+}
+
/**
* Packaged builds trust only electron-builder's immutable package metadata.
- * The environment override exists solely so development and coded evals can
- * exercise the enterprise gate without producing a signed installer.
+ * The environment overrides exist solely so development and coded evals can
+ * exercise the enterprise gate or an Alpha feed without producing a signed
+ * installer.
*/
export function resolveDesktopDistribution({
isPackaged,
packageFlavor,
- environmentFlavor,
+ environmentFlavor = undefined,
+ packageAlphaUpdateFeedUrl = undefined,
+ environmentAlphaUpdateFeedUrl = undefined,
}) {
const flavor = normalizeFlavor(
isPackaged ? packageFlavor : (environmentFlavor || packageFlavor),
);
- if (flavor === "cloud") return CLOUD_DESKTOP_DISTRIBUTION;
- if (flavor === "enterprise") return ENTERPRISE_DESKTOP_DISTRIBUTION;
- return PUBLIC_DESKTOP_DISTRIBUTION;
+ const distribution = flavor === "cloud"
+ ? CLOUD_DESKTOP_DISTRIBUTION
+ : flavor === "enterprise"
+ ? ENTERPRISE_DESKTOP_DISTRIBUTION
+ : PUBLIC_DESKTOP_DISTRIBUTION;
+ const alphaUpdateFeedUrl = normalizeAlphaUpdateFeedUrl(
+ isPackaged ? packageAlphaUpdateFeedUrl : (environmentAlphaUpdateFeedUrl || packageAlphaUpdateFeedUrl),
+ );
+ return alphaUpdateFeedUrl ? Object.freeze({ ...distribution, alphaUpdateFeedUrl }) : distribution;
}
export function enterpriseActivationComplete(config) {
diff --git a/apps/desktop/electron/desktop-distribution.test.mjs b/apps/desktop/electron/desktop-distribution.test.mjs
index 68620945..469e0a5c 100644
--- a/apps/desktop/electron/desktop-distribution.test.mjs
+++ b/apps/desktop/electron/desktop-distribution.test.mjs
@@ -8,6 +8,7 @@ import {
desktopActivationRequired,
enterpriseActivationComplete,
enterprisePreactivationCommandAllowed,
+ normalizeAlphaUpdateFeedUrl,
resolveDesktopDistribution,
} from "./desktop-distribution.mjs";
@@ -20,6 +21,7 @@ describe("resolveDesktopDistribution", () => {
protocolScheme: "omnirush",
requireSignin: false,
requireActivation: false,
+ alphaUpdateFeedUrl: null,
});
});
@@ -37,6 +39,7 @@ describe("resolveDesktopDistribution", () => {
protocolScheme: "omnirush",
requireSignin: true,
requireActivation: false,
+ alphaUpdateFeedUrl: null,
},
);
});
@@ -55,6 +58,7 @@ describe("resolveDesktopDistribution", () => {
protocolScheme: "omnirush",
requireSignin: true,
requireActivation: true,
+ alphaUpdateFeedUrl: null,
});
});
@@ -79,6 +83,45 @@ describe("resolveDesktopDistribution", () => {
"enterprise",
);
});
+
+ it("enables an Alpha feed only from immutable package metadata in packaged builds", () => {
+ assert.deepEqual(
+ resolveDesktopDistribution({
+ isPackaged: true,
+ packageFlavor: "public",
+ environmentFlavor: "public",
+ packageAlphaUpdateFeedUrl: "https://updates.example.com/alpha/",
+ environmentAlphaUpdateFeedUrl: "https://ignored.example.com/alpha",
+ }),
+ { ...PUBLIC_DESKTOP_DISTRIBUTION, alphaUpdateFeedUrl: "https://updates.example.com/alpha" },
+ );
+ assert.equal(
+ resolveDesktopDistribution({
+ isPackaged: true,
+ packageFlavor: "public",
+ environmentAlphaUpdateFeedUrl: "https://ignored.example.com/alpha",
+ }),
+ PUBLIC_DESKTOP_DISTRIBUTION,
+ );
+ assert.equal(
+ resolveDesktopDistribution({
+ isPackaged: false,
+ packageFlavor: "public",
+ environmentAlphaUpdateFeedUrl: "https://dev.example.com/alpha",
+ }).alphaUpdateFeedUrl,
+ "https://dev.example.com/alpha",
+ );
+ });
+
+ it("accepts only a plain https feed directory for Alpha updates", () => {
+ assert.equal(normalizeAlphaUpdateFeedUrl("https://updates.example.com/alpha/"), "https://updates.example.com/alpha");
+ assert.equal(normalizeAlphaUpdateFeedUrl("http://updates.example.com/alpha"), null);
+ assert.equal(normalizeAlphaUpdateFeedUrl("https://user:[email protected]/alpha"), null);
+ assert.equal(normalizeAlphaUpdateFeedUrl("https://updates.example.com/alpha?token=1"), null);
+ assert.equal(normalizeAlphaUpdateFeedUrl("not a url"), null);
+ assert.equal(normalizeAlphaUpdateFeedUrl(""), null);
+ assert.equal(normalizeAlphaUpdateFeedUrl(undefined), null);
+ });
});
describe("desktopActivationRequired", () => {
diff --git a/apps/desktop/electron/main.mjs b/apps/desktop/electron/main.mjs
index 0e74ba86..0a6dcd12 100644
--- a/apps/desktop/electron/main.mjs
+++ b/apps/desktop/electron/main.mjs
@@ -120,6 +120,10 @@ const DESKTOP_DISTRIBUTION = resolveDesktopDistribution({
isPackaged: app.isPackaged,
packageFlavor: Reflect.get(desktopPackageMetadata, "omnirushDistribution"),
environmentFlavor: process.env.OMNIRUSH_DESKTOP_DISTRIBUTION,
+ // Optional electron-builder extraMetadata for distributions that run their
+ // own Alpha feed. The public build has none, so its Alpha channel is off.
+ packageAlphaUpdateFeedUrl: Reflect.get(desktopPackageMetadata, "omnirushAlphaUpdateFeedUrl"),
+ environmentAlphaUpdateFeedUrl: process.env.OMNIRUSH_DESKTOP_ALPHA_UPDATE_FEED_URL,
});
const TAURI_APP_IDENTIFIER = DESKTOP_DISTRIBUTION.appIdentifier;
const DEV_APP_IDENTIFIER = `${DESKTOP_DISTRIBUTION.appIdentifier}.dev`;
@@ -160,7 +164,7 @@ if (BLANK_SLATE_LAUNCH.enabled || process.env.OMNIRUSH_ELECTRON_USE_MOCK_KEYCHAI
}
const RELEASE_DOWNLOAD_BASE_URL = "https://github.com/omnirush-ai/omnirush-gui/releases/latest/download";
const RELEASE_PAGE_URL = "https://github.com/omnirush-ai/omnirush-gui/releases/latest";
-const DOCS_PAGE_URL = "https://omnirushlabs.com/docs";
+const DOCS_PAGE_URL = "https://github.com/omnirush-ai/omnirush-gui#readme";
const applicationMenu = createApplicationMenu({
appName: APP_NAME,
docsUrl: DOCS_PAGE_URL,
@@ -1012,7 +1016,10 @@ if (extraLaunchArgs) {
}
}
configureFakeMediaForTests(app, envFlagEnabled("OMNIRUSH_ELECTRON_FAKE_MEDIA"));
-const DEFAULT_DEN_BASE_URL = "https://app.omnirushlabs.com";
+// omnirush.ai has no hosted Den control plane. The default stays empty so no
+// code path contacts one automatically; a Den base URL only exists when
+// desktop-bootstrap.json, a connect link, or the user provides it explicitly.
+const DEFAULT_DEN_BASE_URL = "";
const DEFAULT_LOCAL_BASE_URL = "http://127.0.0.1:4096";
const FORCE_DESKTOP_REQUIRE_SIGNIN =
DESKTOP_DISTRIBUTION.requireSignin || envFlagEnabled("OMNIRUSH_FORCE_SIGNIN");
@@ -1330,7 +1337,7 @@ const legacyRunnerBaseUrls = [
initialRunnerBootstrap.baseUrl
? `${String(initialRunnerBootstrap.baseUrl).replace(/\/+$/, "")}/api/den`
: null,
- `${DEFAULT_DEN_BASE_URL}/api/den`,
+ DEFAULT_DEN_BASE_URL ? `${DEFAULT_DEN_BASE_URL}/api/den` : null,
].map((value) => normalizeRunnerBaseUrl(value)).filter(Boolean);
const desktopAutomationRunner = createDesktopAutomationRunner({
// v1 credentials predate token audiences. Keep them usable during the Den
@@ -2798,6 +2805,7 @@ const { ensureAutoUpdater } = registerUpdaterIpc({
manifestChannel: DESKTOP_DISTRIBUTION.flavor === "public"
? "latest"
: DESKTOP_DISTRIBUTION.flavor,
+ alphaFeedUrl: DESKTOP_DISTRIBUTION.alphaUpdateFeedUrl,
electronNet,
shell,
distribution: DESKTOP_DISTRIBUTION.flavor,
diff --git a/apps/desktop/electron/updater.mjs b/apps/desktop/electron/updater.mjs
index 6a63f0d0..c8c179c4 100644
--- a/apps/desktop/electron/updater.mjs
+++ b/apps/desktop/electron/updater.mjs
@@ -1,5 +1,6 @@
-import { readFile, mkdir, writeFile, rm } from "node:fs/promises";
-import { readFileSync } from "node:fs";
+import { readFile, mkdir, open, rename, writeFile, rm } from "node:fs/promises";
+import { createReadStream, readFileSync } from "node:fs";
+import { createHash } from "node:crypto";
import { execFile } from "node:child_process";
import path from "node:path";
import { fileURLToPath } from "node:url";
@@ -19,6 +20,8 @@ import {
} from "./recovery.mjs";
const ELECTRON_UPDATER_CHANNEL_FILENAME = "electron-updater-channel.v1.json";
+// Where a manually installed update (macOS DMG) is staged before it is opened.
+const INSTALLER_CACHE_DIRECTORY = "app-update-installer";
// In dev mode, app.getVersion() returns the Electron framework version
// (e.g. "35.7.5") instead of the OmniRush.ai app version. Read from
@@ -43,14 +46,33 @@ function resolveAppVersion(app) {
}
return _cachedAppVersion;
}
-const ELECTRON_UPDATER_FEEDS = Object.freeze({
- stable: "https://github.com/omnirush-ai/omnirush-gui/releases/latest/download",
- alpha: "https://github.com/omnirush-ai/omnirush-gui/releases/download/alpha-macos-latest",
-});
-
-function normalizeElectronUpdaterChannel(value, manifestChannel = "latest") {
- if (manifestChannel !== "latest") return "stable";
- if (value === "alpha" && process.platform === "darwin") return "alpha";
+
+// The public distribution reads `latest*.yml` from the latest GitHub release.
+// There is no public Alpha feed: the Alpha channel exists only when a
+// distribution ships its own feed directory (see updaterFeedOptions).
+export const STABLE_UPDATER_FEED_URL = "https://github.com/omnirush-ai/omnirush-gui/releases/latest/download";
+
+/**
+ * Feed selection shared by every updater IPC handler. `manifestChannel` picks
+ * the manifest name electron-updater reads (`latest` for the public build,
+ * the distribution flavor otherwise) and `alphaFeedUrl` is the only thing that
+ * can enable the Alpha channel. Without it a persisted or requested "alpha"
+ * normalizes back to stable instead of probing a feed that does not exist.
+ */
+export function updaterFeedOptions({ manifestChannel = "latest", alphaFeedUrl = null } = {}) {
+ const normalizedAlphaFeedUrl = typeof alphaFeedUrl === "string" ? alphaFeedUrl.trim().replace(/\/+$/, "") : "";
+ return Object.freeze({
+ manifestChannel,
+ alphaFeedUrl: manifestChannel === "latest" && normalizedAlphaFeedUrl ? normalizedAlphaFeedUrl : null,
+ });
+}
+
+function alphaChannelSupported(feedOptions) {
+ return feedOptions.alphaFeedUrl !== null;
+}
+
+export function normalizeElectronUpdaterChannel(value, feedOptions = updaterFeedOptions()) {
+ if (value === "alpha" && alphaChannelSupported(feedOptions)) return "alpha";
return "stable";
}
@@ -58,18 +80,18 @@ function electronUpdaterChannelPath(app) {
return path.join(app.getPath("userData"), ELECTRON_UPDATER_CHANNEL_FILENAME);
}
-async function readElectronUpdaterChannel(app, manifestChannel = "latest") {
+async function readElectronUpdaterChannel(app, feedOptions) {
try {
const raw = await readFile(electronUpdaterChannelPath(app), "utf8");
const parsed = JSON.parse(raw);
- return normalizeElectronUpdaterChannel(parsed?.channel, manifestChannel);
+ return normalizeElectronUpdaterChannel(parsed?.channel, feedOptions);
} catch {
return "stable";
}
}
-async function writeElectronUpdaterChannel(app, channel, manifestChannel = "latest") {
- const normalized = normalizeElectronUpdaterChannel(channel, manifestChannel);
+async function writeElectronUpdaterChannel(app, channel, feedOptions) {
+ const normalized = normalizeElectronUpdaterChannel(channel, feedOptions);
const outputPath = electronUpdaterChannelPath(app);
await mkdir(path.dirname(outputPath), { recursive: true });
await writeFile(
@@ -80,8 +102,10 @@ async function writeElectronUpdaterChannel(app, channel, manifestChannel = "late
return normalized;
}
-function electronUpdaterFeedUrl(channel, manifestChannel = "latest") {
- return ELECTRON_UPDATER_FEEDS[normalizeElectronUpdaterChannel(channel, manifestChannel)];
+export function electronUpdaterFeedUrl(channel, feedOptions = updaterFeedOptions()) {
+ return normalizeElectronUpdaterChannel(channel, feedOptions) === "alpha"
+ ? feedOptions.alphaFeedUrl
+ : STABLE_UPDATER_FEED_URL;
}
function normalizeStableTargetVersion(value) {
@@ -179,29 +203,30 @@ export function targetedStableUpdaterFeed(currentVersion, targetVersion, allowOl
return `https://github.com/omnirush-ai/omnirush-gui/releases/download/v${normalizedTarget}`;
}
-function updaterChannelState(app, channel, targetVersion = null, manifestChannel = "latest") {
- const normalized = normalizeElectronUpdaterChannel(channel, manifestChannel);
+function updaterChannelState(app, channel, targetVersion, feedOptions) {
+ const normalized = normalizeElectronUpdaterChannel(channel, feedOptions);
const currentVersion = resolveAppVersion(app);
return {
channel: normalized,
feedUrl: targetVersion
? targetedStableUpdaterFeed(currentVersion, targetVersion)
- : electronUpdaterFeedUrl(normalized, manifestChannel),
+ : electronUpdaterFeedUrl(normalized, feedOptions),
currentVersion,
+ alphaChannelSupported: alphaChannelSupported(feedOptions),
};
}
async function applyElectronUpdaterFeed(
app,
updater,
- targetVersion = null,
- manifestChannel = "latest",
+ targetVersion,
+ feedOptions,
allowOlder = false,
channelOverride,
) {
const channel = channelOverride === undefined
- ? await readElectronUpdaterChannel(app, manifestChannel)
- : normalizeElectronUpdaterChannel(channelOverride, manifestChannel);
+ ? await readElectronUpdaterChannel(app, feedOptions)
+ : normalizeElectronUpdaterChannel(channelOverride, feedOptions);
if (targetVersion && channel !== "stable") {
throw new Error("Version-specific update feeds are supported only on the stable channel.");
}
@@ -211,8 +236,9 @@ async function applyElectronUpdaterFeed(
channel,
feedUrl: targetedStableUpdaterFeed(currentVersion, targetVersion, allowOlder),
currentVersion,
+ alphaChannelSupported: alphaChannelSupported(feedOptions),
}
- : updaterChannelState(app, channel, null, manifestChannel);
+ : updaterChannelState(app, channel, null, feedOptions);
updater.allowPrerelease = state.channel === "alpha";
// Moving from alpha back to stable can be a semver downgrade; still show
// the latest stable so users can return to the stable channel deliberately.
@@ -226,7 +252,7 @@ async function applyElectronUpdaterFeed(
updater.setFeedURL({
provider: "generic",
url: state.feedUrl,
- ...(manifestChannel !== "latest" ? { channel: manifestChannel } : {}),
+ ...(feedOptions.manifestChannel !== "latest" ? { channel: feedOptions.manifestChannel } : {}),
});
}
return state;
@@ -284,6 +310,109 @@ async function cleanStaleUpdaterState(app, shipItDefaultsDomain) {
}
}
+// ---------------------------------------------------------------------------
+// macOS code-signature detection.
+//
+// Squirrel.Mac only swaps in an update whose code signature validates against
+// the running app. Community builds are ad-hoc signed (no Developer ID), so an
+// in-place install is guaranteed to fail there; those builds download the DMG
+// and open it for a manual drag-to-Applications install instead.
+// ---------------------------------------------------------------------------
+
+export function macAppBundlePath(execPath) {
+ const value = typeof execPath === "string" ? execPath : "";
+ const marker = ".app/Contents/";
+ const index = value.indexOf(marker);
+ return index === -1 ? null : value.slice(0, index + ".app".length);
+}
+
+export function developerIdSignatureFromCodesignOutput(output) {
+ const text = String(output ?? "");
+ if (!text.trim()) return false;
+ if (/Signature=adhoc/.test(text)) return false;
+ return /Authority=Developer ID Application/.test(text);
+}
+
+/**
+ * Resolves true only when the bundle that owns `execPath` carries a Developer
+ * ID signature. Any spawn failure, unexpected output, or a path outside an
+ * .app bundle counts as ad-hoc: treating an unknown signature as swappable
+ * would only trade a clear manual install for a silent Squirrel failure.
+ *
+ * @param {string} [execPath]
+ * @param {Function} [run] execFile-compatible spawner, injectable for tests.
+ */
+export function detectDeveloperIdSignature(execPath = process.execPath, run = execFile) {
+ const bundlePath = macAppBundlePath(execPath);
+ if (!bundlePath) return Promise.resolve(false);
+ return new Promise((resolve) => {
+ try {
+ run(
+ "/usr/bin/codesign",
+ ["-dv", "--verbose=2", bundlePath],
+ { encoding: "utf8", maxBuffer: 1024 * 1024 },
+ (error, stdout, stderr) => {
+ if (error) {
+ resolve(false);
+ return;
+ }
+ resolve(developerIdSignatureFromCodesignOutput(`${stdout ?? ""}\n${stderr ?? ""}`));
+ },
+ );
+ } catch {
+ resolve(false);
+ }
+ });
+}
+
+function installerAssetArch(arch) {
+ return arch === "x64" ? "x64" : "arm64";
+}
+
+/**
+ * Picks the DMG the update manifest lists for this architecture and resolves
+ * it against the feed directory, exactly like electron-updater resolves the
+ * zip it would hand to Squirrel. Returns null when the manifest has no
+ * matching installer or no checksum to verify it with.
+ */
+export function selectManualInstallerArtifact(info, feedUrl, arch) {
+ const files = Array.isArray(info?.files) ? info.files : [];
+ const assetArch = `-${installerAssetArch(arch)}-`;
+ const candidate = files.find((file) =>
+ typeof file?.url === "string"
+ && file.url.endsWith(".dmg")
+ && file.url.includes(assetArch)
+ && typeof file.sha512 === "string"
+ && file.sha512.trim(),
+ );
+ if (!candidate || typeof feedUrl !== "string" || !feedUrl) return null;
+ let url;
+ try {
+ url = new URL(candidate.url, `${feedUrl.replace(/\/+$/, "")}/`);
+ } catch {
+ return null;
+ }
+ if (url.protocol !== "https:" || url.origin !== new URL(feedUrl).origin) return null;
+ const size = Number(candidate.size);
+ return {
+ version: typeof info?.version === "string" ? info.version : null,
+ url: url.toString(),
+ sha512: candidate.sha512.trim(),
+ size: Number.isInteger(size) && size > 0 ? size : null,
+ fileName: path.basename(url.pathname),
+ };
+}
+
+async function fileMatchesSha512(filePath, expected) {
+ return new Promise((resolve) => {
+ const hash = createHash("sha512");
+ const stream = createReadStream(filePath);
+ stream.on("data", (chunk) => hash.update(chunk));
+ stream.on("error", () => resolve(false));
+ stream.on("end", () => resolve(hash.digest("base64") === expected));
+ });
+}
+
// electron-updater wiring. Packaged-only; dev builds skip this so the
// updater doesn't try to probe a non-existent release channel.
export function preventPendingUpdaterInstall(updater) {
@@ -296,6 +425,7 @@ export function registerUpdaterIpc({
getMainWindow,
loadAutoUpdater = () => import("electron-updater"),
manifestChannel = "latest",
+ alphaFeedUrl = null,
shipItDefaultsDomain = SHIP_IT_DEFAULTS_DOMAIN,
electronNet = null,
shell = null,
@@ -303,12 +433,19 @@ export function registerUpdaterIpc({
platform = process.platform,
arch = process.arch,
env = process.env,
+ execPath = process.execPath,
+ isDeveloperIdSigned = () => detectDeveloperIdSignature(execPath),
+ quitDelayMs = 1500,
}) {
+ const feedOptions = updaterFeedOptions({ manifestChannel, alphaFeedUrl });
let autoUpdaterInstance = null;
let autoUpdaterLoadPromise = null;
+ let installModePromise = null;
let checkedUpdateVersion = null;
let checkedUpdateTargetVersion = null;
let checkedUpdateChannel = null;
+ let checkedInstallerArtifact = null;
+ let downloadedInstallerPath = null;
let updateDownloaded = false;
let recoveryReleases = [];
const recoveryWitness = { installRequests: [], openedArtifactUrls: [], quitRequested: false };
@@ -331,6 +468,49 @@ export function registerUpdaterIpc({
}
}
+ // "in-place": electron-updater swaps the app (Squirrel.Mac, NSIS, AppImage).
+ // "manual-dmg": the running macOS app is not Developer ID signed, so the
+ // update is downloaded as a DMG and opened for the user to drag over.
+ function resolveInstallMode() {
+ if (!installModePromise) {
+ installModePromise = (async () => {
+ if (platform !== "darwin" || !app.isPackaged) return "in-place";
+ try {
+ return (await isDeveloperIdSigned()) ? "in-place" : "manual-dmg";
+ } catch {
+ return "manual-dmg";
+ }
+ })();
+ }
+ return installModePromise;
+ }
+
+ async function describeChannelState(channel, targetVersion = null) {
+ return {
+ ...updaterChannelState(app, channel, targetVersion, feedOptions),
+ installMode: await resolveInstallMode(),
+ };
+ }
+
+ function clearCheckedUpdate() {
+ checkedUpdateVersion = null;
+ checkedUpdateTargetVersion = null;
+ checkedUpdateChannel = null;
+ checkedInstallerArtifact = null;
+ }
+
+ function recordCheckedUpdate(info, channelState, targetVersion, installMode) {
+ const currentVersion = resolveAppVersion(app);
+ const available = Boolean(info?.version && isVersionNewer(info.version, currentVersion));
+ checkedUpdateVersion = available ? info.version : null;
+ checkedUpdateTargetVersion = available ? targetVersion : null;
+ checkedUpdateChannel = available ? channelState.channel : null;
+ checkedInstallerArtifact = available && installMode === "manual-dmg"
+ ? selectManualInstallerArtifact(info, channelState.feedUrl, arch)
+ : null;
+ return available;
+ }
+
async function ensureAutoUpdater() {
if (!app.isPackaged) return null;
if (!autoUpdaterLoadPromise) {
@@ -370,7 +550,7 @@ export function registerUpdaterIpc({
delta: info.delta ?? 0,
});
});
- await applyElectronUpdaterFeed(app, autoUpdaterInstance, null, manifestChannel);
+ await applyElectronUpdaterFeed(app, autoUpdaterInstance, null, feedOptions);
}
} catch (error) {
console.warn("[updater] electron-updater not available", error);
@@ -382,6 +562,72 @@ export function registerUpdaterIpc({
return autoUpdaterLoadPromise;
}
+ /**
+ * Downloads the manifest-listed installer with a streaming sha512 check and
+ * the same progress events electron-updater emits, so the Updates page shows
+ * one download experience regardless of install mode.
+ */
+ async function downloadManualInstaller(artifact) {
+ if (!electronNet?.fetch) throw new Error("Installer downloads are unavailable in this package.");
+ const response = await electronNet.fetch(artifact.url, {
+ headers: { Accept: "application/octet-stream, */*" },
+ });
+ if (!response.ok) throw new Error(`Installer download failed with HTTP ${response.status}.`);
+ const directory = path.join(app.getPath("userData"), INSTALLER_CACHE_DIRECTORY);
+ await rm(directory, { recursive: true, force: true });
+ await mkdir(directory, { recursive: true });
+ const destination = path.join(directory, artifact.fileName);
+ const partialPath = `${destination}.part`;
+ const headerLength = Number(response.headers?.get?.("content-length"));
+ const total = artifact.size ?? (Number.isInteger(headerLength) && headerLength > 0 ? headerLength : 0);
+ const hash = createHash("sha512");
+ const startedAt = Date.now();
+ let transferred = 0;
+ const reportProgress = (delta) => {
+ const elapsedSeconds = Math.max((Date.now() - startedAt) / 1000, 0.001);
+ sendToRenderer("omnirush:updater:download-progress", {
+ bytesPerSecond: Math.round(transferred / elapsedSeconds),
+ percent: total > 0 ? Math.min(100, (transferred / total) * 100) : 0,
+ transferred,
+ total,
+ delta,
+ });
+ };
+ const handle = await open(partialPath, "w");
+ try {
+ const reader = typeof response.body?.getReader === "function" ? response.body.getReader() : null;
+ if (reader) {
+ for (;;) {
+ const { done, value } = await reader.read();
+ if (done) break;
+ const chunk = Buffer.from(value);
+ hash.update(chunk);
+ await handle.write(chunk);
+ transferred += chunk.length;
+ reportProgress(chunk.length);
+ }
+ } else {
+ const bytes = Buffer.from(await response.arrayBuffer());
+ hash.update(bytes);
+ await handle.write(bytes);
+ transferred = bytes.length;
+ reportProgress(bytes.length);
+ }
+ } finally {
+ await handle.close();
+ }
+ if (hash.digest("base64") !== artifact.sha512) {
+ await rm(partialPath, { force: true });
+ throw new Error("The downloaded installer checksum did not match the release manifest.");
+ }
+ if (artifact.size !== null && transferred !== artifact.size) {
+ await rm(partialPath, { force: true });
+ throw new Error("The downloaded installer size did not match the release manifest.");
+ }
+ await rename(partialPath, destination);
+ return destination;
+ }
+
async function resolveRecoveryArtifact(version) {
if (!electronNet?.fetch) return null;
try {
@@ -544,9 +790,11 @@ export function registerUpdaterIpc({
}
const currentVersion = resolveAppVersion(app);
const updater = await ensureAutoUpdater();
- if (updater && app.isPackaged) {
+ // An ad-hoc signed macOS app cannot be swapped by Squirrel, so recovery
+ // there opens the verified installer exactly like a manual update.
+ if (updater && app.isPackaged && (await resolveInstallMode()) === "in-place") {
try {
- await applyElectronUpdaterFeed(app, updater, release.version, manifestChannel, true);
+ await applyElectronUpdaterFeed(app, updater, release.version, feedOptions, true);
const result = await updater.checkForUpdates();
if (compareVersions(result?.updateInfo?.version ?? "", release.version) !== 0) {
throw new Error("Recovery manifest resolved to a different version.");
@@ -596,33 +844,35 @@ export function registerUpdaterIpc({
}));
ipcMain.handle("omnirush:updater:getChannel", async () => queueUpdaterOperation(async () => {
- const channel = await readElectronUpdaterChannel(app, manifestChannel);
- return updaterChannelState(app, channel, null, manifestChannel);
+ const channel = await readElectronUpdaterChannel(app, feedOptions);
+ return describeChannelState(channel);
}));
ipcMain.handle("omnirush:updater:setChannel", async (_event, rawChannel) => queueUpdaterOperation(async () => {
- const channel = await writeElectronUpdaterChannel(app, rawChannel, manifestChannel);
- checkedUpdateVersion = null;
- checkedUpdateTargetVersion = null;
- checkedUpdateChannel = null;
+ const channel = await writeElectronUpdaterChannel(app, rawChannel, feedOptions);
+ clearCheckedUpdate();
+ downloadedInstallerPath = null;
updateDownloaded = false;
+ const installMode = await resolveInstallMode();
const updater = await ensureAutoUpdater();
if (updater) {
// A channel change invalidates any previously downloaded update. This
// also prevents an Alpha build from installing automatically on quit
// after an organization policy moves the desktop back to Stable.
preventPendingUpdaterInstall(updater);
- return applyElectronUpdaterFeed(app, updater, null, manifestChannel, false, channel);
+ const state = await applyElectronUpdaterFeed(app, updater, null, feedOptions, false, channel);
+ return { ...state, installMode };
}
- return updaterChannelState(app, channel, null, manifestChannel);
+ return describeChannelState(channel);
}));
ipcMain.handle("omnirush:updater:check", async (_event, rawChannel, rawTargetVersion) => queueUpdaterOperation(async () => {
// A check selects a feed for this operation only. The persisted preference
// belongs exclusively to setChannel so a stale check cannot undo a choice.
const channel = rawChannel === undefined
- ? await readElectronUpdaterChannel(app, manifestChannel)
- : normalizeElectronUpdaterChannel(rawChannel, manifestChannel);
+ ? await readElectronUpdaterChannel(app, feedOptions)
+ : normalizeElectronUpdaterChannel(rawChannel, feedOptions);
+ const installMode = await resolveInstallMode();
const updater = await ensureAutoUpdater();
try {
const targetVersion = rawTargetVersion === undefined
@@ -632,8 +882,8 @@ export function registerUpdaterIpc({
throw new Error("Target update version must use the stable x.y.z format.");
}
const channelState = updater
- ? await applyElectronUpdaterFeed(app, updater, targetVersion, manifestChannel, false, channel)
- : updaterChannelState(app, channel, targetVersion, manifestChannel);
+ ? { ...(await applyElectronUpdaterFeed(app, updater, targetVersion, feedOptions, false, channel)), installMode }
+ : await describeChannelState(channel, targetVersion);
if (!updater) return { available: false, reason: "unavailable", ...channelState };
const result = await updater.checkForUpdates();
@@ -642,11 +892,11 @@ export function registerUpdaterIpc({
if (targetVersion && compareVersions(info?.version ?? "", targetVersion) !== 0) {
throw new Error(`Target update manifest did not resolve to v${targetVersion}.`);
}
- const available = Boolean(info?.version && isVersionNewer(info.version, currentVersion));
- checkedUpdateVersion = available ? info.version : null;
- checkedUpdateTargetVersion = available ? targetVersion : null;
- checkedUpdateChannel = available ? channelState.channel : null;
- if (!available) updateDownloaded = false;
+ const available = recordCheckedUpdate(info, channelState, targetVersion, installMode);
+ if (!available) {
+ updateDownloaded = false;
+ downloadedInstallerPath = null;
+ }
return {
available,
currentVersion,
@@ -656,19 +906,12 @@ export function registerUpdaterIpc({
...channelState,
};
} catch (error) {
- checkedUpdateVersion = null;
- checkedUpdateTargetVersion = null;
- checkedUpdateChannel = null;
+ clearCheckedUpdate();
// A transient failed check must not invalidate an already-downloaded update.
return {
available: false,
reason: String(error?.message ?? error),
- ...updaterChannelState(
- app,
- channel,
- null,
- manifestChannel,
- ),
+ ...await describeChannelState(channel),
};
}
}));
@@ -676,12 +919,13 @@ export function registerUpdaterIpc({
ipcMain.handle("omnirush:updater:download", async () => queueUpdaterOperation(async () => {
const updater = await ensureAutoUpdater();
if (!updater) return { ok: false, reason: "unavailable" };
+ const installMode = await resolveInstallMode();
try {
- await applyElectronUpdaterFeed(
+ const channelState = await applyElectronUpdaterFeed(
app,
updater,
checkedUpdateTargetVersion,
- manifestChannel,
+ feedOptions,
false,
checkedUpdateChannel ?? undefined,
);
@@ -695,9 +939,7 @@ export function registerUpdaterIpc({
) {
throw new Error(`Target update manifest did not resolve to v${checkedUpdateTargetVersion}.`);
}
- checkedUpdateVersion = info?.version && isVersionNewer(info.version, currentVersion)
- ? info.version
- : null;
+ recordCheckedUpdate(info, channelState, checkedUpdateTargetVersion, installMode);
}
if (!checkedUpdateVersion) {
return { ok: false, reason: "No update available." };
@@ -705,15 +947,27 @@ export function registerUpdaterIpc({
await cacheCurrentHealthyRelease().catch((error) => {
console.warn("[updater] could not cache the current healthy installer", error);
});
+ if (installMode === "manual-dmg") {
+ // Squirrel.Mac would refuse the zip electron-updater downloads for an
+ // ad-hoc signed app, so fetch the DMG the same manifest lists instead.
+ // The download is plain HTTPS plus the manifest's sha512.
+ if (!checkedInstallerArtifact || checkedInstallerArtifact.version !== checkedUpdateVersion) {
+ throw new Error("The release manifest does not list a macOS installer for this update.");
+ }
+ downloadedInstallerPath = await downloadManualInstaller(checkedInstallerArtifact);
+ updateDownloaded = true;
+ return { ok: true, mode: "manual-dmg" };
+ }
// Clear any stuck ShipIt state from a prior aborted install so this
// download applies cleanly on quit.
await cleanStaleUpdaterState(app, shipItDefaultsDomain);
updater.autoInstallOnAppQuit = true;
await updater.downloadUpdate();
updateDownloaded = true;
- return { ok: true };
+ return { ok: true, mode: "in-place" };
} catch (error) {
updateDownloaded = false;
+ downloadedInstallerPath = null;
return { ok: false, reason: String(error?.message ?? error) };
}
}));
@@ -722,12 +976,34 @@ export function registerUpdaterIpc({
if (!updateDownloaded) return { ok: false, reason: "update-not-downloaded" };
const updater = await ensureAutoUpdater();
if (!updater) return { ok: false, reason: "unavailable" };
+ const installMode = await resolveInstallMode();
+ if (installMode === "manual-dmg") {
+ if (!downloadedInstallerPath || !checkedInstallerArtifact) {
+ return { ok: false, reason: "update-not-downloaded" };
+ }
+ if (!shell?.openPath) return { ok: false, reason: "This package cannot open the downloaded installer." };
+ try {
+ if (!(await fileMatchesSha512(downloadedInstallerPath, checkedInstallerArtifact.sha512))) {
+ updateDownloaded = false;
+ downloadedInstallerPath = null;
+ return { ok: false, reason: "The downloaded installer could not be verified. Download it again." };
+ }
+ const openError = await shell.openPath(downloadedInstallerPath);
+ if (openError) return { ok: false, reason: openError };
+ // Let the renderer show its instructions and Finder mount the image
+ // before this copy quits; the user replaces it from the DMG.
+ setTimeout(() => app.quit(), quitDelayMs);
+ return { ok: true, mode: "manual-dmg", path: downloadedInstallerPath };
+ } catch (error) {
+ return { ok: false, reason: String(error?.message ?? error) };
+ }
+ }
try {
// Re-assert the in-place-write default right before the swap; the ShipIt
// defaults domain may have been wiped when stale state was cleaned.
await enableSquirrelDirectContentsWrite();
updater.quitAndInstall(false, true);
- return { ok: true };
+ return { ok: true, mode: "in-place" };
} catch (error) {
return { ok: false, reason: String(error?.message ?? error) };
}
diff --git a/apps/desktop/electron/updater.test.mjs b/apps/desktop/electron/updater.test.mjs
index 2aac5ec8..c69c8665 100644
--- a/apps/desktop/electron/updater.test.mjs
+++ b/apps/desktop/electron/updater.test.mjs
@@ -2,15 +2,22 @@ import { describe, it } from "node:test";
import assert from "node:assert/strict";
import { createHash } from "node:crypto";
import { mkdtempSync, readFileSync } from "node:fs";
-import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
+import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import {
+ detectDeveloperIdSignature,
+ developerIdSignatureFromCodesignOutput,
+ electronUpdaterFeedUrl,
+ macAppBundlePath,
+ normalizeElectronUpdaterChannel,
preventPendingUpdaterInstall,
registerUpdaterIpc,
+ selectManualInstallerArtifact,
staleUpdaterStatePaths,
targetedStableUpdaterFeed,
+ updaterFeedOptions,
} from "./updater.mjs";
import {
cacheVerifiedRecoveryArtifact,
@@ -25,6 +32,8 @@ import {
} from "./recovery.mjs";
const fakeApp = { getPath: (key) => (key === "home" ? "/Users/test" : `/Users/test/${key}`) };
+const STABLE_FEED = "https://github.com/omnirush-ai/omnirush-gui/releases/latest/download";
+const ALPHA_FEED = "https://updates.example.com/alpha";
// Unpackaged builds resolve their version from package.json, so release bumps
// must not require touching this test.
@@ -34,7 +43,7 @@ const desktopVersion = JSON.parse(
let isolatedUpdaterImportId = 0;
-function fakeUpdaterHarness({ version }) {
+function fakeUpdaterHarness({ version, files }) {
const listeners = new Map();
const calls = [];
const feeds = [];
@@ -47,7 +56,7 @@ function fakeUpdaterHarness({ version }) {
allowDowngrade: false,
on: (name, fn) => listeners.set(name, fn),
setFeedURL: (feed) => feeds.push(feed),
- checkForUpdates: async () => ({ updateInfo: { version } }),
+ checkForUpdates: async () => ({ updateInfo: { version, ...(files ? { files } : {}) } }),
downloadUpdate: async () => {
calls.push("download");
downloadFeeds.push(feeds.at(-1));
@@ -59,10 +68,11 @@ function fakeUpdaterHarness({ version }) {
return { updater, listeners, calls, feeds, downloadFeeds };
}
-async function registerFakeUpdaterIpc({ version }) {
+async function registerFakeUpdaterIpc({ version, files = undefined, ...options }) {
const tempDir = mkdtempSync(path.join(os.tmpdir(), "omnirush-updater-test-"));
const handlers = new Map();
- const harness = fakeUpdaterHarness({ version });
+ const harness = fakeUpdaterHarness({ version, files });
+ const sent = [];
isolatedUpdaterImportId += 1;
const updaterModuleUrl = new URL(
`./updater.mjs?updater-lifecycle=${isolatedUpdaterImportId}`,
@@ -71,17 +81,26 @@ async function registerFakeUpdaterIpc({ version }) {
const { registerUpdaterIpc: registerIsolatedUpdaterIpc } = await import(
updaterModuleUrl.href
);
+ const app = {
+ isPackaged: true,
+ getVersion: () => "0.17.0",
+ getPath: (key) => path.join(tempDir, key),
+ quit: () => harness.calls.push("quit"),
+ };
registerIsolatedUpdaterIpc({
- app: {
- isPackaged: true,
- getVersion: () => "0.17.0",
- getPath: (key) => path.join(tempDir, key),
- },
+ app,
ipcMain: { handle: (name, handler) => handlers.set(name, handler) },
- getMainWindow: () => null,
+ getMainWindow: () => ({
+ webContents: { send: (channel, data) => sent.push({ channel, data }) },
+ isDestroyed: () => false,
+ }),
loadAutoUpdater: async () => ({ autoUpdater: harness.updater }),
+ // The default harness models a Developer ID signed app (or a non-macOS
+ // platform): in-place installs through electron-updater.
+ isDeveloperIdSigned: async () => true,
+ ...options,
});
- return { tempDir, handlers, ...harness };
+ return { tempDir, handlers, sent, app, ...harness };
}
describe("staleUpdaterStatePaths", () => {
@@ -96,6 +115,28 @@ describe("staleUpdaterStatePaths", () => {
});
});
+describe("update feeds", () => {
+ it("has no public Alpha feed: alpha normalizes to stable unless a distribution ships a feed", () => {
+ const publicFeed = updaterFeedOptions();
+ assert.equal(publicFeed.alphaFeedUrl, null);
+ assert.equal(normalizeElectronUpdaterChannel("alpha", publicFeed), "stable");
+ assert.equal(normalizeElectronUpdaterChannel("stable", publicFeed), "stable");
+ assert.equal(electronUpdaterFeedUrl("alpha", publicFeed), STABLE_FEED);
+
+ const distributionFeed = updaterFeedOptions({ alphaFeedUrl: `${ALPHA_FEED}/` });
+ assert.equal(distributionFeed.alphaFeedUrl, ALPHA_FEED);
+ assert.equal(normalizeElectronUpdaterChannel("alpha", distributionFeed), "alpha");
+ assert.equal(electronUpdaterFeedUrl("alpha", distributionFeed), ALPHA_FEED);
+ assert.equal(electronUpdaterFeedUrl("stable", distributionFeed), STABLE_FEED);
+ });
+
+ it("never enables Alpha for parallel manifest channels", () => {
+ const enterprise = updaterFeedOptions({ manifestChannel: "enterprise", alphaFeedUrl: ALPHA_FEED });
+ assert.equal(enterprise.alphaFeedUrl, null);
+ assert.equal(normalizeElectronUpdaterChannel("alpha", enterprise), "stable");
+ });
+});
+
describe("targetedStableUpdaterFeed", () => {
it("builds a fixed GitHub release feed from a strict stable version", () => {
assert.equal(
@@ -390,6 +431,7 @@ releaseDate: '2026-08-11T00:00:00.000Z'
platform: "darwin",
arch: "arm64",
distribution: "public",
+ isDeveloperIdSigned: async () => true,
});
const listed = await handlers.get("omnirush:recovery:list")(null, {
versions: [], minimumVersion: "0.0.0",
@@ -440,6 +482,7 @@ releaseDate: '2026-08-11T00:00:00.000Z'
platform: "darwin",
arch: "arm64",
distribution: "public",
+ isDeveloperIdSigned: async () => true,
});
const listed = await handlers.get("omnirush:recovery:list")(null, {
versions: ["1.9.0"], minimumVersion: "0.0.0",
@@ -479,6 +522,7 @@ releaseDate: '2026-08-11T00:00:00.000Z'
{ version: "1.2.2", verified: false, artifactUrl: "https://tampered.invalid/omnirush.dmg" },
]),
},
+ isDeveloperIdSigned: async () => true,
});
await handlers.get("omnirush:recovery:list")(null, {});
assert.equal((await handlers.get("omnirush:recovery:use")(null, "1.2.2")).ok, false);
@@ -517,8 +561,11 @@ describe("downloaded update lifecycle", () => {
assert.equal(typeof download, "function");
assert.equal(typeof install, "function");
- assert.equal((await check(null, "stable")).available, true);
- assert.deepEqual(await download(), { ok: true });
+ const checked = await check(null, "stable");
+ assert.equal(checked.available, true);
+ assert.equal(checked.installMode, "in-place");
+ assert.equal(checked.alphaChannelSupported, false);
+ assert.deepEqual(await download(), { ok: true, mode: "in-place" });
assert.equal(updater.autoInstallOnAppQuit, true);
assert.deepEqual(calls, ["download"], "downloading must not quit the app");
updater.checkForUpdates = async () => {
@@ -527,7 +574,7 @@ describe("downloaded update lifecycle", () => {
const failedCheck = await check(null, "stable");
assert.equal(failedCheck.available, false);
assert.match(failedCheck.reason, /network flake/);
- assert.deepEqual(await install(), { ok: true });
+ assert.deepEqual(await install(), { ok: true, mode: "in-place" });
assert.deepEqual(calls, ["download", "quitAndInstall"]);
} finally {
await rm(tempDir, { recursive: true, force: true });
@@ -547,11 +594,11 @@ describe("downloaded update lifecycle", () => {
assert.equal(typeof install, "function");
assert.equal((await check(null, "stable")).available, true);
- assert.deepEqual(await download(), { ok: true });
+ assert.deepEqual(await download(), { ok: true, mode: "in-place" });
const onError = listeners.get("error");
assert.equal(typeof onError, "function");
onError(new Error("network flake"));
- assert.deepEqual(await install(), { ok: true });
+ assert.deepEqual(await install(), { ok: true, mode: "in-place" });
assert.deepEqual(calls, ["download", "quitAndInstall"]);
} finally {
await rm(tempDir, { recursive: true, force: true });
@@ -571,7 +618,7 @@ describe("downloaded update lifecycle", () => {
assert.equal(typeof install, "function");
assert.equal((await check(null, "stable")).available, true);
- assert.deepEqual(await download(), { ok: true });
+ assert.deepEqual(await download(), { ok: true, mode: "in-place" });
updater.checkForUpdates = async () => ({
updateInfo: { version: "0.17.0" },
});
@@ -587,6 +634,194 @@ describe("downloaded update lifecycle", () => {
});
});
+describe("macOS code signature detection", () => {
+ it("derives the bundle path from the running executable", () => {
+ assert.equal(
+ macAppBundlePath("/Applications/OmniRush.ai.app/Contents/MacOS/OmniRush.ai"),
+ "/Applications/OmniRush.ai.app",
+ );
+ assert.equal(macAppBundlePath("/usr/local/bin/node"), null);
+ assert.equal(macAppBundlePath(undefined), null);
+ });
+
+ it("accepts only a Developer ID signature", () => {
+ assert.equal(developerIdSignatureFromCodesignOutput(
+ "Identifier=ai.omnirush.desktop\nAuthority=Developer ID Application: OmniRush (TEAMID)\nAuthority=Developer ID Certification Authority",
+ ), true);
+ assert.equal(developerIdSignatureFromCodesignOutput(
+ "Identifier=ai.omnirush.desktop\nSignature=adhoc\nAuthority=Developer ID Application: forged",
+ ), false);
+ assert.equal(developerIdSignatureFromCodesignOutput("Identifier=ai.omnirush.desktop\nSignature=adhoc"), false);
+ assert.equal(developerIdSignatureFromCodesignOutput("Identifier=ai.omnirush.desktop"), false);
+ assert.equal(developerIdSignatureFromCodesignOutput(""), false);
+ });
+
+ it("treats spawn failures and non-bundle executables as ad-hoc", async () => {
+ const execPath = "/Applications/OmniRush.ai.app/Contents/MacOS/OmniRush.ai";
+ const failing = (_command, _args, _options, callback) => callback(new Error("spawn failed"), "", "");
+ assert.equal(await detectDeveloperIdSignature(execPath, failing), false);
+
+ const invocations = [];
+ const signed = (command, args, _options, callback) => {
+ invocations.push([command, ...args]);
+ callback(null, "", "Authority=Developer ID Application: OmniRush (TEAMID)\n");
+ };
+ assert.equal(await detectDeveloperIdSignature(execPath, signed), true);
+ assert.deepEqual(invocations, [["/usr/bin/codesign", "-dv", "--verbose=2", "/Applications/OmniRush.ai.app"]]);
+ assert.equal(await detectDeveloperIdSignature("/usr/local/bin/node", signed), false);
+ });
+});
+
+describe("manual installer artifacts", () => {
+ const files = [
+ { url: "omnirush-mac-arm64-1.2.3.zip", sha512: "zip-checksum", size: 10 },
+ { url: "omnirush-mac-arm64-1.2.3.dmg", sha512: "arm64-checksum", size: 20 },
+ { url: "omnirush-mac-x64-1.2.3.dmg", sha512: "x64-checksum", size: 30 },
+ ];
+
+ it("selects the DMG for the running architecture relative to the feed directory", () => {
+ assert.deepEqual(selectManualInstallerArtifact({ version: "1.2.3", files }, STABLE_FEED, "arm64"), {
+ version: "1.2.3",
+ url: `${STABLE_FEED}/omnirush-mac-arm64-1.2.3.dmg`,
+ sha512: "arm64-checksum",
+ size: 20,
+ fileName: "omnirush-mac-arm64-1.2.3.dmg",
+ });
+ assert.equal(selectManualInstallerArtifact({ version: "1.2.3", files }, STABLE_FEED, "x64")?.sha512, "x64-checksum");
+ });
+
+ it("rejects manifests without a checksummed DMG or with a foreign download origin", () => {
+ assert.equal(selectManualInstallerArtifact({ version: "1.2.3", files: [files[0]] }, STABLE_FEED, "arm64"), null);
+ assert.equal(selectManualInstallerArtifact({
+ version: "1.2.3",
+ files: [{ url: "omnirush-mac-arm64-1.2.3.dmg", sha512: "", size: 20 }],
+ }, STABLE_FEED, "arm64"), null);
+ assert.equal(selectManualInstallerArtifact({
+ version: "1.2.3",
+ files: [{ url: "https://tampered.invalid/omnirush-mac-arm64-1.2.3.dmg", sha512: "x", size: 20 }],
+ }, STABLE_FEED, "arm64"), null);
+ });
+});
+
+describe("macOS manual installer fallback", () => {
+ const manualInstallerHarness = async ({ bytes, sha512 = createHash("sha512").update(bytes).digest("base64"), ...options }) => {
+ const fetched = [];
+ const opened = [];
+ const harness = await registerFakeUpdaterIpc({
+ version: "0.17.1",
+ files: [
+ { url: "omnirush-mac-arm64-0.17.1.zip", sha512: "zip-checksum", size: 1 },
+ { url: "omnirush-mac-arm64-0.17.1.dmg", sha512, size: bytes.length },
+ ],
+ platform: "darwin",
+ arch: "arm64",
+ isDeveloperIdSigned: async () => false,
+ electronNet: { fetch: async (url) => {
+ fetched.push(url);
+ return new Response(bytes);
+ } },
+ shell: { openPath: async (filePath) => {
+ opened.push(filePath);
+ return "";
+ } },
+ quitDelayMs: 0,
+ ...options,
+ });
+ return { ...harness, fetched, opened };
+ };
+
+ it("downloads the manifest DMG and opens it instead of invoking Squirrel on an ad-hoc signed app", async () => {
+ const bytes = Buffer.from("dmg-bytes-for-manual-install");
+ const { tempDir, handlers, calls, sent, fetched, opened } = await manualInstallerHarness({ bytes });
+ try {
+ const check = handlers.get("omnirush:updater:check");
+ const download = handlers.get("omnirush:updater:download");
+ const install = handlers.get("omnirush:updater:installAndRestart");
+ const getChannel = handlers.get("omnirush:updater:getChannel");
+
+ assert.equal((await getChannel()).installMode, "manual-dmg");
+ const checked = await check(null, "stable");
+ assert.equal(checked.available, true);
+ assert.equal(checked.installMode, "manual-dmg");
+
+ assert.deepEqual(await download(), { ok: true, mode: "manual-dmg" });
+ assert.deepEqual(fetched, [`${STABLE_FEED}/omnirush-mac-arm64-0.17.1.dmg`]);
+ assert.deepEqual(calls, [], "electron-updater's zip download must not run");
+ const progress = sent.filter((event) => event.channel === "omnirush:updater:download-progress");
+ assert.equal(progress.at(-1)?.data.transferred, bytes.length);
+ assert.equal(progress.at(-1)?.data.total, bytes.length);
+ assert.equal(progress.at(-1)?.data.percent, 100);
+
+ const installed = await install();
+ const expectedPath = path.join(tempDir, "userData", "app-update-installer", "omnirush-mac-arm64-0.17.1.dmg");
+ assert.deepEqual(installed, { ok: true, mode: "manual-dmg", path: expectedPath });
+ assert.deepEqual(opened, [expectedPath]);
+ assert.deepEqual(readFileSync(expectedPath), bytes);
+ await new Promise((resolve) => setTimeout(resolve, 20));
+ assert.deepEqual(calls, ["quit"], "quitAndInstall must never run for an ad-hoc signed app");
+ } finally {
+ await rm(tempDir, { recursive: true, force: true });
+ }
+ });
+
+ it("rejects an installer whose checksum does not match the manifest", async () => {
+ const bytes = Buffer.from("tampered-dmg");
+ const { tempDir, handlers, calls, opened } = await manualInstallerHarness({ bytes, sha512: "expected-checksum" });
+ try {
+ const check = handlers.get("omnirush:updater:check");
+ const download = handlers.get("omnirush:updater:download");
+ const install = handlers.get("omnirush:updater:installAndRestart");
+
+ assert.equal((await check(null, "stable")).available, true);
+ const result = await download();
+ assert.equal(result.ok, false);
+ assert.match(result.reason, /checksum did not match/);
+ assert.deepEqual(await install(), { ok: false, reason: "update-not-downloaded" });
+ assert.deepEqual(opened, []);
+ assert.deepEqual(calls, []);
+ } finally {
+ await rm(tempDir, { recursive: true, force: true });
+ }
+ });
+
+ it("fails the download when the manifest lists no DMG for this architecture", async () => {
+ const bytes = Buffer.from("x64-only");
+ const { tempDir, handlers, fetched } = await manualInstallerHarness({ bytes, arch: "x64" });
+ try {
+ const check = handlers.get("omnirush:updater:check");
+ const download = handlers.get("omnirush:updater:download");
+ assert.equal((await check(null, "stable")).available, true);
+ const result = await download();
+ assert.equal(result.ok, false);
+ assert.match(result.reason, /does not list a macOS installer/);
+ assert.deepEqual(fetched, []);
+ } finally {
+ await rm(tempDir, { recursive: true, force: true });
+ }
+ });
+
+ it("keeps the Squirrel path for Developer ID signed macOS apps and other platforms", async () => {
+ for (const options of [
+ { platform: "darwin", arch: "arm64", isDeveloperIdSigned: async () => true },
+ { platform: "linux", arch: "x64", isDeveloperIdSigned: async () => false },
+ { platform: "win32", arch: "x64", isDeveloperIdSigned: async () => { throw new Error("not consulted"); } },
+ ]) {
+ const { tempDir, handlers, calls } = await registerFakeUpdaterIpc({ version: "0.17.1", ...options });
+ try {
+ const check = handlers.get("omnirush:updater:check");
+ const download = handlers.get("omnirush:updater:download");
+ const install = handlers.get("omnirush:updater:installAndRestart");
+ assert.equal((await check(null, "stable")).installMode, "in-place");
+ assert.deepEqual(await download(), { ok: true, mode: "in-place" });
+ assert.deepEqual(await install(), { ok: true, mode: "in-place" });
+ assert.deepEqual(calls, ["download", "quitAndInstall"]);
+ } finally {
+ await rm(tempDir, { recursive: true, force: true });
+ }
+ }
+ });
+});
+
describe("release channel changes", () => {
it("prevents a previously downloaded update from installing on quit", () => {
const updater = { autoInstallOnAppQuit: true };
@@ -608,32 +843,66 @@ describe("release channel changes", () => {
ipcMain: { handle: (name, handler) => handlers.set(name, handler) },
getMainWindow: () => null,
manifestChannel: "enterprise",
+ alphaFeedUrl: ALPHA_FEED,
});
const setChannel = handlers.get("omnirush:updater:setChannel");
assert.equal(typeof setChannel, "function");
assert.deepEqual(await setChannel(null, "alpha"), {
channel: "stable",
- feedUrl: "https://github.com/omnirush-ai/omnirush-gui/releases/latest/download",
+ feedUrl: STABLE_FEED,
currentVersion: desktopVersion,
+ alphaChannelSupported: false,
+ installMode: "in-place",
});
} finally {
await rm(userData, { recursive: true, force: true });
}
});
- it("does not let a check overwrite the selected channel", {
- skip: process.platform !== "darwin",
- }, async () => {
+ it("normalizes a persisted or requested alpha channel to stable on the public distribution", async () => {
+ const { tempDir, handlers, feeds } = await registerFakeUpdaterIpc({ version: "0.18.0" });
+ try {
+ const channelPath = path.join(tempDir, "userData", "electron-updater-channel.v1.json");
+ await mkdir(path.dirname(channelPath), { recursive: true });
+ await writeFile(channelPath, JSON.stringify({ channel: "alpha" }), "utf8");
+
+ const check = handlers.get("omnirush:updater:check");
+ const setChannel = handlers.get("omnirush:updater:setChannel");
+ const getChannel = handlers.get("omnirush:updater:getChannel");
+
+ const persisted = await getChannel();
+ assert.equal(persisted.channel, "stable");
+ assert.equal(persisted.feedUrl, STABLE_FEED);
+ assert.equal(persisted.alphaChannelSupported, false);
+
+ const requested = await check(null, "alpha");
+ assert.equal(requested.channel, "stable");
+ assert.equal(requested.feedUrl, STABLE_FEED);
+ assert.equal(feeds.at(-1)?.url, STABLE_FEED);
+ assert.ok(feeds.every((feed) => feed.url === STABLE_FEED), "no feed may point at an Alpha release");
+
+ const selected = await setChannel(null, "alpha");
+ assert.equal(selected.channel, "stable");
+ assert.equal(JSON.parse(await readFile(channelPath, "utf8")).channel, "stable");
+ } finally {
+ await rm(tempDir, { recursive: true, force: true });
+ }
+ });
+
+ it("does not let a check overwrite the selected channel", async () => {
const { tempDir, handlers } = await registerFakeUpdaterIpc({
version: "0.18.0",
+ alphaFeedUrl: ALPHA_FEED,
});
try {
const check = handlers.get("omnirush:updater:check");
const setChannel = handlers.get("omnirush:updater:setChannel");
const getChannel = handlers.get("omnirush:updater:getChannel");
- assert.equal((await setChannel(null, "alpha")).channel, "alpha");
+ const selected = await setChannel(null, "alpha");
+ assert.equal(selected.channel, "alpha");
+ assert.equal(selected.alphaChannelSupported, true);
assert.equal((await check(null, "stable")).channel, "stable");
assert.equal((await getChannel()).channel, "alpha");
} finally {
@@ -641,32 +910,27 @@ describe("release channel changes", () => {
}
});
- it("downloads from the channel used by the successful check", {
- skip: process.platform !== "darwin",
- }, async () => {
+ it("downloads from the channel used by the successful check", async () => {
const { tempDir, handlers, downloadFeeds } = await registerFakeUpdaterIpc({
version: "0.18.0-alpha.1",
+ alphaFeedUrl: ALPHA_FEED,
});
try {
const check = handlers.get("omnirush:updater:check");
const download = handlers.get("omnirush:updater:download");
assert.equal((await check(null, "alpha")).channel, "alpha");
- assert.deepEqual(await download(), { ok: true });
- assert.equal(
- downloadFeeds.at(-1)?.url,
- "https://github.com/omnirush-ai/omnirush-gui/releases/download/alpha-macos-latest",
- );
+ assert.deepEqual(await download(), { ok: true, mode: "in-place" });
+ assert.equal(downloadFeeds.at(-1)?.url, ALPHA_FEED);
} finally {
await rm(tempDir, { recursive: true, force: true });
}
});
- it("keeps Alpha selected when a Stable check is already in flight", {
- skip: process.platform !== "darwin",
- }, async () => {
+ it("keeps Alpha selected when a Stable check is already in flight", async () => {
const { tempDir, handlers, updater, feeds } = await registerFakeUpdaterIpc({
version: "0.18.0",
+ alphaFeedUrl: ALPHA_FEED,
});
/** @type {{ finish: null | (() => void) }} */
const stableCheckControl = { finish: null };
@@ -701,10 +965,7 @@ describe("release channel changes", () => {
)).channel,
"alpha",
);
- assert.equal(
- feeds.at(-1)?.url,
- "https://github.com/omnirush-ai/omnirush-gui/releases/download/alpha-macos-latest",
- );
+ assert.equal(feeds.at(-1)?.url, ALPHA_FEED);
} finally {
await rm(tempDir, { recursive: true, force: true });
}
diff --git a/apps/desktop/electron/workspace-store.mjs b/apps/desktop/electron/workspace-store.mjs
index e0f8c93a..751a74d4 100644
--- a/apps/desktop/electron/workspace-store.mjs
+++ b/apps/desktop/electron/workspace-store.mjs
@@ -116,23 +116,27 @@ const DEFAULT_DESKTOP_BOOTSTRAP_PATH = resolveDesktopBootstrapPath({ homeDir: os
// LOCALAPPDATA and XDG_CONFIG_HOME. Keep reading that file when the canonical one
// is missing so existing installs keep their deployment config.
const LEGACY_DESKTOP_BOOTSTRAP_PATH = resolveLegacyDesktopBootstrapPath({ homeDir: os.homedir() });
-const HOSTED_DESKTOP_WEB_URL = "https://app.omnirushlabs.com";
-const HOSTED_DESKTOP_API_URL = "https://api.omnirushlabs.com";
-
-function bootstrapUrlOrigin(value) {
- if (typeof value !== "string" || !value.trim()) return "";
+// The retired hosted control plane. omnirush.ai has no hosted Den, and these
+// hosts no longer resolve in DNS: older builds materialized them as the
+// bootstrap default, so a file that still points at them is a stale artifact,
+// not a configuration. It is rejected on read (defaults apply instead) and on
+// write, and nothing here ever contacts these hosts.
+const RETIRED_HOSTED_CONTROL_PLANE_HOSTS = new Set([
+ "omnirushlabs.com",
+ "app.omnirushlabs.com",
+ "api.omnirushlabs.com",
+ "api.app.omnirushlabs.com",
+]);
+
+export function isRetiredHostedControlPlaneUrl(value) {
+ if (typeof value !== "string" || !value.trim()) return false;
try {
- return new URL(value.trim()).origin;
+ return RETIRED_HOSTED_CONTROL_PLANE_HOSTS.has(new URL(value.trim()).hostname.toLowerCase());
} catch {
- return value.trim().replace(/\/+$/, "");
+ return false;
}
}
-function isHostedDesktopBootstrapConfig(config) {
- const baseUrlOrigin = bootstrapUrlOrigin(config?.baseUrl);
- return baseUrlOrigin === HOSTED_DESKTOP_WEB_URL || baseUrlOrigin === HOSTED_DESKTOP_API_URL;
-}
-
export function createWorkspaceStore({
app,
defaultDenBaseUrl,
@@ -211,6 +215,9 @@ export function createWorkspaceStore({
if (!baseUrl) {
throw new Error("baseUrl is required");
}
+ if (isRetiredHostedControlPlaneUrl(baseUrl) || isRetiredHostedControlPlaneUrl(input?.apiBaseUrl)) {
+ throw new Error("baseUrl points at the retired hosted control plane, which no longer exists");
+ }
// The handoff grant is a one-time, short-lived (~5 min) desktop sign-in
// token written to this machine-local config by the bootstrap CLI. The app
@@ -310,8 +317,7 @@ export function createWorkspaceStore({
}
function compareDesktopBootstrapCandidates(left, right) {
- const classDifference = Number(!isHostedDesktopBootstrapConfig(left.normalized)) - Number(!isHostedDesktopBootstrapConfig(right.normalized));
- return classDifference || desktopBootstrapCandidateTimeMs(left) - desktopBootstrapCandidateTimeMs(right);
+ return desktopBootstrapCandidateTimeMs(left) - desktopBootstrapCandidateTimeMs(right);
}
async function readDesktopBootstrapCandidate(candidatePath) {
diff --git a/apps/desktop/electron/workspace-store.test.mjs b/apps/desktop/electron/workspace-store.test.mjs
index 85e36fcb..a4ecf526 100644
--- a/apps/desktop/electron/workspace-store.test.mjs
+++ b/apps/desktop/electron/workspace-store.test.mjs
@@ -505,7 +505,7 @@ test("explicit desktop bootstrap path still reads its configured bootstrap", asy
});
});
-test("desktop bootstrap prefers an older legacy organization config over a newer canonical hosted default", async () => {
+test("desktop bootstrap prefers an older legacy organization config over a newer canonical retired hosted default", async () => {
await withIsolatedBootstrapStore(async ({ store, canonicalPath, legacyPath }) => {
await writeBootstrapConfig(canonicalPath, {
baseUrl: "https://app.omnirushlabs.com/api/den/",
@@ -528,7 +528,7 @@ test("desktop bootstrap prefers an older legacy organization config over a newer
});
});
-test("desktop bootstrap keeps an older canonical organization config over a newer legacy hosted default", async () => {
+test("desktop bootstrap keeps an older canonical organization config over a newer legacy retired hosted default", async () => {
await withIsolatedBootstrapStore(async ({ store, canonicalPath, legacyPath }) => {
await writeBootstrapConfig(canonicalPath, {
baseUrl: "https://omnirush.organization.internal.example",
@@ -551,6 +551,28 @@ test("desktop bootstrap keeps an older canonical organization config over a newe
});
});
+test("a bootstrap that points at the retired hosted control plane is rejected on read and write", async () => {
+ await withIsolatedBootstrapStore(async ({ store, canonicalPath }) => {
+ await writeBootstrapConfig(canonicalPath, {
+ baseUrl: "https://app.omnirushlabs.com",
+ requireSignin: false,
+ writtenAt: "2026-07-10T13:00:00.000Z",
+ });
+
+ const config = await store.getDesktopBootstrapConfig();
+ assert.equal(config.fromFile, false);
+ assert.equal(config.baseUrl, store.readDesktopBootstrapConfigSync().baseUrl);
+ await assert.rejects(
+ store.setDesktopBootstrapConfig({ baseUrl: "https://api.app.omnirushlabs.com", requireSignin: false }),
+ /retired hosted control plane/,
+ );
+ await assert.rejects(
+ store.setDesktopBootstrapConfig({ baseUrl: "https://den.example.com", apiBaseUrl: "https://api.omnirushlabs.com", requireSignin: false }),
+ /retired hosted control plane/,
+ );
+ });
+});
+
test("desktop bootstrap ignores a newer malformed canonical config when legacy is valid", async () => {
await withIsolatedBootstrapStore(async ({ store, canonicalPath, legacyPath }) => {
await writeBootstrapConfig(legacyPath, {
@@ -657,12 +679,12 @@ test("enterprise activation is preserved, required activation is overrideable, a
forceRequireSignin: true,
});
await store.setDesktopBootstrapConfig({
- baseUrl: "https://app.omnirushlabs.com",
+ baseUrl: "https://den.example.com",
requireSignin: false,
requireActivation: false,
enterpriseActivation: {
activatedAt: "2026-07-27T12:00:00.000Z",
- denBaseUrl: "https://app.omnirushlabs.com",
+ denBaseUrl: "https://den.example.com",
},
});
@@ -671,7 +693,7 @@ test("enterprise activation is preserved, required activation is overrideable, a
assert.equal(config.requireActivation, false);
assert.deepEqual(config.enterpriseActivation, {
activatedAt: "2026-07-27T12:00:00.000Z",
- denBaseUrl: "https://app.omnirushlabs.com",
+ denBaseUrl: "https://den.example.com",
});
const persisted = JSON.parse(await readFile(canonicalPath, "utf8"));
assert.equal(persisted.requireSignin, true);
@@ -685,7 +707,7 @@ test("enterprise activation is preserved, required activation is overrideable, a
test("an omitted requireActivation is never materialized into the shared bootstrap file", async () => {
await withIsolatedBootstrapStore(async ({ store, canonicalPath }) => {
await store.setDesktopBootstrapConfig({
- baseUrl: "https://app.omnirushlabs.com",
+ baseUrl: "https://den.example.com",
requireSignin: true,
});
diff --git a/apps/desktop/package.json b/apps/desktop/package.json
index ed0181c4..2fc68b81 100644
--- a/apps/desktop/package.json
+++ b/apps/desktop/package.json
@@ -6,7 +6,7 @@
"description": "OmniRush.ai desktop shell",
"author": {
"name": "OmniRush.ai",
- "email": "[email protected]"
+ "email": "[email protected]"
},
"main": "electron/main.mjs",
"type": "module",
@@ -26,7 +26,7 @@
"prepare:sidecar": "node ./scripts/prepare-sidecar.mjs",
"pretest": "pnpm --filter @omnirush/headless-threads build",
"test:omnirush-account": "node --test electron/omnirush-account.test.mjs",
- "test": "node --test scripts/prepare-server-constants.test.mjs electron/after-pack-paths.test.mjs electron/agent-context-diagnostics-fetch.test.mjs electron/automation-runner.test.mjs electron/binary-transfer.test.mjs electron/blank-slate-profile.test.mjs electron/blank-slate-profile-isolation.test.mjs electron/brand-app-name.test.mjs electron/brand-icon-darwin.test.mjs electron/brand-icon-windows.test.mjs electron/browser-login-sync.test.mjs electron/browser-panel.test.mjs electron/connect-link.test.mjs electron/desktop-distribution.test.mjs electron/dev-profile.test.mjs electron/electron-builder-config.test.mjs electron/linux-desktop-integration.test.mjs electron/no-bare-external-fetch.test.mjs electron/nuke.test.mjs electron/open-external.test.mjs electron/process-resilience.test.mjs electron/runtime.test.mjs electron/runtime-ca.test.mjs electron/runtime-chain-repair.test.mjs electron/sentry.test.mjs electron/server-dependency-mirror.test.mjs electron/secure-vault-key.test.mjs electron/stdio-errors.test.mjs electron/ui-control-server.test.mjs electron/updater.test.mjs electron/remote-workspace.test.mjs electron/workspace-archive.test.mjs electron/workspace-store.test.mjs",
+ "test": "node --test scripts/prepare-server-constants.test.mjs scripts/verify-update-manifest.test.mjs electron/after-pack-paths.test.mjs electron/agent-context-diagnostics-fetch.test.mjs electron/automation-runner.test.mjs electron/binary-transfer.test.mjs electron/blank-slate-profile.test.mjs electron/blank-slate-profile-isolation.test.mjs electron/brand-app-name.test.mjs electron/brand-icon-darwin.test.mjs electron/brand-icon-windows.test.mjs electron/browser-login-sync.test.mjs electron/browser-panel.test.mjs electron/connect-link.test.mjs electron/desktop-distribution.test.mjs electron/dev-profile.test.mjs electron/electron-builder-config.test.mjs electron/linux-desktop-integration.test.mjs electron/no-bare-external-fetch.test.mjs electron/nuke.test.mjs electron/open-external.test.mjs electron/process-resilience.test.mjs electron/runtime.test.mjs electron/runtime-ca.test.mjs electron/runtime-chain-repair.test.mjs electron/sentry.test.mjs electron/server-dependency-mirror.test.mjs electron/secure-vault-key.test.mjs electron/stdio-errors.test.mjs electron/ui-control-server.test.mjs electron/updater.test.mjs electron/remote-workspace.test.mjs electron/workspace-archive.test.mjs electron/workspace-store.test.mjs",
"test:core": "node --test scripts/prepare-server-constants.test.mjs electron/workspace-store.test.mjs electron/workspace-archive.test.mjs electron/connect-link.test.mjs electron/open-external.test.mjs electron/secure-vault-key.test.mjs electron/process-resilience.test.mjs electron/stdio-errors.test.mjs electron/runtime-ca.test.mjs electron/runtime-chain-repair.test.mjs electron/automation-runner.test.mjs",
"pretest:core": "pnpm --filter @omnirush/headless-threads build"
},
diff --git a/apps/desktop/scripts/verify-update-manifest.mjs b/apps/desktop/scripts/verify-update-manifest.mjs
new file mode 100644
index 00000000..68659a06
--- /dev/null
+++ b/apps/desktop/scripts/verify-update-manifest.mjs
@@ -0,0 +1,185 @@
+#!/usr/bin/env node
+/**
+ * Verifies an electron-builder update manifest (latest-mac.yml, latest.yml,
+ * latest-linux.yml, or a distribution's <channel>*.yml) against the packaged
+ * assets next to it. electron-updater reads that manifest to discover an
+ * update, so a release that ships without it, or whose checksums do not match
+ * the uploaded installers, silently breaks in-app updates. The release
+ * workflow runs this before uploading anything.
+ *
+ * Usage:
+ * node scripts/verify-update-manifest.mjs --manifest <path> [--dist <dir>] [--version X.Y.Z]
+ *
+ * `--dist` defaults to the manifest's directory and `--version` to the version
+ * in apps/desktop/package.json (stamped by scripts/release/stamp-version.mjs).
+ */
+import { createHash } from "node:crypto";
+import { createReadStream, existsSync, readFileSync, statSync } from "node:fs";
+import path from "node:path";
+import { fileURLToPath } from "node:url";
+import YAML from "yaml";
+
+const desktopRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
+const BASE64_PATTERN = /^[A-Za-z0-9+/]+={0,2}$/;
+
+export function readDesktopPackageVersion(rootDir = desktopRoot) {
+ return JSON.parse(readFileSync(path.join(rootDir, "package.json"), "utf8")).version;
+}
+
+/**
+ * Every manifest must list the installers the app relies on: Squirrel.Mac
+ * needs the zip and the unsigned-build fallback opens the DMG; NSIS installs
+ * from the exe; Linux updates replace the AppImage.
+ */
+export function requiredInstallerExtensions(manifestName) {
+ if (/-mac\.yml$/.test(manifestName)) return [".zip", ".dmg"];
+ if (/-linux(?:-arm64)?\.yml$/.test(manifestName)) return [".AppImage"];
+ return [".exe"];
+}
+
+function sha512Base64(filePath) {
+ return new Promise((resolve, reject) => {
+ const hash = createHash("sha512");
+ const stream = createReadStream(filePath);
+ stream.on("data", (chunk) => hash.update(chunk));
+ stream.on("error", reject);
+ stream.on("end", () => resolve(hash.digest("base64")));
+ });
+}
+
+function isPlainFileName(value) {
+ return typeof value === "string"
+ && value.trim() === value
+ && value.length > 0
+ && value === path.basename(value)
+ && !value.includes("/")
+ && !value.includes("\\")
+ && !/^[a-z][a-z0-9+.-]*:/i.test(value);
+}
+
+export async function verifyUpdateManifest({
+ manifestPath,
+ distDir = path.dirname(manifestPath),
+ expectedVersion = readDesktopPackageVersion(),
+}) {
+ const errors = [];
+ const manifestName = path.basename(manifestPath);
+ if (!existsSync(manifestPath)) {
+ return { ok: false, errors: [`Update manifest is missing: ${manifestPath}`], manifest: null };
+ }
+ let manifest;
+ try {
+ manifest = YAML.parse(readFileSync(manifestPath, "utf8"));
+ } catch (error) {
+ return { ok: false, errors: [`Update manifest is not valid YAML: ${error?.message ?? error}`], manifest: null };
+ }
+ if (!manifest || typeof manifest !== "object") {
+ return { ok: false, errors: ["Update manifest is empty."], manifest: null };
+ }
+
+ if (String(manifest.version ?? "") !== String(expectedVersion)) {
+ errors.push(`Manifest version ${JSON.stringify(manifest.version ?? null)} does not match the packaged version ${expectedVersion}.`);
+ }
+
+ const files = Array.isArray(manifest.files) ? manifest.files : [];
+ if (files.length === 0) errors.push("Manifest lists no files.");
+ const digests = new Map();
+ const listedNames = new Set();
+ for (const [index, file] of files.entries()) {
+ const label = `files[${index}]`;
+ if (!file || typeof file !== "object" || !isPlainFileName(file.url)) {
+ errors.push(`${label} must have a plain file name in url.`);
+ continue;
+ }
+ listedNames.add(file.url);
+ const filePath = path.join(distDir, file.url);
+ if (typeof file.sha512 !== "string" || !BASE64_PATTERN.test(file.sha512) || Buffer.from(file.sha512, "base64").length !== 64) {
+ errors.push(`${label} (${file.url}) must carry a base64 sha512.`);
+ }
+ if (!Number.isInteger(file.size) || file.size <= 0) {
+ errors.push(`${label} (${file.url}) must carry a positive integer size.`);
+ }
+ if (!existsSync(filePath)) {
+ errors.push(`${label} (${file.url}) does not exist in ${distDir}.`);
+ continue;
+ }
+ const actualSize = statSync(filePath).size;
+ if (Number.isInteger(file.size) && actualSize !== file.size) {
+ errors.push(`${label} (${file.url}) size ${file.size} does not match the file on disk (${actualSize}).`);
+ }
+ const digest = await sha512Base64(filePath);
+ digests.set(file.url, digest);
+ if (typeof file.sha512 === "string" && digest !== file.sha512) {
+ errors.push(`${label} (${file.url}) sha512 does not match the file on disk.`);
+ }
+ }
+
+ if (!isPlainFileName(manifest.path)) {
+ errors.push("Manifest path must be a plain file name.");
+ } else {
+ const legacyPath = path.join(distDir, manifest.path);
+ if (!listedNames.has(manifest.path)) {
+ errors.push(`Manifest path ${manifest.path} is not listed under files.`);
+ }
+ if (!existsSync(legacyPath)) {
+ errors.push(`Manifest path ${manifest.path} does not exist in ${distDir}.`);
+ } else {
+ const digest = digests.get(manifest.path) ?? await sha512Base64(legacyPath);
+ if (typeof manifest.sha512 !== "string" || digest !== manifest.sha512) {
+ errors.push(`Manifest sha512 does not match ${manifest.path} on disk.`);
+ }
+ }
+ }
+
+ const releaseDate = typeof manifest.releaseDate === "string" ? Date.parse(manifest.releaseDate) : Number.NaN;
+ if (!Number.isFinite(releaseDate)) {
+ errors.push("Manifest releaseDate must be an ISO-8601 date.");
+ }
+
+ for (const extension of requiredInstallerExtensions(manifestName)) {
+ if (![...listedNames].some((name) => name.endsWith(extension))) {
+ errors.push(`${manifestName} must list a ${extension} asset.`);
+ }
+ }
+
+ return { ok: errors.length === 0, errors, manifest };
+}
+
+function parseArgs(argv) {
+ const options = {};
+ for (let index = 0; index < argv.length; index += 1) {
+ const arg = argv[index];
+ if (arg === "--manifest" || arg === "--dist" || arg === "--version") {
+ options[arg.slice(2)] = argv[index + 1];
+ index += 1;
+ } else {
+ throw new Error(`Unknown argument: ${arg}`);
+ }
+ }
+ if (!options.manifest) throw new Error("Usage: verify-update-manifest.mjs --manifest <path> [--dist <dir>] [--version X.Y.Z]");
+ return options;
+}
+
+async function main() {
+ const options = parseArgs(process.argv.slice(2));
+ const manifestPath = path.resolve(options.manifest);
+ const result = await verifyUpdateManifest({
+ manifestPath,
+ ...(options.dist ? { distDir: path.resolve(options.dist) } : {}),
+ ...(options.version ? { expectedVersion: options.version.replace(/^v/, "") } : {}),
+ });
+ if (!result.ok) {
+ console.error(`Update manifest verification failed for ${manifestPath}:`);
+ for (const error of result.errors) console.error(` - ${error}`);
+ process.exit(1);
+ }
+ const files = (result.manifest.files ?? []).map((file) => file.url);
+ console.log(JSON.stringify({ ok: true, manifest: manifestPath, version: result.manifest.version, files }, null, 2));
+}
+
+if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
+ main().catch((error) => {
+ console.error(error instanceof Error ? error.message : String(error));
+ process.exit(1);
+ });
+}
diff --git a/apps/desktop/scripts/verify-update-manifest.test.mjs b/apps/desktop/scripts/verify-update-manifest.test.mjs
new file mode 100644
index 00000000..03673875
--- /dev/null
+++ b/apps/desktop/scripts/verify-update-manifest.test.mjs
@@ -0,0 +1,181 @@
+import assert from "node:assert/strict";
+import { execFile } from "node:child_process";
+import { createHash } from "node:crypto";
+import { mkdtemp, rm, writeFile } from "node:fs/promises";
+import os from "node:os";
+import path from "node:path";
+import { describe, it } from "node:test";
+import { fileURLToPath } from "node:url";
+
+import { requiredInstallerExtensions, verifyUpdateManifest } from "./verify-update-manifest.mjs";
+
+const scriptPath = fileURLToPath(new URL("./verify-update-manifest.mjs", import.meta.url));
+
+function sha512(bytes) {
+ return createHash("sha512").update(bytes).digest("base64");
+}
+
+async function writeFixture({ version = "1.2.3", manifestName = "latest-mac.yml", mutate = (manifest) => manifest } = {}) {
+ const distDir = await mkdtemp(path.join(os.tmpdir(), "omnirush-update-manifest-"));
+ const zipBytes = Buffer.from(`zip-${version}`);
+ const dmgBytes = Buffer.from(`dmg-${version}-payload`);
+ const zipName = `omnirush-mac-arm64-${version}.zip`;
+ const dmgName = `omnirush-mac-arm64-${version}.dmg`;
+ await writeFile(path.join(distDir, zipName), zipBytes);
+ await writeFile(path.join(distDir, dmgName), dmgBytes);
+ const manifest = mutate({
+ version,
+ files: [
+ { url: zipName, sha512: sha512(zipBytes), size: zipBytes.length },
+ { url: dmgName, sha512: sha512(dmgBytes), size: dmgBytes.length },
+ ],
+ path: zipName,
+ sha512: sha512(zipBytes),
+ releaseDate: "2026-09-22T16:14:09.051Z",
+ });
+ const manifestPath = path.join(distDir, manifestName);
+ const lines = [
+ `version: ${manifest.version}`,
+ "files:",
+ ...manifest.files.flatMap((file) => [
+ ` - url: ${file.url}`,
+ ` sha512: ${file.sha512}`,
+ ` size: ${file.size}`,
+ ]),
+ `path: ${manifest.path}`,
+ `sha512: ${manifest.sha512}`,
+ `releaseDate: '${manifest.releaseDate}'`,
+ "",
+ ];
+ await writeFile(manifestPath, lines.join("\n"), "utf8");
+ return { distDir, manifestPath, zipName, dmgName };
+}
+
+describe("verifyUpdateManifest", () => {
+ it("accepts a manifest whose entries match the packaged assets", async () => {
+ const { distDir, manifestPath } = await writeFixture();
+ try {
+ const result = await verifyUpdateManifest({ manifestPath, expectedVersion: "1.2.3" });
+ assert.deepEqual(result.errors, []);
+ assert.equal(result.ok, true);
+ assert.equal(result.manifest.version, "1.2.3");
+ } finally {
+ await rm(distDir, { recursive: true, force: true });
+ }
+ });
+
+ it("rejects a version that differs from the packaged version", async () => {
+ const { distDir, manifestPath } = await writeFixture();
+ try {
+ const result = await verifyUpdateManifest({ manifestPath, expectedVersion: "1.2.4" });
+ assert.equal(result.ok, false);
+ assert.match(result.errors.join("\n"), /version "1\.2\.3" does not match the packaged version 1\.2\.4/);
+ } finally {
+ await rm(distDir, { recursive: true, force: true });
+ }
+ });
+
+ it("rejects checksum, size, and missing-file mismatches", async () => {
+ const { distDir, manifestPath, dmgName, zipName } = await writeFixture({
+ mutate: (manifest) => ({
+ ...manifest,
+ files: [
+ { ...manifest.files[0], size: manifest.files[0].size + 1 },
+ { ...manifest.files[1], sha512: sha512(Buffer.from("tampered")) },
+ { url: "omnirush-mac-x64-1.2.3.dmg", sha512: sha512(Buffer.from("missing")), size: 7 },
+ ],
+ }),
+ });
+ try {
+ const result = await verifyUpdateManifest({ manifestPath, expectedVersion: "1.2.3" });
+ assert.equal(result.ok, false);
+ const text = result.errors.join("\n");
+ assert.match(text, new RegExp(`${zipName}\\) size \\d+ does not match`));
+ assert.match(text, new RegExp(`${dmgName}\\) sha512 does not match`));
+ assert.match(text, /omnirush-mac-x64-1\.2\.3\.dmg\) does not exist/);
+ } finally {
+ await rm(distDir, { recursive: true, force: true });
+ }
+ });
+
+ it("requires the legacy path entry to be listed and to match its checksum", async () => {
+ const { distDir, manifestPath } = await writeFixture({
+ mutate: (manifest) => ({ ...manifest, path: "omnirush-mac-arm64-9.9.9.zip", sha512: "AAAA" }),
+ });
+ try {
+ const result = await verifyUpdateManifest({ manifestPath, expectedVersion: "1.2.3" });
+ assert.equal(result.ok, false);
+ const text = result.errors.join("\n");
+ assert.match(text, /is not listed under files/);
+ assert.match(text, /does not exist/);
+ } finally {
+ await rm(distDir, { recursive: true, force: true });
+ }
+ });
+
+ it("requires the installers each platform relies on", async () => {
+ assert.deepEqual(requiredInstallerExtensions("latest-mac.yml"), [".zip", ".dmg"]);
+ assert.deepEqual(requiredInstallerExtensions("cloud-mac.yml"), [".zip", ".dmg"]);
+ assert.deepEqual(requiredInstallerExtensions("latest.yml"), [".exe"]);
+ assert.deepEqual(requiredInstallerExtensions("enterprise.yml"), [".exe"]);
+ assert.deepEqual(requiredInstallerExtensions("latest-linux.yml"), [".AppImage"]);
+ assert.deepEqual(requiredInstallerExtensions("latest-linux-arm64.yml"), [".AppImage"]);
+
+ const { distDir, manifestPath } = await writeFixture({
+ manifestName: "latest-linux.yml",
+ });
+ try {
+ const result = await verifyUpdateManifest({ manifestPath, expectedVersion: "1.2.3" });
+ assert.equal(result.ok, false);
+ assert.match(result.errors.join("\n"), /latest-linux\.yml must list a \.AppImage asset/);
+ } finally {
+ await rm(distDir, { recursive: true, force: true });
+ }
+ });
+
+ it("rejects url entries that are not plain file names", async () => {
+ const { distDir, manifestPath } = await writeFixture({
+ mutate: (manifest) => ({
+ ...manifest,
+ files: [manifest.files[0], { ...manifest.files[1], url: "https://tampered.invalid/omnirush-mac-arm64-1.2.3.dmg" }],
+ }),
+ });
+ try {
+ const result = await verifyUpdateManifest({ manifestPath, expectedVersion: "1.2.3" });
+ assert.equal(result.ok, false);
+ assert.match(result.errors.join("\n"), /files\[1\] must have a plain file name/);
+ } finally {
+ await rm(distDir, { recursive: true, force: true });
+ }
+ });
+
+ it("fails the command when the manifest is missing", async () => {
+ const distDir = await mkdtemp(path.join(os.tmpdir(), "omnirush-update-manifest-missing-"));
+ try {
+ const { code, stderr } = await new Promise((resolve) => {
+ execFile(process.execPath, [scriptPath, "--manifest", path.join(distDir, "latest-mac.yml"), "--version", "1.2.3"], (error, stdout, stderrOutput) => {
+ resolve({ code: error?.code ?? 0, stdout, stderr: stderrOutput });
+ });
+ });
+ assert.equal(code, 1);
+ assert.match(stderr, /Update manifest is missing/);
+ } finally {
+ await rm(distDir, { recursive: true, force: true });
+ }
+ });
+
+ it("verifies through the command line with an explicit version", async () => {
+ const { distDir, manifestPath } = await writeFixture();
+ try {
+ const { code, stdout } = await new Promise((resolve) => {
+ execFile(process.execPath, [scriptPath, "--manifest", manifestPath, "--version", "v1.2.3"], (error, stdoutOutput, stderr) => {
+ resolve({ code: error?.code ?? 0, stdout: stdoutOutput, stderr });
+ });
+ });
+ assert.equal(code, 0);
+ assert.equal(JSON.parse(stdout).ok, true);
+ } finally {
+ await rm(distDir, { recursive: true, force: true });
+ }
+ });
+});
diff --git a/docs/updates.md b/docs/updates.md
new file mode 100644
index 00000000..d134fe5b
--- /dev/null
+++ b/docs/updates.md
@@ -0,0 +1,65 @@
+# Desktop updates
+
+How the omnirush.ai desktop app finds, downloads, and installs new versions, and what a release must contain for that to work.
+
+## How a check works
+
+The Updates page (Settings > Updates) and the "Check for Updates..." menu item call the Electron main process (`apps/desktop/electron/updater.mjs`), which drives [electron-updater](https://www.electron.build/auto-update) with the generic provider:
+
+1. The updater fetches the update manifest for this platform from the feed directory (below) and compares its `version` with the installed version.
+2. "Download" fetches the file the manifest lists for the running platform and architecture and verifies its `sha512` against the manifest.
+3. "Install" applies it. On Windows (NSIS) and Linux (AppImage) the installer runs in place; on macOS the behaviour depends on the app's code signature (see below).
+
+With "Check automatically" enabled the page checks every 15 minutes while the app is focused; "Download automatically" downloads as soon as an update is found. On a public install the check contacts only `github.com`: omnirush.ai has no hosted Den control plane, so no organization release inventory or policy is consulted unless a Den base URL was configured explicitly (`desktop-bootstrap.json`, a connect link, or Settings > Advanced).
+
+Failures are shown verbatim on the page, minus the `Error invoking remote method '...':` prefix Electron adds to IPC failures.
+
+## Feed URLs
+
+| Channel | Feed directory | Manifest read by the app |
+| --- | --- | --- |
+| Stable (the only public channel) | `https://github.com/omnirush-ai/omnirush-gui/releases/latest/download` | `latest-mac.yml`, `latest.yml` (Windows), `latest-linux.yml` |
+| Targeted recovery/rollback | `https://github.com/omnirush-ai/omnirush-gui/releases/download/v<version>` | same names |
+
+There is no public Alpha feed. A persisted or requested "alpha" channel is normalized back to "stable" and the channel selector stays hidden. A custom distribution can enable an Alpha channel by shipping an https feed directory in its electron-builder `extraMetadata` as `omnirushAlphaUpdateFeedUrl` (development runs may set `OMNIRUSH_DESKTOP_ALPHA_UPDATE_FEED_URL`); the Cloud and Enterprise flavors keep their parallel `cloud*.yml` / `enterprise*.yml` manifests on the stable feed.
+
+## What a release must contain
+
+For each platform the release needs the installers **and** the electron-builder update manifest next to them, all uploaded to the same GitHub release:
+
+| Platform | Installers | Manifest |
+| --- | --- | --- |
+| macOS Apple Silicon | `omnirush-mac-arm64-<version>.zip` (+`.blockmap`), `omnirush-mac-arm64-<version>.dmg` (+`.blockmap`) | `latest-mac.yml` |
+| Windows x64 | `omnirush-win-x64-<version>.exe` (+`.blockmap`) | `latest.yml` |
+| Linux x64 | `omnirush-linux-x86_64-<version>.AppImage`, `omnirush-linux-x64-<version>.tar.gz` | `latest-linux.yml` |
+
+The manifest is the file electron-updater reads; a release without it makes every installed app report a 404 when checking for updates (this is what happened to v1.0.2 through v1.0.4). electron-builder writes the manifest into `apps/desktop/dist-electron/` whenever a `publish` block is configured, even with `--publish never`; the release workflow verifies it with `apps/desktop/scripts/verify-update-manifest.mjs` (version, listed files, sizes, sha512 checksums, and the required installer types) and fails the job if it is missing or inconsistent, then uploads it together with the installers.
+
+To check a local package:
+
+```bash
+pnpm --filter @omnirush/desktop package:electron
+node apps/desktop/scripts/verify-update-manifest.mjs --manifest apps/desktop/dist-electron/latest-mac.yml
+```
+
+## macOS: why the DMG opens instead of an in-place install
+
+Squirrel.Mac, which electron-updater uses to swap the app bundle on macOS, only installs an update whose code signature validates against the running app. Community builds are ad-hoc signed (no Apple Developer ID; see `apps/desktop/scripts/electron-after-sign.cjs`), so that validation always fails and an in-place install would silently do nothing.
+
+The app therefore checks its own signature once at startup (`codesign -dv --verbose=2` on the bundle). When the bundle is not Developer ID signed the Updates page reports install mode `manual-dmg`:
+
+- "Download" fetches `omnirush-mac-arm64-<version>.dmg` from the same feed directory and verifies the `sha512` listed in `latest-mac.yml`.
+- "Open installer" opens the verified DMG, shows "Installer opened. Drag omnirush.ai to Applications, replace the old copy, then reopen it." and quits the app after a short delay.
+
+Once releases are signed with a Developer ID (and notarized), the same code path detects the signature and uses the normal Squirrel in-place install and restart. Windows and Linux installs are in place regardless of signing.
+
+## Publishing a release
+
+Releases are built by the **Desktop Release** workflow (`.github/workflows/release-desktop.yml`) from a semantic-version tag:
+
+```bash
+git tag -a v1.0.5 -m "OmniRush.ai v1.0.5"
+git push origin v1.0.5
+```
+
+The workflow creates a draft release, stamps the version into the package manifests, builds each platform, verifies and uploads the installers and update manifests, generates `SHA256SUMS.txt`, and publishes the release as the latest one. Installed apps pick it up on their next check. See `docs/RELEASING.md` for rebuilding an existing tag and local packaging.
diff --git a/packages/ui/src/react/roadmap.tsx b/packages/ui/src/react/roadmap.tsx
index 3c976f5c..d89bdfe6 100644
--- a/packages/ui/src/react/roadmap.tsx
+++ b/packages/ui/src/react/roadmap.tsx
@@ -367,8 +367,8 @@ function RoadmapSectionBlock({ section }: { section: RoadmapSection }) {
}
export function OmniRushRoadmap({
- feedbackHref = "https://omnirushlabs.com/feedback?source=roadmap",
- docsHref = "https://omnirushlabs.com/docs",
+ feedbackHref = "https://github.com/omnirush-ai/omnirush-gui/issues/new?source=roadmap",
+ docsHref = "https://github.com/omnirush-ai/omnirush-gui#readme",
}: {
feedbackHref?: string
docsHref?: string