* 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>
119 lines
4.7 KiB
TypeScript
119 lines
4.7 KiB
TypeScript
import { ACTIVE_RUN_STATUSES, OO_DEFAULT_COLOR } from "@rakazo/core";
|
|
import { renderToString } from "react-dom/server";
|
|
import { describe, expect, it } from "vitest";
|
|
import { BotAvatar, OoShapePreview, ooMomentForPose, parseBotAvatar } from "./bot-avatar.js";
|
|
|
|
describe("BotAvatar", () => {
|
|
it("renders distinct shape gradient IDs for concurrent working avatars", () => {
|
|
const html = renderToString(
|
|
<div>
|
|
<BotAvatar color="#8B5CF6" status="running" />
|
|
<BotAvatar color="#10B981" status="running" />
|
|
</div>,
|
|
);
|
|
|
|
const bodyGradIds = [...html.matchAll(/id="(oo[^"]+-body)"/g)].map((m) => m[1]);
|
|
expect(bodyGradIds).toHaveLength(2);
|
|
expect(new Set(bodyGradIds).size).toBe(2);
|
|
for (const id of bodyGradIds) {
|
|
expect(html).toContain(`url(#${id})`);
|
|
}
|
|
});
|
|
|
|
it.each([...ACTIVE_RUN_STATUSES])("marks active run status %s as working", (status) => {
|
|
const html = renderToString(<BotAvatar color="#3B82F6" status={status} />);
|
|
expect(html).toContain("<svg");
|
|
expect(html).toContain('data-working="true"');
|
|
});
|
|
|
|
it("keeps working attribute false when idle", () => {
|
|
const html = renderToString(<BotAvatar color="#F59E0B" status="idle" />);
|
|
expect(html).toContain('data-working="false"');
|
|
});
|
|
|
|
it("draws the Oo eyes for plain color values", () => {
|
|
const html = renderToString(
|
|
<BotAvatar color="#D9508A" identity="maya" size={28} status="running" />,
|
|
);
|
|
expect(html).toContain("<svg");
|
|
expect(html).toContain("<path");
|
|
expect(html).toContain('data-part="eye-big"');
|
|
expect(html).toContain('data-part="eye-small"');
|
|
expect(html).toContain('data-oo-moment="working"');
|
|
expect(html).toContain('data-working="true"');
|
|
});
|
|
|
|
it("draws the stored look", () => {
|
|
const html = renderToString(
|
|
<BotAvatar color="oo1:c=FF781C;sp=cat;ew=round;hd=chef" size={72} />,
|
|
);
|
|
expect(html).toContain('data-oo-species="cat"');
|
|
expect(html).toContain('data-part="ear-left"');
|
|
expect(html).toContain("#FFFFFF");
|
|
});
|
|
|
|
it("keeps small avatars free of arms and props", () => {
|
|
const small = renderToString(<BotAvatar color="#8B5CF6" status="running" size={24} />);
|
|
const large = renderToString(<BotAvatar color="#8B5CF6" status="running" size={72} />);
|
|
expect(small).not.toContain('data-part="arm-left"');
|
|
expect(large).toContain('data-part="arm-left"');
|
|
});
|
|
|
|
it("maps mascot poses to moments", () => {
|
|
expect(ooMomentForPose("delighted")).toBe("success");
|
|
expect(ooMomentForPose("typing")).toBe("working");
|
|
expect(ooMomentForPose("error")).toBe("concerned");
|
|
expect(ooMomentForPose("listening")).toBe("listening");
|
|
const html = renderToString(<BotAvatar color="#8B5CF6" pose="thinking" size={72} />);
|
|
expect(html).toContain('data-oo-moment="thinking"');
|
|
});
|
|
|
|
it("renders distinct shapes for distinct bot identities", () => {
|
|
const maya = renderToString(<BotAvatar color="#D9508A" identity="maya" />);
|
|
const github = renderToString(<BotAvatar color="#D9508A" identity="github" />);
|
|
expect(maya).not.toEqual(github);
|
|
});
|
|
|
|
it("parses shape indexes from encoded color values", () => {
|
|
const parsed = parseBotAvatar(`${OO_DEFAULT_COLOR}::shape_3`);
|
|
expect(parsed.color).toBe(OO_DEFAULT_COLOR);
|
|
expect(parsed.shapeIndex).toBe(3);
|
|
expect(parsed.isImage).toBe(false);
|
|
});
|
|
|
|
it("normalizes malformed shape suffixes to shape 0", () => {
|
|
expect(parseBotAvatar(`${OO_DEFAULT_COLOR}::shape_-1`).shapeIndex).toBe(0);
|
|
expect(parseBotAvatar(`${OO_DEFAULT_COLOR}::shape_3junk`).shapeIndex).toBe(0);
|
|
expect(parseBotAvatar(`${OO_DEFAULT_COLOR}::shape_`).shapeIndex).toBe(0);
|
|
});
|
|
|
|
it("renders uploaded images without the geometric svg", () => {
|
|
const html = renderToString(
|
|
<BotAvatar color="data:image/png;base64,abc" identity="maya" size={32} />,
|
|
);
|
|
expect(html).toContain("<img");
|
|
expect(html).not.toContain("<path");
|
|
expect(html).not.toContain("data-part");
|
|
});
|
|
|
|
it("does not treat arbitrary http(s) color values as remote images", () => {
|
|
const parsed = parseBotAvatar("https://evil.example/track.png");
|
|
expect(parsed.isImage).toBe(false);
|
|
expect(parsed.imageUrl).toBeUndefined();
|
|
const html = renderToString(
|
|
<BotAvatar color="https://evil.example/track.png" identity="maya" size={32} />,
|
|
);
|
|
expect(html).not.toContain("<img");
|
|
expect(html).not.toContain("evil.example");
|
|
});
|
|
|
|
it("exposes shape picker name and pressed state", () => {
|
|
const html = renderToString(
|
|
<OoShapePreview shapeIndex={0} color="#8B5CF6" selected onClick={() => undefined} />,
|
|
);
|
|
expect(html).toContain('aria-label="evOo"');
|
|
expect(html).toContain('aria-pressed="true"');
|
|
expect(html).toContain("focus-visible:ring-2");
|
|
});
|
|
});
|