evOo-local/infra/updater/src/compose-images.test.ts
cynarAI a55ed44394
One product: evOo updates and name, phone actions, German on mobile, working account deletion, consistent settings (#168)
* Pull updates from evOo instead of the upstream Rakazo repository

The in-app server updater, the image-based compose files and the desktop
auto-updater still pointed at elie222/rakazo, so updating an evOo install
would have pulled Rakazo. They now follow cynarAI/evOo-local, where the
publish workflow already pushes the images. The disabled Rakazo production
deploy job is gone from CI; evo deploys itself.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tgvrj34NMnaqvtgvruYQZZ

* Call the product evOo everywhere people see its name

The desktop setup window and menu, account emails, the iOS app name and
permission prompts, sign-in headings, messages bots post into connected chat
apps, the web fetch user agent, issue templates and the marketing site still
said Rakazo, or EvOo. They now say evOo. The marketing site no longer calls
evOo an alternative to itself.

Internal identifiers (package scopes, env vars, bundle ids, the desktop
productName that keys its data folder and keychain entry) stay as they are.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tgvrj34NMnaqvtgvruYQZZ

* Open conversation actions by holding a row on a phone

Pin, move to folder, mark unread, duplicate, archive and delete only opened
on right-click, which iOS Safari never fires. Holding a conversation or a
folder header now dispatches the same contextmenu event, so the existing menu
opens under the finger; Android's own long-press event is not doubled and the
lift does not also open the conversation.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tgvrj34NMnaqvtgvruYQZZ

* Give small chrome icons a 44px touch area on phones

The browser and computer toggles, the activity bell, the create button and the
section plus buttons were 18 to 36 px targets. On touch screens each now gets
an invisible 44px hit area without changing how it looks; the create button
uses the same plus icon as the rest of the sidebar instead of a text glyph,
and the computer toggle gets an accessible name.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tgvrj34NMnaqvtgvruYQZZ

* Add German to the mobile app

German speakers saw the phone app in English because the mobile UI only
knew English, Simplified Chinese, and Russian. The app now ships a German
catalog covering every mobile chrome string, follows a German device
language (de, de-DE, de-AT, de-CH, ...), and offers Deutsch in the Account
language picker.

Strings that also exist in the web German catalog reuse its wording so
web and phone say the same thing; the rest follow the same terms and the
informal "du".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tgvrj34NMnaqvtgvruYQZZ

* Use the evOo sign-in strings in the German phone catalog

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tgvrj34NMnaqvtgvruYQZZ

* Make account deletion work and give settings one section style

Deleting an account posted to the auth endpoint without a JSON content
type, so the server refused it and the button did nothing. The privacy
page now deletes through the auth client and returns to sign-in. It also
drops the claims it could not verify, the export button that only showed
an alert, and its own padding, and shows where the data and the computer
live. Notifications and media settings use the same SettingsSection.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tgvrj34NMnaqvtgvruYQZZ

* Use status tokens, the shared switch and one German glossary

Voice stage dots, the onboarding progress bar and the Voice First button
used raw emerald, violet, cyan and rose; they now use foreground, success
and destructive like the rest of the app. The routine editor's hand-built
switch is the shared Switch. German says Unterhaltung for threads and
Space consistently on web and phone.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tgvrj34NMnaqvtgvruYQZZ

* Expect the evOo setup copy in the desktop e2e specs

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tgvrj34NMnaqvtgvruYQZZ

* Translate the voice preview label in the German phone catalog

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tgvrj34NMnaqvtgvruYQZZ

* Wait for the main thread URL without waiting for every resource

openMainBotThread already navigated with domcontentloaded; its URL check
then waited for the full load event, which can exceed 20 s on a busy
runner. The composer check that follows covers readiness.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tgvrj34NMnaqvtgvruYQZZ

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-06 00:38:31 +02:00

186 lines
7.4 KiB
TypeScript

import { readFileSync } from "node:fs";
import path from "node:path";
import { describe, expect, it } from "vitest";
import { parse } from "yaml";
interface ComposeService {
image?: string;
build?: unknown;
command?: unknown;
env_file?: unknown;
/** YAML may parse unquoted scalars as null/number/boolean. */
environment?: Record<string, unknown>;
volumes?: string[];
ports?: unknown[];
user?: string;
restart?: string;
network_mode?: string;
networks?: string[];
}
const repoRoot = path.resolve(import.meta.dirname, "../../..");
const composeFile = path.resolve(repoRoot, "infra/compose/docker-compose.images.yml");
const publishWorkflowFile = path.resolve(repoRoot, ".github/workflows/publish-server-image.yml");
const compose = parse(readFileSync(composeFile, "utf8")) as {
services: Record<string, ComposeService>;
};
const publishWorkflow = parse(readFileSync(publishWorkflowFile, "utf8")) as {
jobs?: {
publish?: {
strategy?: {
matrix?: {
include?: Array<{ name?: string }>;
};
};
};
};
};
const appServices = ["api", "worker", "web", "supervisor"] as const;
const FIRST_PARTY_IMAGE = /ghcr\.io\/cynarai\/evoo-local\/([a-z0-9][a-z0-9._-]*)/g;
function firstPartyImageNames(value: unknown): string[] {
if (typeof value !== "string") return [];
return [...value.matchAll(FIRST_PARTY_IMAGE)].map((match) => match[1] ?? "");
}
/**
* The images compose file is the no-checkout happy path. It must stay pull-only and self-contained
* so operators can drop it next to a .env outside any git worktree. Local Docker computers run via
* an in-stack supervisor (app image + docker.sock) that stays unpublished on the host.
*/
describe("the images compose file", () => {
it("runs postgres, app roles, supervisor, and a published computer image", () => {
expect(Object.keys(compose.services).sort()).toEqual([
"api",
"computer",
"data-init",
"postgres",
"supervisor",
"web",
"worker",
]);
for (const service of appServices) {
expect(compose.services[service]?.image).toContain("ghcr.io/cynarai/evoo-local/app");
expect(compose.services[service]?.image).toContain("RAKAZO_IMAGE_TAG");
}
expect(compose.services.computer?.image).toContain("ghcr.io/cynarai/evoo-local/computer");
expect(compose.services.computer?.image).toContain("RAKAZO_COMPUTER_IMAGE_TAG");
expect(compose.services.postgres?.image).toMatch(
/^\$\{POSTGRES_IMAGE:-postgres:16@sha256:[0-9a-f]{64}\}$/,
);
expect(compose.services["data-init"]?.image).toMatch(/^\$\{BUSYBOX_IMAGE:-busybox:1\}$/);
});
it("skips non-string Compose environment scalars when collecting image names", () => {
expect(firstPartyImageNames(null)).toEqual([]);
expect(firstPartyImageNames(true)).toEqual([]);
expect(firstPartyImageNames(7091)).toEqual([]);
expect(firstPartyImageNames("ghcr.io/cynarai/evoo-local/computer:edge")).toEqual(["computer"]);
});
it("only references first-party images that the publish matrix publishes", () => {
const published = new Set(
(publishWorkflow.jobs?.publish?.strategy?.matrix?.include ?? [])
.map((entry) => entry.name)
.filter((name): name is string => typeof name === "string" && name.length > 0),
);
const referenced = new Set<string>();
for (const service of Object.values(compose.services)) {
for (const name of firstPartyImageNames(service.image)) {
referenced.add(name);
}
for (const value of Object.values(service.environment ?? {})) {
for (const name of firstPartyImageNames(value)) {
referenced.add(name);
}
}
}
expect(published.size).toBeGreaterThan(0);
expect(referenced.has("computer")).toBe(true);
for (const name of referenced) {
expect(
published.has(name),
`${name} referenced by images compose but omitted from publish matrix`,
).toBe(true);
}
});
it("passes optional HTTP(S)_PROXY / NO_PROXY into api and worker", () => {
for (const name of ["api", "worker"] as const) {
const env = compose.services[name]?.environment ?? {};
expect(env.HTTP_PROXY).toBe("${HTTP_PROXY:-${http_proxy:-}}");
expect(env.HTTPS_PROXY).toBe("${HTTPS_PROXY:-${https_proxy:-}}");
expect(env.NO_PROXY).toBe("${NO_PROXY:-${no_proxy:-}}");
expect(env.http_proxy).toBe("${http_proxy:-${HTTP_PROXY:-}}");
expect(env.https_proxy).toBe("${https_proxy:-${HTTPS_PROXY:-}}");
expect(env.no_proxy).toBe("${no_proxy:-${NO_PROXY:-}}");
}
});
it("does not allocate a default network for offline init services", () => {
for (const name of ["computer", "data-init"]) {
expect(compose.services[name]?.network_mode).toBe("none");
expect(compose.services[name]?.networks).toBeUndefined();
}
for (const name of ["postgres", ...appServices]) {
expect(compose.services[name]?.networks?.length).toBeGreaterThan(0);
}
});
it("never builds from a checkout", () => {
for (const service of Object.values(compose.services)) {
expect(service.build).toBeUndefined();
}
});
it("loads secrets from a colocated .env", () => {
expect(compose.services.api?.env_file).toEqual([".env"]);
expect(compose.services.worker?.env_file).toEqual([".env"]);
});
it("defaults API and worker to Docker computers via the supervisor", () => {
expect(compose.services.api?.environment?.SANDBOX_PROVIDER).toContain("docker");
expect(compose.services.worker?.environment?.SANDBOX_PROVIDER).toContain("docker");
expect(compose.services.api?.environment?.SANDBOX_SUPERVISOR_URL).toBe(
"http://supervisor:7091",
);
expect(compose.services.worker?.environment?.SANDBOX_SUPERVISOR_URL).toBe(
"http://supervisor:7091",
);
});
it("keeps the Docker socket on the unpublished supervisor only", () => {
for (const [name, service] of Object.entries(compose.services)) {
const hasSocket = (service.volumes ?? []).some((volume) => volume.includes("docker.sock"));
if (name === "supervisor") {
expect(hasSocket).toBe(true);
expect(service.ports).toBeUndefined();
expect(service.user).toBe("root");
expect(String(service.command)).toContain("sandbox-supervisor");
} else {
expect(hasSocket).toBe(false);
}
}
});
it("publishes the web UI on loopback only", () => {
expect(compose.services.web?.ports).toEqual(["127.0.0.1:${RAKAZO_WEB_PORT:-5173}:5173"]);
expect(compose.services.api?.ports).toEqual(["127.0.0.1:${RAKAZO_API_PORT:-3100}:3100"]);
for (const key of ["BETTER_AUTH_URL", "WEB_ORIGIN", "API_URL"]) {
expect(compose.services.api?.environment?.[key]).toBe(`\${${key}:-http://127.0.0.1:5173}`);
}
expect(compose.services.postgres?.ports).toBeUndefined();
expect(compose.services.supervisor?.ports).toBeUndefined();
});
it("passes logging variables to the supervisor without putting them on computer containers", () => {
// biome-ignore lint/suspicious/noTemplateCurlyInString: this is the literal Compose expression
expect(compose.services.supervisor?.environment?.AXIOM_TOKEN).toBe("${AXIOM_TOKEN:-}");
// biome-ignore lint/suspicious/noTemplateCurlyInString: this is the literal Compose expression
expect(compose.services.supervisor?.environment?.AXIOM_DATASET).toBe("${AXIOM_DATASET:-}");
expect(compose.services.computer?.environment?.AXIOM_TOKEN).toBeUndefined();
expect(compose.services.computer?.environment?.LOG_LEVEL).toBeUndefined();
});
});