Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Boat's $50 credit offer: a one-time card for everyone, and a lasting copy on the Boat card in Settings

milind-soni72905754ae12
diff --git a/apps/docs/content/docs/security/analytics.mdx b/apps/docs/content/docs/security/analytics.mdx
index 97fce084f1..fc9c0a9832 100644
--- a/apps/docs/content/docs/security/analytics.mdx
+++ b/apps/docs/content/docs/security/analytics.mdx
@@ -172,6 +172,7 @@ use their own Boat key, and how many bots run on cloud computers, without sendin
| `cloud_welcome_step` | A step of a new Cloud's welcome is shown | `step`: `bring`, `engine`, `files`, `done` |
| `cloud_welcome_ended` | A new Cloud's welcome ends | `reason`: `done`, `skipped`; `at`: the step it ended on |
| `product_hunt_card` | You act on the Product Hunt card | `action`: `upvote`, `not_now`, `close` |
+| `boat_offer` | Boat's credit offer: its one-time card is shown or you act on it, or you act on it on the Boat card in Settings → API keys | `action`: `shown` (the card only), `get_boat`, `claim` (the drafted email to Boat opened), `not_now`, `close`; `place`: `card`, `settings` |
| `simple_mode_prompt` | The Simple mode popup, shown once in each browser after an update when nothing else is on screen, is shown, its Simple mode switch is flipped, or it is closed (Done, the X, Escape or a click outside) | `action`: `shown`, `toggled`, `closed`; `mode`: `simple`, `advanced`, the mode it was shown or closed in, or the one a flip turned on |
`api_key_saved` reports `ok` for a key the server checks with its provider before saving it (Boat, Composio,
diff --git a/docs/analytics.md b/docs/analytics.md
index 2df6842662..2d9c2b1d9b 100644
--- a/docs/analytics.md
+++ b/docs/analytics.md
@@ -168,6 +168,7 @@ use their own Boat key, and how many bots run on cloud computers, without sendin
| `cloud_welcome_step` | A step of a new Cloud's welcome is shown | `step`: `bring`, `engine`, `files`, `done` |
| `cloud_welcome_ended` | A new Cloud's welcome ends | `reason`: `done`, `skipped`; `at`: the step it ended on |
| `product_hunt_card` | You act on the Product Hunt card | `action`: `upvote`, `not_now`, `close` |
+| `boat_offer` | Boat's credit offer: its one-time card is shown or you act on it, or you act on it on the Boat card in Settings → API keys | `action`: `shown` (the card only), `get_boat`, `claim` (the drafted email to Boat opened), `not_now`, `close`; `place`: `card`, `settings` |
| `simple_mode_prompt` | The Simple mode popup, shown once in each browser after an update when nothing else is on screen, is shown, its Simple mode switch is flipped, or it is closed (Done, the X, Escape or a click outside) | `action`: `shown`, `toggled`, `closed`; `mode`: `simple`, `advanced`, the mode it was shown or closed in, or the one a flip turned on |
`api_key_saved` reports `ok` for a key the server checks with its provider before saving it (Boat, Composio,
diff --git a/docs/verification/evidence/boat-offer/popup-advanced-dark.jpg b/docs/verification/evidence/boat-offer/popup-advanced-dark.jpg
new file mode 100644
index 0000000000..a0207a7a74
Binary files /dev/null and b/docs/verification/evidence/boat-offer/popup-advanced-dark.jpg differ
diff --git a/docs/verification/evidence/boat-offer/popup-advanced-light.jpg b/docs/verification/evidence/boat-offer/popup-advanced-light.jpg
new file mode 100644
index 0000000000..ccb8afe778
Binary files /dev/null and b/docs/verification/evidence/boat-offer/popup-advanced-light.jpg differ
diff --git a/docs/verification/evidence/boat-offer/popup-german-simple-light.jpg b/docs/verification/evidence/boat-offer/popup-german-simple-light.jpg
new file mode 100644
index 0000000000..7c485a3009
Binary files /dev/null and b/docs/verification/evidence/boat-offer/popup-german-simple-light.jpg differ
diff --git a/docs/verification/evidence/boat-offer/popup-phone-advanced-light.jpg b/docs/verification/evidence/boat-offer/popup-phone-advanced-light.jpg
new file mode 100644
index 0000000000..c111fc5563
Binary files /dev/null and b/docs/verification/evidence/boat-offer/popup-phone-advanced-light.jpg differ
diff --git a/docs/verification/evidence/boat-offer/popup-phone-simple-dark.jpg b/docs/verification/evidence/boat-offer/popup-phone-simple-dark.jpg
new file mode 100644
index 0000000000..c11c9b11d4
Binary files /dev/null and b/docs/verification/evidence/boat-offer/popup-phone-simple-dark.jpg differ
diff --git a/docs/verification/evidence/boat-offer/popup-simple-dark.jpg b/docs/verification/evidence/boat-offer/popup-simple-dark.jpg
new file mode 100644
index 0000000000..04f663b73f
Binary files /dev/null and b/docs/verification/evidence/boat-offer/popup-simple-dark.jpg differ
diff --git a/docs/verification/evidence/boat-offer/popup-simple-light.jpg b/docs/verification/evidence/boat-offer/popup-simple-light.jpg
new file mode 100644
index 0000000000..50234925f7
Binary files /dev/null and b/docs/verification/evidence/boat-offer/popup-simple-light.jpg differ
diff --git a/docs/verification/evidence/boat-offer/settings-advanced-dark.jpg b/docs/verification/evidence/boat-offer/settings-advanced-dark.jpg
new file mode 100644
index 0000000000..0461ddb75b
Binary files /dev/null and b/docs/verification/evidence/boat-offer/settings-advanced-dark.jpg differ
diff --git a/docs/verification/evidence/boat-offer/settings-advanced-light.jpg b/docs/verification/evidence/boat-offer/settings-advanced-light.jpg
new file mode 100644
index 0000000000..c31eb04455
Binary files /dev/null and b/docs/verification/evidence/boat-offer/settings-advanced-light.jpg differ
diff --git a/docs/verification/evidence/boat-offer/settings-phone-simple-light.jpg b/docs/verification/evidence/boat-offer/settings-phone-simple-light.jpg
new file mode 100644
index 0000000000..d2870659f5
Binary files /dev/null and b/docs/verification/evidence/boat-offer/settings-phone-simple-light.jpg differ
diff --git a/docs/verification/evidence/boat-offer/settings-simple-dark.jpg b/docs/verification/evidence/boat-offer/settings-simple-dark.jpg
new file mode 100644
index 0000000000..7e0318377b
Binary files /dev/null and b/docs/verification/evidence/boat-offer/settings-simple-dark.jpg differ
diff --git a/docs/verification/evidence/boat-offer/settings-simple-light.jpg b/docs/verification/evidence/boat-offer/settings-simple-light.jpg
new file mode 100644
index 0000000000..27616bd489
Binary files /dev/null and b/docs/verification/evidence/boat-offer/settings-simple-light.jpg differ
diff --git a/electron/app-permissions.mjs b/electron/app-permissions.mjs
index 6745417450..85ea0e30c5 100644
--- a/electron/app-permissions.mjs
+++ b/electron/app-permissions.mjs
@@ -123,7 +123,11 @@ export function appPermissionHandlers({ rendererOrigin, mainContents, cloudHomeO
};
}
-// Both explicit IPC links and window.open must use the same web-only policy.
+// Both explicit IPC links and window.open use this one policy: a web link, or an email draft the person sends themselves.
+export function externalLinkUrl(rawUrl) {
+ return typeof rawUrl === "string" && /^\s*mailto:/i.test(rawUrl) ? emailDraftUrl(rawUrl) : externalWebUrl(rawUrl);
+}
+
export function externalWebUrl(rawUrl) {
if (typeof rawUrl !== "string") throw new Error("A web address is required");
let url;
@@ -136,3 +140,23 @@ export function externalWebUrl(rawUrl) {
if (url.username || url.password) throw new Error("Web links must not include user credentials");
return url.toString();
}
+
+const EMAIL_DRAFT_FIELDS = new Set(["subject", "body"]);
+
+/** Security: one address, and only a subject and a body, so a link can add no recipient and attach no file (some mail
+ * clients honour an `attach` field). */
+export function emailDraftUrl(rawUrl) {
+ let url, address;
+ try {
+ url = new URL(rawUrl);
+ address = decodeURIComponent(url.pathname);
+ } catch {
+ throw new Error("That email link is invalid");
+ }
+ if (url.protocol !== "mailto:") throw new Error("Only email links can be drafted");
+ if (!/^[^\s@,;]+@[^\s@,;]+$/.test(address)) throw new Error("An email link names one address");
+ if ([...url.searchParams.keys()].some(field => !EMAIL_DRAFT_FIELDS.has(field.toLowerCase()))) {
+ throw new Error("An email link carries only a subject and a body");
+ }
+ return url.toString();
+}
diff --git a/electron/app-permissions.node-test.mjs b/electron/app-permissions.node-test.mjs
index 6804862c4a..d9a1f7eb8d 100644
--- a/electron/app-permissions.node-test.mjs
+++ b/electron/app-permissions.node-test.mjs
@@ -2,7 +2,8 @@ import assert from "node:assert/strict";
import test from "node:test";
import { readFileSync } from "node:fs";
-import { appPermissionAllowed, appPermissionHandlers, externalWebUrl, remoteClipboardWriteAllowed } from "./app-permissions.mjs";
+import { appPermissionAllowed, appPermissionHandlers, emailDraftUrl, externalLinkUrl, externalWebUrl, remoteClipboardWriteAllowed } from "./app-permissions.mjs";
+import { boatClaimMailto } from "../src/lib/boat-offer.ts";
import { cloudPlanSnapshot, createCloudAccountClient } from "./cloud-account.mjs";
import { myCloudOrigin, rememberedCloudHome } from "./cloud-home.mjs";
@@ -76,11 +77,35 @@ test("web links reject embedded credentials and non-web schemes", () => {
assert.throws(() => externalWebUrl(url), /web address/);
});
+test("an email link opens only as a draft to one address with a subject and a body", () => {
+ const draft = "mailto:[email protected]?subject=Hello%20there&body=Line%20one%0D%0ALine%20two";
+ assert.equal(emailDraftUrl(draft), draft);
+ assert.equal(externalLinkUrl(draft), draft);
+ assert.equal(externalLinkUrl("MAILTO:[email protected]?Subject=Hi"), "mailto:[email protected]?Subject=Hi");
+ assert.equal(externalLinkUrl("https://example.com/help"), "https://example.com/help");
+ for (const url of ["mailto:[email protected],[email protected]", "mailto:a%[email protected]", "mailto:[email protected]", "mailto:", "mailto:nobody"])
+ assert.throws(() => externalLinkUrl(url), /one address/, url);
+ for (const url of ["mailto:[email protected]?attach=/etc/passwd", "mailto:[email protected]?subject=Hi&[email protected]", "mailto:[email protected][email protected]",
+ "mailto:[email protected][email protected]", "mailto:[email protected]?Attachment=~/.ssh/id_rsa"])
+ assert.throws(() => externalLinkUrl(url), /only a subject and a body/, url);
+ assert.throws(() => emailDraftUrl("mailto:a%E0%A4%[email protected]"), /invalid/);
+ assert.throws(() => emailDraftUrl("https://example.com"), /Only email links/);
+ for (const url of ["file:///tmp/test", "javascript:alert(1)", "data:text/html,test", "tel:+15555550100", "sms:+15555550100"])
+ assert.throws(() => externalLinkUrl(url), /Only web/, url);
+ for (const url of [null, 123, "not a url"])
+ assert.throws(() => externalLinkUrl(url), /web address/);
+});
+
+test("the app's claim to Boat opens exactly as the app drafts it", () => {
+ assert.equal(externalLinkUrl(boatClaimMailto()), boatClaimMailto());
+});
+
test("both external-link entry points use the policy and IPC retains the local-origin gate", () => {
const main = readFileSync(new URL("./main.mjs", import.meta.url), "utf8");
assert.match(main, /ipcMain\.handle\("desktop:open-external", localOnly\("desktop:open-external"/);
- assert.match(main, /shell\.openExternal\(externalWebUrl\(rawUrl\)\)/);
- assert.match(main, /shell\.openExternal\(externalWebUrl\(url\)\)/);
+ assert.match(main, /shell\.openExternal\(externalLinkUrl\(rawUrl\)\)/);
+ assert.match(main, /shell\.openExternal\(externalLinkUrl\(url\)\)/);
+ assert.doesNotMatch(main, /shell\.openExternal\(externalWebUrl\(/);
});
test("fails closed on unparsable or opaque origins", () => {
diff --git a/electron/desktop-prefs.mjs b/electron/desktop-prefs.mjs
index 98f55553e7..3546403942 100644
--- a/electron/desktop-prefs.mjs
+++ b/electron/desktop-prefs.mjs
@@ -11,7 +11,7 @@ import { accountFullName } from "./system-name.mjs";
export { DESKTOP_PORTS } from "./desktop-ports.mjs";
/** The only notices a page may record, so no page can write anything else into the file. */
-export const DESKTOP_NOTICES = Object.freeze(["cloud-pro-update-2026-10"]);
+export const DESKTOP_NOTICES = Object.freeze(["cloud-pro-update-2026-10", "boat-credit-2026-11"]);
const CLOUD_PRO = DESKTOP_NOTICES[0];
const DAY = /^\d{4}-\d{2}-\d{2}$/;
/** A locale code such as "de" or "pt-br", or "" for following the system. */
diff --git a/electron/desktop-prefs.node-test.mjs b/electron/desktop-prefs.node-test.mjs
index b19f2cf38b..9603874b9e 100644
--- a/electron/desktop-prefs.node-test.mjs
+++ b/electron/desktop-prefs.node-test.mjs
@@ -13,12 +13,12 @@ const require = createRequire(import.meta.url);
const environments = require("./environments.cjs");
const localOrigin = require("./local-origin.cjs");
-const POPUP = "cloud-pro-update-2026-10";
+const POPUP = "cloud-pro-update-2026-10", BOAT = "boat-credit-2026-11";
const HOUR = 3600_000, NOON = new Date(2026, 9, 16, 12).getTime();
const LOCAL = "http://127.0.0.1:18799", CLOUD = "https://omb-u-1.fly.dev", VPS = "https://bots.example.test";
-test("the popup is the one notice a page can record; seen and analytics survive a restart; a broken record never stops the app", () => {
- assert.deepEqual([...DESKTOP_NOTICES], [POPUP]);
+test("the popup and Boat's credit offer are the notices a page can record; seen and analytics survive a restart; a broken record never stops the app", () => {
+ assert.deepEqual([...DESKTOP_NOTICES], [POPUP, BOAT]);
let saved = null;
const writes = [];
const prefs = createDesktopPrefs({ read: () => saved, write: value => { writes.push(value); saved = structuredClone(value); }, now: () => NOON });
@@ -27,9 +27,11 @@ test("the popup is the one notice a page can record; seen and analytics survive
assert.equal(writes.length, 0, "nothing a page names outside the list is written");
prefs.markSeen(POPUP); prefs.markSeen(POPUP);
assert.deepEqual(prefs.seen(), [POPUP]); assert.equal(writes.length, 1);
+ prefs.markSeen(BOAT);
+ assert.deepEqual(prefs.seen(), [POPUP, BOAT]); assert.equal(writes.length, 2);
prefs.setAnalytics(false);
const restarted = createDesktopPrefs({ read: () => saved, write: value => { saved = value; }, now: () => NOON });
- assert.deepEqual(restarted.seen(), [POPUP]); assert.equal(restarted.analytics(), false);
+ assert.deepEqual(restarted.seen(), [POPUP, BOAT]); assert.equal(restarted.analytics(), false);
restarted.setAnalytics("yes"); assert.equal(restarted.analytics(), false, "only true turns it on");
restarted.setAnalytics(true); assert.equal(restarted.analytics(), true);
diff --git a/electron/main.mjs b/electron/main.mjs
index 7f738a69b0..5b5ef429cf 100644
--- a/electron/main.mjs
+++ b/electron/main.mjs
@@ -43,7 +43,7 @@ let startupScreen = null;
let desktopTray = null;
import { collisionFreeDownloadPath, defaultSaveName, openLogsFolder, revealDownloadWhenDone, revealInFolder, withSavableFile } from "./save-file.mjs";
import { desktopViewerPermissionAllowed } from "./desktop-viewer-permissions.mjs";
-import { appPermissionHandlers, externalWebUrl } from "./app-permissions.mjs";
+import { appPermissionHandlers, externalLinkUrl } from "./app-permissions.mjs";
import { appFrameNavigationAllowed } from "./app-frame-guard.mjs";
import { writeClipboardText } from "./clipboard-write.mjs";
import {
@@ -2075,7 +2075,7 @@ function createWindow({ deferNavigation = false } = {}) {
win.webContents.setWindowOpenHandler(({ url }) => {
try {
- void shell.openExternal(externalWebUrl(url)).catch(() => {
+ void shell.openExternal(externalLinkUrl(url)).catch(() => {
console.warn("The external web link could not be opened");
});
} catch {
@@ -2372,7 +2372,7 @@ ipcMain.handle("window:state", (event) => {
// Links resolved after Chromium's click gesture ended would be blocked as popups via window.open.
ipcMain.handle("desktop:open-external", localOnly("desktop:open-external", async (_event, rawUrl) => {
- await shell.openExternal(externalWebUrl(rawUrl));
+ await shell.openExternal(externalLinkUrl(rawUrl));
return true;
}));
diff --git a/src/components/AppNotices.test.ts b/src/components/AppNotices.test.ts
index c6a8bb6f0c..838da11134 100644
--- a/src/components/AppNotices.test.ts
+++ b/src/components/AppNotices.test.ts
@@ -33,7 +33,8 @@ vi.mock("@/lib/brand", () => ({ brandStatus: () => ({ brand: { name: "OpenMausBo
vi.mock("@/components/EngineLibrary", () => ({ engineReady: (instance: { snapshot: { state: string; authenticated?: boolean } }) =>
instance.snapshot.state === "available" && instance.snapshot.authenticated !== false }));
import { AppNotices } from "./AppNotices";
-import { CLOUD_PRO_UPDATE_NOTICE, PRODUCT_HUNT_NOTICE, PRODUCT_HUNT_UNTIL, PRODUCT_HUNT_URL, CLOUD_INTRO, localDay, STAR_NOTICE } from "@/lib/notices";
+import { BOAT_OFFER_NOTICE, CLOUD_PRO_UPDATE_NOTICE, PRODUCT_HUNT_NOTICE, PRODUCT_HUNT_UNTIL, PRODUCT_HUNT_URL, CLOUD_INTRO, localDay, STAR_NOTICE } from "@/lib/notices";
+import { BOAT_OFFER, boatClaimMailto } from "@/lib/boat-offer";
import { identifyEmail, track } from "@/lib/analytics";
import { ADVANCED_MODE_KEY, setAdvancedMode } from "@/lib/interface-mode";
import { SIMPLE_MODE_PROMPT_KEY } from "@/lib/simple-mode-prompt";
@@ -127,7 +128,7 @@ const press = (label: string) => {
const FIRST_REPLY = [{ tasks: [{ threadId: "first", usage: { turns: 1 } }] }];
let session: Map<string, string>;
const returning = () => { f.state.bots = [{ tasks: [{ threadId: "t", createdAt: 1, usage: { turns: 2 } }] }]; };
-const launchCardsSeen = () => { desk.saved = { seen: [CLOUD_PRO_UPDATE_NOTICE] }; storage.set(PRODUCT_HUNT_NOTICE, "1"); storage.set(SIMPLE_MODE_PROMPT_KEY, "1"); };
+const launchCardsSeen = () => { desk.saved = { seen: [CLOUD_PRO_UPDATE_NOTICE] }; storage.set(PRODUCT_HUNT_NOTICE, "1"); storage.set(SIMPLE_MODE_PROMPT_KEY, "1"); storage.set(BOAT_OFFER_NOTICE, "1"); };
const hints = () => f.state.config.onboarding.hintsSeen as string[];
beforeEach(() => {
@@ -144,7 +145,7 @@ beforeEach(() => {
return f.state.config;
});
vi.stubGlobal("localStorage", { getItem: (key: string) => storage.get(key) ?? null, setItem: (key: string, value: string) => storage.set(key, value) });
- // The Cloud Pro popup and the Product Hunt card come first; the tests before their own are about the cards after them.
+ // The popups, the Product Hunt card and Boat's offer start seen: the tests before their own are about the other cards.
launchCardsSeen();
accountListeners = new Set();
bridges = {
@@ -424,6 +425,163 @@ describe("the Product Hunt launch card", () => {
});
});
+describe("Boat's credit offer", () => {
+ const TITLE = "$50 of Boat credit for you";
+ const BODY = "Boat runs the cloud computers behind MausBot. Buy Boat's $100 plan or bigger, then tell Boat that MausBot sent you, and they'll add $50 in credits to your Boat account.";
+ const YOURSELF = "You claim it yourself: it isn't automatic.";
+ const CLAIM = "I bought it: claim my $50";
+ const html = (text: string) => text.replace(/'/g, "&#x27;");
+ // No Cloud trial to offer, as for every plan but Team: the Cloud's own card after the update steps aside.
+ const fresh = () => { storage.delete(BOAT_OFFER_NOTICE); returning(); offer = { ...PLAIN_OFFER }; };
+ const boatEvents = () => vi.mocked(track).mock.calls.filter(([name]) => name === "boat_offer").map(([, props]) => props);
+ const escape = () => tree().find(node => node.type === "aside")!.props.onKeyDown({ key: "Escape", preventDefault() {}, stopPropagation() {} });
+ const endedForGood = async () => {
+ expect(render()).toBe("");
+ expect(storage.get(BOAT_OFFER_NOTICE)).toBe("1"); expect(hints()).toContain(BOAT_OFFER_NOTICE); expect(desk.saved?.seen).toContain(BOAT_OFFER_NOTICE);
+ expect(await launch()).not.toContain(TITLE);
+ };
+ afterEach(() => { BOAT_OFFER.until = null; });
+
+ it("shows once to someone who used the app before this launch: what Boat gives, that they claim it themselves, Get Boat, the claim and Not now", async () => {
+ fresh(); storage.delete(STAR_NOTICE);
+ const shown = await launch();
+ const words = [TITLE, BODY, YOURSELF, "Get Boat", CLAIM, "Not now"].map(html);
+ for (const text of words) expect(shown).toContain(text);
+ for (let i = 1; i < words.length; i++) expect(shown.indexOf(words[i - 1]!), words[i]).toBeLessThan(shown.indexOf(words[i]!));
+ expect(shown).not.toContain(STAR); expect(shown).not.toContain('aria-modal="true"');
+ expect(await settle()).toContain(html(TITLE));
+ expect(boatEvents()).toEqual([{ action: "shown", place: "card" }]);
+ });
+
+ it("never on a first launch: not before the bots load, on a new install's first chat, in the launch its welcome or MausBot's card took", async () => {
+ fresh(); storage.delete(STAR_NOTICE);
+ f.state.bots = [];
+ expect(await launch(), "nothing said yet").not.toContain(html(TITLE));
+ f.state.bots = structuredClone(FIRST_REPLY);
+ expect(await launch(), "the first reply came in this launch").not.toContain(html(TITLE));
+ returning(); f.state.hydrated = false;
+ expect(await launch(), "until the bots load nothing shows, not even the star after it").toBe("");
+ f.state.hydrated = true; markWelcomeFinished();
+ expect(await launch(), "the launch its welcome finished in").not.toContain(html(TITLE));
+ session.clear(); markLaunchDialog("mausbot");
+ expect(await launch(), "the launch MausBot's first card took").not.toContain(html(TITLE));
+ session.clear();
+ expect(await launch()).toContain(html(TITLE));
+ });
+
+ it("never during onboarding or the tour, nor while a bot or a room is working: it waits for an idle moment, and steps aside for a turn", async () => {
+ fresh();
+ const waits: Array<() => void> = [
+ () => { f.state.welcomeOpen = true; }, () => { f.state.tourOpen = true; }, () => { f.state.config.onboarding.completedAt = undefined; },
+ () => { f.state.bots[0].busy = true; }, () => { f.state.bots[0].tasks[0].busy = true; },
+ () => { f.state.groups = [{ working: true }]; }, () => { f.state.groups = [{ busyBotId: "b" }]; },
+ ];
+ for (const wait of waits) {
+ const saved = structuredClone(f.state); wait();
+ expect(await launch(), wait.toString()).not.toContain(html(TITLE));
+ f.state = saved;
+ }
+ expect(boatEvents()).toEqual([]);
+ expect(await launch()).toContain(html(TITLE));
+ f.state.bots[0].busy = true;
+ expect(await settle(), "a turn starts while it is up").toBe("");
+ f.state.bots[0].busy = false;
+ expect(await settle(), "back once the turn ends, still not dismissed").toContain(html(TITLE));
+ expect(storage.get(BOAT_OFFER_NOTICE)).toBeUndefined();
+ expect(boatEvents()).toEqual([{ action: "shown", place: "card" }]);
+ });
+
+ it("Get Boat opens boat.dev in the browser and ends it for good", async () => {
+ fresh(); await launch();
+ press("Get Boat"); await flush();
+ expect(window.ogb?.openExternal).toHaveBeenCalledWith("https://boat.dev");
+ expect(boatEvents()).toContainEqual({ action: "get_boat", place: "card" });
+ await endedForGood();
+ });
+
+ it("the claim opens an email to Boat's billing address with Boat's subject and body for the person to send, and ends it for good; nothing is sent for them", async () => {
+ fresh(); await launch();
+ vi.mocked(api).mockClear();
+ press(CLAIM); await flush();
+ expect(window.ogb?.openExternal).toHaveBeenCalledWith(boatClaimMailto());
+ const draft = new URL(vi.mocked(window.ogb!.openExternal!).mock.calls[0]![0]);
+ expect(`${draft.protocol}${draft.pathname}`).toBe("mailto:[email protected]");
+ expect(draft.searchParams.get("subject")).toBe("MausBot introduced me: $50 Boat credit");
+ expect(draft.searchParams.get("body")!.replace(/\r\n/g, "\n")).toBe("Hi Boat team,\n\nMausBot introduced me to Boat. I'm on the $___ plan.\nMy Boat account email: ___\n\nThanks!");
+ expect(vi.mocked(api).mock.calls.map(([path]) => path), "only the dismissal is saved").toEqual(["/api/config"]);
+ expect(boatEvents()).toContainEqual({ action: "claim", place: "card" });
+ await endedForGood();
+ });
+
+ it("an email app that won't open leaves it up and names the address to write to", async () => {
+ fresh(); await launch();
+ vi.mocked(window.ogb!.openExternal!).mockRejectedValueOnce(new Error("no mail app"));
+ press(CLAIM); await flush();
+ const after = render();
+ expect(after).toContain(html("Couldn't open your email app. Write to [email protected] instead."));
+ expect(after).toContain(html(TITLE)); expect(storage.get(BOAT_OFFER_NOTICE)).toBeUndefined();
+ });
+
+ it("Not now, the X and Escape end it for good too", async () => {
+ for (const end of [() => press("Not now"), () => press("Dismiss for good"), escape]) {
+ fresh(); desk = desktopMachine(); desk.saved = { seen: [CLOUD_PRO_UPDATE_NOTICE] }; f.state.config.onboarding.hintsSeen = withTourFinished(undefined);
+ expect(await launch()).toContain(html(TITLE));
+ end(); await flush();
+ await endedForGood();
+ }
+ expect(boatEvents().map((props) => props?.action)).toEqual(["shown", "not_now", "shown", "close", "shown", "close"]);
+ });
+
+ it("closed on This computer's page, it stays closed on My Cloud's page in the same desktop; a desktop that never showed it shows it there", async () => {
+ fresh(); await launch(); press("Not now"); await flush();
+ storage.clear(); storage.set(PRODUCT_HUNT_NOTICE, "1"); storage.set(SIMPLE_MODE_PROMPT_KEY, "1");
+ snapshot = { status: "none" }; viewer = { hosted: false, canSave: true, cloudHome: true }; f.state.config.cloudHome = true;
+ f.state.config.onboarding.hintsSeen = [...withTourFinished(undefined), "cloud-setup-hidden"]; showWindow(MY_CLOUD);
+ expect(await launch()).not.toContain(html(TITLE));
+ desk = desktopMachine(); desk.saved = { seen: [CLOUD_PRO_UPDATE_NOTICE] };
+ expect(await launch()).toContain(html(TITLE));
+ });
+
+ it("shows in a plain browser too, where the claim goes to the browser's own mail app", async () => {
+ vi.stubGlobal("window", { addEventListener: vi.fn(), removeEventListener: vi.fn(), location: { href: "https://bots.example.test/" } });
+ viewer = { hosted: true, canSave: true }; fresh();
+ expect(await launch()).toContain(html(TITLE));
+ press(CLAIM); await flush();
+ expect(window.location.href).toBe(boatClaimMailto());
+ expect(storage.get(BOAT_OFFER_NOTICE)).toBe("1"); expect(render()).toBe("");
+ });
+
+ it("never on a branded build or an organization's desktop, and never from its end date on", async () => {
+ fresh(); f.brand = "file";
+ expect(await launch()).not.toContain(html(TITLE));
+ f.brand = "default"; BOAT_OFFER.until = NOW + DAY;
+ expect(await launch(), "before its end date").toContain(html(TITLE));
+ now = NOW + DAY;
+ expect(await launch(), "from its end date").not.toContain(html(TITLE));
+ BOAT_OFFER.until = NOW - 1; now = NOW;
+ expect(await launch(), "an end date already gone switches it off").not.toContain(html(TITLE));
+ BOAT_OFFER.until = null;
+ (window.ogb as Record<string, unknown>).organization = { state: async () => ({ status: "connected", organization: { id: "o", name: "Acme" } }), onState: () => () => {} };
+ expect(await launch()).not.toContain(html(TITLE));
+ });
+
+ it("comes after a trial's notice, before the star, and waits while the bots move to My Cloud", async () => {
+ fresh(); storage.delete(STAR_NOTICE);
+ const running = trial("active");
+ account = paid({ trial: running }); snapshot = { status: "paid", tier: "pro", trial: running, notice: "active" };
+ const first = await launch();
+ expect(first).toContain("Your free trial ends on"); expect(first).not.toContain(html(TITLE));
+ snapshot = { ...snapshot, notice: undefined };
+ const line = (move: unknown) => desk.handlers.set("cloud-send:notice", () => ({ ready: true, bots: [], move }));
+ line({ phase: "copy", chats: { done: 1, total: 5 } });
+ expect(await launch(), "while the bots move").not.toContain(html(TITLE));
+ line(undefined);
+ expect(await launch()).toContain(html(TITLE));
+ press("Not now"); await flush();
+ expect(await launch()).toContain(STAR);
+ });
+});
+
describe("the Cloud Pro popup after the update", () => {
const POPUP = "MausBot Cloud Pro";
const ID = CLOUD_PRO_UPDATE_NOTICE;
diff --git a/src/components/AppNotices.tsx b/src/components/AppNotices.tsx
index e16b7b9485..81ed9e6f63 100644
--- a/src/components/AppNotices.tsx
+++ b/src/components/AppNotices.tsx
@@ -5,17 +5,19 @@ import type { CloudOffer } from "../../electron/cloud-home.mjs";
import { api, useStore } from "@/state/store";
import { APP_REPOSITORY } from "@/lib/app-links";
import { track } from "@/lib/analytics";
+import { boatOfferRuns } from "@/lib/boat-offer";
import { brandStatus } from "@/lib/brand";
import { buyOfferAllowed, cloudNoticeKind, cloudPlanView, cloudTrialNotice, cloudTrialView, offerTrialDays } from "@/lib/cloud-plan";
import { jobRoutine, useCloudIntent } from "@/lib/cloud-intent";
import { CLOUD_INTENT_GIVEN, cloudSetupStage } from "@/lib/cloud-setup";
import { cornerPopupWaits, firstReplyPending } from "@/lib/corner-popup";
-import { CLOUD_INTRO, CLOUD_NOTICE, CLOUD_PRO_UPDATE_NOTICE, CLOUD_TRIAL_NOTICE, dismissNotice, introShown, introStage, nextNotice, noticeSeen, PRODUCT_HUNT_NOTICE, PRODUCT_HUNT_UNTIL, PRODUCT_HUNT_URL, SIMPLE_MODE_NOTICE, STAR_NOTICE, UPDATES_CONSENT_NOTICE, usedBefore } from "@/lib/notices";
+import { BOAT_OFFER_NOTICE, CLOUD_INTRO, CLOUD_NOTICE, CLOUD_PRO_UPDATE_NOTICE, CLOUD_TRIAL_NOTICE, dismissNotice, introShown, introStage, nextNotice, noticeSeen, PRODUCT_HUNT_NOTICE, PRODUCT_HUNT_UNTIL, PRODUCT_HUNT_URL, SIMPLE_MODE_NOTICE, STAR_NOTICE, UPDATES_CONSENT_NOTICE, usedBefore } from "@/lib/notices";
import { useSimpleModePromptSeen } from "@/lib/simple-mode-prompt";
import { cloudSignInDue, onboardingCloudOffered, welcomeFinishedThisLaunch, type WelcomeViewer } from "@/lib/onboarding";
import { launchDialogShown, markLaunchDialog } from "@/lib/launch-dialogs";
import { useUpdaterState } from "@/lib/updater";
import { t } from "@/lib/i18n";
+import { BoatOfferCard, reportBoatOffer, type BoatOfferAction } from "./BoatOffer";
import { engineReady } from "./EngineLibrary";
import { CLOUD_NOTICE_CARD, cloudNoticeStep, CloudNoticeCard } from "./CloudNotice";
import { CLOUD_PRO_POPUP_SOURCE, CloudProPopup, cloudProCloudPageView, cloudProPopupView, reportCloudProPopup, useDesktopNotices, useOtherDialogOpen,
@@ -74,6 +76,7 @@ export function AppNotices({ quiet = false, viewer = null, now = Date.now }: { q
const [busy, setBusy] = useState(false);
const [popupShown, setPopupShown] = useState(false);
const [simpleShown, setSimpleShown] = useState(false);
+ const [boatShown, setBoatShown] = useState(false);
const consentHere = (local || viewer?.cloudHome === true) && brandStatus().source !== "file";
const consent = useUpdatesConsent(consentHere ? updatesConsentBridge() : undefined);
const [consentDone, setConsentDone] = useState(false);
@@ -131,6 +134,7 @@ export function AppNotices({ quiet = false, viewer = null, now = Date.now }: { q
// Every page with the app's chrome, desktop or Cloud, new install or not: once per browser, as the mode is.
const simpleDue = !useSimpleModePromptSeen();
const simpleBlocked = useOtherDialogOpen(simpleDue) || Boolean(state.liveCall && state.liveCall.status !== "ended");
+ const boatHere = boatOfferRuns(now()) && brandStatus().source !== "file";
const trial = plan?.trial;
const key = trial ? trialKey(trial) : null;
@@ -160,7 +164,7 @@ export function AppNotices({ quiet = false, viewer = null, now = Date.now }: { q
const mausBotFirst = mausBot.due;
const consentNow = consentWaits === true || consentFact === false ? false : consentWaits === null || mausBotFirst ? null : consentFact;
// After a closed popup only the product-updates question may follow in this launch; nothing else does.
- const notice = waits ? null : closed ? (consentNow === true ? UPDATES_CONSENT_NOTICE : null) : cards || popupHere || consentHere || simpleDue ? nextNotice({
+ const notice = waits ? null : closed ? (consentNow === true ? UPDATES_CONSENT_NOTICE : null) : cards || popupHere || consentHere || simpleDue || boatHere ? nextNotice({
// As the Cloud Pro popup: never in the launch whose welcome just finished, nor over MausBot's first-launch card.
[SIMPLE_MODE_NOTICE]: !simpleDue || afterWelcome === true ? false : afterWelcome === null || mausBotFirst || simpleBlocked ? null : true,
[CLOUD_PRO_UPDATE_NOTICE]: !popupPending || moving || afterWelcome === true ? false
@@ -172,9 +176,11 @@ export function AppNotices({ quiet = false, viewer = null, now = Date.now }: { q
[CLOUD_TRIAL_NOTICE]: planBridge && plan === null ? null : Boolean(key && (trialDue || trialOpen === key)),
[CLOUD_NOTICE]: !view ? false : view.kind === "unknown" ? null
: Boolean(kind && !noticeSeen(record, CLOUD_NOTICE_CARD[kind].dismissed)),
+ [BOAT_OFFER_NOTICE]: !boatHere || moving || afterWelcome === true || !usedBefore(state.bots) || desktopState?.seen.includes(BOAT_OFFER_NOTICE) ? false
+ : organization === null || moving === null || afterWelcome === null || mausBotFirst || (desktop && !desktopState) ? null : !organization,
[STAR_NOTICE]: !bridge || moving || brandStatus().source === "file" || !usedBefore(state.bots) ? false : moving === null ? null : true,
}, id => id === CLOUD_INTRO ? stage === "done" && !introOpen
- : id === STAR_NOTICE || id === PRODUCT_HUNT_NOTICE ? noticeSeen(record, id) : false) : null;
+ : id === STAR_NOTICE || id === PRODUCT_HUNT_NOTICE || id === BOAT_OFFER_NOTICE ? noticeSeen(record, id) : false) : null;
const shownKey = notice === CLOUD_TRIAL_NOTICE ? key : notice;
useEffect(() => {
@@ -195,6 +201,9 @@ export function AppNotices({ quiet = false, viewer = null, now = Date.now }: { q
} else if (shownKey === CLOUD_PRO_UPDATE_NOTICE && !popupShown && popupView) {
setPopupShown(true);
void desktop?.shown(CLOUD_PRO_UPDATE_NOTICE).then(first => { if (first) reportCloudProPopup("shown", popupView, page); }, () => {});
+ } else if (shownKey === BOAT_OFFER_NOTICE && !boatShown) {
+ setBoatShown(true);
+ reportBoatOffer("shown", "card");
}
}, [shownKey]);
@@ -252,6 +261,13 @@ export function AppNotices({ quiet = false, viewer = null, now = Date.now }: { q
if (notice === PRODUCT_HUNT_NOTICE) {
return <ProductHuntCard onDone={action => { track("product_hunt_card", { action }); close(); save(PRODUCT_HUNT_NOTICE); }} />;
}
+ if (notice === BOAT_OFFER_NOTICE) {
+ const done = (action: BoatOfferAction) => {
+ reportBoatOffer(action, "card"); close(); save(BOAT_OFFER_NOTICE);
+ void desktop?.seen(BOAT_OFFER_NOTICE).catch(() => {});
+ };
+ return <BoatOfferCard onDone={done} />;
+ }
if (notice === STAR_NOTICE) return <StarCard onDismiss={() => { close(); save(STAR_NOTICE); }} />;
return null;
}
diff --git a/src/components/BoatOffer.tsx b/src/components/BoatOffer.tsx
new file mode 100644
index 0000000000..1fcb7168ab
--- /dev/null
+++ b/src/components/BoatOffer.tsx
@@ -0,0 +1,64 @@
+import { useId, useState } from "react";
+import { Gift, Mail } from "lucide-react";
+import { track } from "@/lib/analytics";
+import { openEmailDraft } from "@/lib/app-links";
+import { BOAT_OFFER, boatClaimMailto, boatOfferRuns } from "@/lib/boat-offer";
+import { brandStatus } from "@/lib/brand";
+import { cn } from "@/lib/cn";
+import { t } from "@/lib/i18n";
+import { LinkButton, NoticeCard, NotNowButton, PRIMARY_BUTTON } from "./NoticeCard";
+
+export type BoatOfferAction = "get_boat" | "claim" | "not_now" | "close";
+type BoatOfferPlace = "card" | "settings";
+
+export function reportBoatOffer(action: BoatOfferAction | "shown", place: BoatOfferPlace) {
+ track("boat_offer", { action, place });
+}
+
+function BoatOfferWords() {
+ return <>
+ <p className="mt-1 text-[13px] leading-[18px] text-ink-secondary">{t("boatOffer.body")}</p>
+ <p data-boat-offer-yourself className="mt-2 text-[13px] font-semibold leading-[18px] text-ink">{t("boatOffer.yourself")}</p>
+ </>;
+}
+
+const CLAIM_BUTTON = "ui-button min-h-9 gap-1.5 px-3 py-1.5 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus";
+
+function ClaimButton({ onOpened, className }: { onOpened?: () => void; className?: string }) {
+ const [failed, setFailed] = useState(false);
+ return <div>
+ <button type="button" data-boat-claim className={cn(CLAIM_BUTTON, className)} onClick={() => {
+ setFailed(false);
+ void openEmailDraft(boatClaimMailto()).then(onOpened, () => setFailed(true));
+ }}>
+ <Mail size={14} aria-hidden="true" className="shrink-0" />{t("boatOffer.claim")}
+ </button>
+ {failed && <p role="alert" className="mt-2 text-[12px] text-danger">{t("boatOffer.mailFailed", { address: BOAT_OFFER.claimTo })}</p>}
+ </div>;
+}
+
+export function BoatOfferCard({ onDone }: { onDone: (action: BoatOfferAction) => void }) {
+ return <NoticeCard titleId="boat-offer-title" notice="boat-offer" icon={Gift} title={t("boatOffer.title")} onDismiss={() => onDone("close")}>
+ <BoatOfferWords />
+ <div className="mt-3 flex flex-col gap-2">
+ <LinkButton url={BOAT_OFFER.url} label={t("boatOffer.get")} className={cn(PRIMARY_BUTTON, "w-full")} onOpened={() => onDone("get_boat")} />
+ <ClaimButton className="w-full" onOpened={() => onDone("claim")} />
+ <NotNowButton onClick={() => onDone("not_now")} />
+ </div>
+ </NoticeCard>;
+}
+
+export function BoatOfferPanel() {
+ const titleId = useId();
+ if (!boatOfferRuns(Date.now()) || brandStatus().source === "file") return null;
+ return <section data-boat-offer aria-labelledby={titleId} className="rounded-lg bg-ink/[0.04] p-3">
+ <h3 id={titleId} className="flex items-center gap-1.5 text-[13px] font-semibold leading-[18px] text-ink">
+ <Gift size={14} aria-hidden="true" className="shrink-0 text-ink-secondary" />{t("boatOffer.title")}
+ </h3>
+ <BoatOfferWords />
+ <div className="mt-3 flex flex-wrap items-start gap-2">
+ <LinkButton url={BOAT_OFFER.url} label={t("boatOffer.get")} onOpened={() => reportBoatOffer("get_boat", "settings")} />
+ <ClaimButton onOpened={() => reportBoatOffer("claim", "settings")} />
+ </div>
+ </section>;
+}
diff --git a/src/components/NoticeCard.tsx b/src/components/NoticeCard.tsx
index 6ae3c83147..a01505c658 100644
--- a/src/components/NoticeCard.tsx
+++ b/src/components/NoticeCard.tsx
@@ -26,10 +26,10 @@ export function NoticeCard({ titleId, icon: Icon, title, onDismiss, dismissLabel
export const PRIMARY_BUTTON = "ui-button ui-button-primary min-h-9 gap-1.5 px-3 py-1.5 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus";
-export function LinkButton({ url, label, onOpened }: { url: string; label: string; onOpened?: () => void }) {
+export function LinkButton({ url, label, onOpened, className = PRIMARY_BUTTON }: { url: string; label: string; onOpened?: () => void; className?: string }) {
const [failed, setFailed] = useState(false);
return <div>
- <button type="button" className={PRIMARY_BUTTON} onClick={() => {
+ <button type="button" className={className} onClick={() => {
setFailed(false);
void openExternalLink(url).then(onOpened).catch(() => setFailed(true));
}}>
diff --git a/src/components/keys/KeysPage.dom.test.ts b/src/components/keys/KeysPage.dom.test.ts
index e90353b8bb..cbbd051b2d 100644
--- a/src/components/keys/KeysPage.dom.test.ts
+++ b/src/components/keys/KeysPage.dom.test.ts
@@ -28,6 +28,10 @@ vi.mock("@/lib/analytics", () => ({ track: vi.fn() }));
vi.mock("@/lib/live-call-media", () => ({ dismissLiveNotice: vi.fn() }));
const { KeysPage } = await import("./KeysPage");
+const { track } = await import("@/lib/analytics");
+const { BOAT_OFFER, boatClaimMailto } = await import("@/lib/boat-offer");
+const { BOAT_OFFER_NOTICE } = await import("@/lib/notices");
+const { applyBrand, DEFAULT_BRAND } = await import("@/lib/brand");
const { LiveKeyNeeded } = await import("../LiveKeyNeeded");
const { openKeySettings } = await import("./key-focus");
@@ -169,3 +173,58 @@ describe("the keys page", () => {
expect(fx.api).toHaveBeenCalledOnce();
});
});
+
+describe("Boat's credit offer on the Boat card", () => {
+ const offer = () => row("box")!.querySelector<HTMLElement>("[data-boat-offer]");
+ const buttons = () => [...offer()!.querySelectorAll<HTMLButtonElement>("button")];
+ const openComputers = () => flushSync(() => section("computers").querySelector<HTMLButtonElement>("button[aria-expanded]")!.click());
+ afterEach(() => {
+ BOAT_OFFER.until = null;
+ applyBrand({ brand: DEFAULT_BRAND, source: "default", file: "" });
+ delete (window as unknown as { ogb?: unknown }).ogb;
+ vi.unstubAllGlobals();
+ });
+
+ it("is always on the Boat card while the offer runs: with no key, a saved key, one a Cloud plan includes, and after its popup closed", () => {
+ page(); openComputers();
+ for (const box of [{ configured: false }, { configured: true, last4: "c3d4" }, { configured: false, included: true }]) {
+ setConfig({ ...fx.config, box });
+ expect(offer(), JSON.stringify(box)).not.toBeNull();
+ expect(offer()!.closest("[hidden]")).toBeNull();
+ const words = offer()!.textContent!;
+ for (const text of ["$50 of Boat credit for you", "Boat runs the cloud computers behind MausBot.", "You claim it yourself: it isn't automatic."]) {
+ expect(words).toContain(text);
+ }
+ expect(buttons().map((button) => button.textContent)).toEqual(["Get Boat", "I bought it: claim my $50"]);
+ }
+ vi.stubGlobal("localStorage", { getItem: (key: string) => (key === BOAT_OFFER_NOTICE ? "1" : null), setItem: () => {}, removeItem: () => {} });
+ page();
+ expect(offer(), "closing the popup never takes it from Settings").not.toBeNull();
+ type(host.querySelector<HTMLInputElement>("[data-keys-search]")!, "boat");
+ expect(rowsShown()).toContain("box"); expect(offer()!.closest("[hidden]")).toBeNull();
+ });
+
+ it("Get Boat opens boat.dev and the claim drafts the email to Boat; both stay for a later visit and save nothing", async () => {
+ const openExternal = vi.fn(async () => true);
+ (window as unknown as { ogb?: unknown }).ogb = { openExternal };
+ page(); openComputers();
+ flushSync(() => buttons()[0]!.click());
+ await vi.waitFor(() => expect(openExternal).toHaveBeenCalledWith("https://boat.dev"));
+ flushSync(() => buttons()[1]!.click());
+ await vi.waitFor(() => expect(openExternal).toHaveBeenCalledWith(boatClaimMailto()));
+ await vi.waitFor(() => expect(track).toHaveBeenCalledWith("boat_offer", { action: "claim", place: "settings" }));
+ expect(track).toHaveBeenCalledWith("boat_offer", { action: "get_boat", place: "settings" });
+ expect(offer()).not.toBeNull();
+ expect(fx.api).not.toHaveBeenCalled();
+ });
+
+ it("goes from its end date on, and on a branded build, while the Boat card stays", () => {
+ BOAT_OFFER.until = Date.now() - 1;
+ page();
+ expect(row("box")).not.toBeNull(); expect(offer()).toBeNull();
+ BOAT_OFFER.until = null;
+ applyBrand({ brand: { name: "Acme Bots" }, source: "file", file: "brand.json" });
+ page();
+ expect(row("box")).not.toBeNull(); expect(offer()).toBeNull();
+ });
+});
diff --git a/src/components/keys/KeysPage.tsx b/src/components/keys/KeysPage.tsx
index 7a671b47fe..30d89e7a31 100644
--- a/src/components/keys/KeysPage.tsx
+++ b/src/components/keys/KeysPage.tsx
@@ -4,6 +4,7 @@ import { useStore, type ConfigStatus } from "@/state/store";
import { cn } from "@/lib/cn";
import { scrollParent, scrollWithin } from "@/lib/scroll-within";
import { t } from "@/lib/i18n";
+import { BoatOfferPanel } from "../BoatOffer";
import { LmStudioServer, OtherOpenAiCompatServers } from "../OpenAiCompatServers";
import { KEY_CATALOG, KEY_SECTIONS, keyMatches, savedState, type KeyEntry, type KeyId, type KeySectionId } from "./key-catalog";
import { finishKeyFocus, useKeyFocus, type KeyFocusRequest } from "./key-focus";
@@ -22,6 +23,7 @@ const PANELS: Partial<Record<KeyId, () => ReactNode>> = {
const EXTRAS: Partial<Record<KeyId, () => ReactNode>> = {
anthropic: () => <AnthropicEveryClaudeBot />,
openaiCompat: () => <><OpenAiCompatUrl /><OtherOpenAiCompatServers /></>,
+ box: () => <BoatOfferPanel />,
};
function connected(entry: KeyEntry, config: ConfigStatus | null | undefined): boolean {
diff --git a/src/lib/app-links.ts b/src/lib/app-links.ts
index 0dc7056095..f03946b02b 100644
--- a/src/lib/app-links.ts
+++ b/src/lib/app-links.ts
@@ -37,3 +37,9 @@ export async function openExternalLink(url: string): Promise<void> {
}
window.open(url, "_blank", "noopener,noreferrer");
}
+
+/** A browser hands a mailto: link to its own mail app; the desktop app's window may not navigate to one, so main opens it. */
+export async function openEmailDraft(url: string): Promise<void> {
+ if (window.ogb) return openExternalLink(url);
+ window.location.href = url;
+}
diff --git a/src/lib/boat-offer.test.ts b/src/lib/boat-offer.test.ts
new file mode 100644
index 0000000000..b8ddd37c4a
--- /dev/null
+++ b/src/lib/boat-offer.test.ts
@@ -0,0 +1,34 @@
+import { describe, expect, it } from "vitest";
+import { BOAT_OFFER, boatClaimMailto, boatOfferRuns } from "./boat-offer";
+
+const SUBJECT = "MausBot introduced me: $50 Boat credit";
+const BODY = "Hi Boat team,\n\nMausBot introduced me to Boat. I'm on the $___ plan.\nMy Boat account email: ___\n\nThanks!";
+
+describe("Boat's credit offer", () => {
+ it("goes to boat.dev and claims at Boat's billing address, with no end date until Boat names one", () => {
+ expect(BOAT_OFFER.url).toBe("https://boat.dev");
+ expect(BOAT_OFFER.claimTo).toBe("[email protected]");
+ expect(BOAT_OFFER.until).toBeNull();
+ });
+
+ it("drafts the claim to that address with the subject and body Boat asked for, for the person to send", () => {
+ const mailto = boatClaimMailto();
+ expect(mailto).toBe("mailto:[email protected]"
+ + "?subject=MausBot%20introduced%20me%3A%20%2450%20Boat%20credit"
+ + "&body=Hi%20Boat%20team%2C%0D%0A%0D%0AMausBot%20introduced%20me%20to%20Boat.%20I'm%20on%20the%20%24___%20plan.%0D%0AMy%20Boat%20account%20email%3A%20___%0D%0A%0D%0AThanks!");
+ const url = new URL(mailto);
+ expect(`${url.protocol}${url.pathname}`).toBe("mailto:[email protected]");
+ expect([...url.searchParams.keys()]).toEqual(["subject", "body"]);
+ expect(url.searchParams.get("subject")).toBe(SUBJECT);
+ expect(url.searchParams.get("body")!.replace(/\r\n/g, "\n")).toBe(BODY);
+ expect(mailto, "a space is %20, never +, which some mail apps show as it is").not.toContain("+");
+ });
+
+ it("runs until its end date, and for good while none is set", () => {
+ const end = Date.UTC(2026, 11, 1);
+ expect(boatOfferRuns(end)).toBe(true);
+ expect(boatOfferRuns(end - 1, { ...BOAT_OFFER, until: end })).toBe(true);
+ expect(boatOfferRuns(end, { ...BOAT_OFFER, until: end })).toBe(false);
+ expect(boatOfferRuns(end + 1, { ...BOAT_OFFER, until: end })).toBe(false);
+ });
+});
diff --git a/src/lib/boat-offer.ts b/src/lib/boat-offer.ts
new file mode 100644
index 0000000000..3e8e0fd91e
--- /dev/null
+++ b/src/lib/boat-offer.ts
@@ -0,0 +1,30 @@
+/** Boat's credit for people MausBot introduces to Boat. The person claims it by writing to Boat themselves: the app only
+ * opens a draft they send, so nothing is ever claimed for them. */
+export interface BoatOffer {
+ url: string;
+ /** Boat's billing and account address. */
+ claimTo: string;
+ /** Boat's team reads the claim, so it stays in English whatever the app's language. */
+ subject: string;
+ body: string;
+ /** From this time (epoch ms) the offer shows nowhere; null while Boat has named no end date. */
+ until: number | null;
+}
+
+export const BOAT_OFFER: BoatOffer = {
+ url: "https://boat.dev",
+ claimTo: "[email protected]",
+ subject: "MausBot introduced me: $50 Boat credit",
+ body: "Hi Boat team,\n\nMausBot introduced me to Boat. I'm on the $___ plan.\nMy Boat account email: ___\n\nThanks!",
+ until: null,
+};
+
+export function boatOfferRuns(now: number, offer: BoatOffer = BOAT_OFFER): boolean {
+ return offer.until === null || now < offer.until;
+}
+
+/** RFC 6068: everything after the address is percent-encoded (never "+" for a space) and a line break is %0D%0A. */
+export function boatClaimMailto(offer: BoatOffer = BOAT_OFFER): string {
+ const encode = (text: string) => encodeURIComponent(text.replace(/\r?\n/g, "\r\n"));
+ return `mailto:${offer.claimTo}?subject=${encode(offer.subject)}&body=${encode(offer.body)}`;
+}
diff --git a/src/lib/notices.test.ts b/src/lib/notices.test.ts
index 3b4abedaba..f4b861b08f 100644
--- a/src/lib/notices.test.ts
+++ b/src/lib/notices.test.ts
@@ -1,7 +1,8 @@
import { afterEach, beforeEach, expect, it, vi } from "vitest";
import { EMPTY_ONBOARDING, type OnboardingStatus } from "@/lib/onboarding";
import { withTourReset } from "@/lib/guided-tour";
-import { CLOUD_INTRO, CLOUD_NOTICE, CLOUD_PRO_UPDATE_NOTICE, CLOUD_TRIAL_NOTICE, dismissNotice, introShown, introStage, localDay, nextNotice, noticeSeen, NOTICES,
+import { DESKTOP_NOTICES } from "../../electron/desktop-prefs.mjs";
+import { BOAT_OFFER_NOTICE, CLOUD_INTRO, CLOUD_NOTICE, CLOUD_PRO_UPDATE_NOTICE, CLOUD_TRIAL_NOTICE, dismissNotice, introShown, introStage, localDay, nextNotice, noticeSeen, NOTICES,
OLD_PRO_DISMISSALS, PRODUCT_HUNT_NOTICE, SIMPLE_MODE_NOTICE, STAR_NOTICE, UPDATES_CONSENT_NOTICE, usedBefore, type NoticeFacts } from "./notices";
let storage: Map<string, string>;
@@ -13,16 +14,17 @@ afterEach(() => vi.unstubAllGlobals());
const record = (hintsSeen: string[] = []): OnboardingStatus => ({ ...EMPTY_ONBOARDING, completedAt: "2026-09-01", version: 1, hintsSeen });
const facts = (intro: boolean | null, trial: boolean | null, cloud: boolean | null, star: boolean | null, launch: boolean | null = false, popup: boolean | null = false,
- consent: boolean | null = false, simple: boolean | null = false): NoticeFacts =>
- ({ [SIMPLE_MODE_NOTICE]: simple, [CLOUD_PRO_UPDATE_NOTICE]: popup, [UPDATES_CONSENT_NOTICE]: consent, [PRODUCT_HUNT_NOTICE]: launch, [CLOUD_INTRO]: intro, [CLOUD_TRIAL_NOTICE]: trial, [CLOUD_NOTICE]: cloud, [STAR_NOTICE]: star });
+ consent: boolean | null = false, simple: boolean | null = false, boat: boolean | null = false): NoticeFacts =>
+ ({ [SIMPLE_MODE_NOTICE]: simple, [CLOUD_PRO_UPDATE_NOTICE]: popup, [UPDATES_CONSENT_NOTICE]: consent, [PRODUCT_HUNT_NOTICE]: launch, [CLOUD_INTRO]: intro, [CLOUD_TRIAL_NOTICE]: trial, [CLOUD_NOTICE]: cloud,
+ [BOAT_OFFER_NOTICE]: boat, [STAR_NOTICE]: star });
const none = () => false;
const DAY = 86_400_000, NOON = new Date(2026, 9, 9, 12).getTime();
-it("is one queue: the Simple mode popup first, then the Cloud Pro popup, the product-updates question, the launch card, the card after the update, the trial's notice, the My Cloud card, the star", () => {
+it("is one queue: the Simple mode popup first, then the Cloud Pro popup, the product-updates question, the launch card, the card after the update, the trial's notice, the My Cloud card, Boat's credit offer, the star", () => {
expect(nextNotice(facts(true, true, true, true, true, true, true, true), none)).toBe(SIMPLE_MODE_NOTICE);
expect(nextNotice(facts(true, true, true, true, true, true, true, null), none), "nothing shows while the Simple mode popup waits").toBeNull();
expect(nextNotice(facts(true, true, true, true, true, true, true, true), id => id === SIMPLE_MODE_NOTICE)).toBe(CLOUD_PRO_UPDATE_NOTICE);
- expect(NOTICES).toEqual([SIMPLE_MODE_NOTICE, CLOUD_PRO_UPDATE_NOTICE, UPDATES_CONSENT_NOTICE, PRODUCT_HUNT_NOTICE, CLOUD_INTRO, CLOUD_TRIAL_NOTICE, CLOUD_NOTICE, STAR_NOTICE]);
+ expect(NOTICES).toEqual([SIMPLE_MODE_NOTICE, CLOUD_PRO_UPDATE_NOTICE, UPDATES_CONSENT_NOTICE, PRODUCT_HUNT_NOTICE, CLOUD_INTRO, CLOUD_TRIAL_NOTICE, CLOUD_NOTICE, BOAT_OFFER_NOTICE, STAR_NOTICE]);
expect(nextNotice(facts(true, true, true, true, true, true, true), none)).toBe(CLOUD_PRO_UPDATE_NOTICE);
expect(nextNotice(facts(true, true, true, true, true, true, true), id => id === CLOUD_PRO_UPDATE_NOTICE)).toBe(UPDATES_CONSENT_NOTICE);
expect(nextNotice(facts(true, true, true, true, true, null, true), none)).toBeNull();
@@ -39,11 +41,21 @@ it("is one queue: the Simple mode popup first, then the Cloud Pro popup, the pro
expect(nextNotice(facts(false, true, true, true), none)).toBe(CLOUD_TRIAL_NOTICE);
expect(nextNotice(facts(false, false, true, true), none)).toBe(CLOUD_NOTICE);
expect(nextNotice(facts(false, false, false, true), none)).toBe(STAR_NOTICE);
+ const boat = (intro: boolean, trial: boolean, cloud: boolean, offer: boolean | null) => facts(intro, trial, cloud, true, false, false, false, false, offer);
+ expect(nextNotice(boat(false, false, false, true), none)).toBe(BOAT_OFFER_NOTICE);
+ expect(nextNotice(boat(false, true, false, true), none), "a trial's notice goes first").toBe(CLOUD_TRIAL_NOTICE);
+ expect(nextNotice(boat(false, false, true, true), none), "so does the account's card").toBe(CLOUD_NOTICE);
+ expect(nextNotice(boat(false, false, false, null), none), "the star waits for it").toBeNull();
+ expect(nextNotice(boat(false, false, false, true), id => id === BOAT_OFFER_NOTICE)).toBe(STAR_NOTICE);
expect(nextNotice(facts(true, true, true, true), id => id === CLOUD_INTRO || id === STAR_NOTICE)).toBe(CLOUD_TRIAL_NOTICE);
expect(nextNotice(facts(true, true, true, true), () => true)).toBeNull();
expect(nextNotice(facts(false, false, false, false), none)).toBeNull();
});
+it("Boat's credit offer is one the desktop keeps for its every page, as the Cloud Pro popup is", () => {
+ expect(DESKTOP_NOTICES).toEqual([CLOUD_PRO_UPDATE_NOTICE, BOAT_OFFER_NOTICE]);
+});
+
it("waits while an earlier notice's answer is unknown, so a later one never shows first", () => {
expect(nextNotice(facts(null, false, false, true), none)).toBeNull();
expect(nextNotice(facts(false, null, false, true), none)).toBeNull();
diff --git a/src/lib/notices.ts b/src/lib/notices.ts
index 13d7d5168d..de8d8520fa 100644
--- a/src/lib/notices.ts
+++ b/src/lib/notices.ts
@@ -11,10 +11,11 @@ export const STAR_NOTICE = "github-star-dismissed";
export const PRODUCT_HUNT_NOTICE = "product-hunt-launch-2026-10";
export const PRODUCT_HUNT_URL = "https://www.producthunt.com/products/mausbot";
export const PRODUCT_HUNT_UNTIL = Date.UTC(2026, 10, 1);
+export const BOAT_OFFER_NOTICE = "boat-credit-2026-11";
-export type NoticeId = typeof SIMPLE_MODE_NOTICE | typeof CLOUD_PRO_UPDATE_NOTICE | typeof UPDATES_CONSENT_NOTICE | typeof PRODUCT_HUNT_NOTICE | typeof CLOUD_INTRO | typeof CLOUD_TRIAL_NOTICE | typeof CLOUD_NOTICE | typeof STAR_NOTICE;
+export type NoticeId = typeof SIMPLE_MODE_NOTICE | typeof CLOUD_PRO_UPDATE_NOTICE | typeof UPDATES_CONSENT_NOTICE | typeof PRODUCT_HUNT_NOTICE | typeof CLOUD_INTRO | typeof CLOUD_TRIAL_NOTICE | typeof CLOUD_NOTICE | typeof BOAT_OFFER_NOTICE | typeof STAR_NOTICE;
-export const NOTICES: readonly NoticeId[] = [SIMPLE_MODE_NOTICE, CLOUD_PRO_UPDATE_NOTICE, UPDATES_CONSENT_NOTICE, PRODUCT_HUNT_NOTICE, CLOUD_INTRO, CLOUD_TRIAL_NOTICE, CLOUD_NOTICE, STAR_NOTICE];
+export const NOTICES: readonly NoticeId[] = [SIMPLE_MODE_NOTICE, CLOUD_PRO_UPDATE_NOTICE, UPDATES_CONSENT_NOTICE, PRODUCT_HUNT_NOTICE, CLOUD_INTRO, CLOUD_TRIAL_NOTICE, CLOUD_NOTICE, BOAT_OFFER_NOTICE, STAR_NOTICE];
export type NoticeFacts = Record<NoticeId, boolean | null>;
diff --git a/src/locales/de.json b/src/locales/de.json
index 705158e903..b4069921cc 100644
--- a/src/locales/de.json
+++ b/src/locales/de.json
@@ -40,6 +40,12 @@
"star.title": "Gefällt dir {app}?",
"star.body": "Ein Stern auf GitHub hilft mehr Menschen, es zu finden.",
"star.button": "Stern auf GitHub geben",
+ "boatOffer.title": "50 $ Boat-Guthaben für dich",
+ "boatOffer.body": "Boat betreibt die Cloud-Computer hinter MausBot. Buch bei Boat den Tarif für 100 $ oder einen größeren und sag Boat dann, dass MausBot dich geschickt hat. Dann schreibt Boat deinem Boat-Konto 50 $ Guthaben gut.",
+ "boatOffer.yourself": "Du forderst es selbst an: Es passiert nicht automatisch.",
+ "boatOffer.get": "Zu Boat",
+ "boatOffer.claim": "Gekauft: meine 50 $ anfordern",
+ "boatOffer.mailFailed": "Deine E-Mail-App konnte nicht geöffnet werden. Schreib stattdessen an {address}.",
"cloudIntro.badge": "{days} Tage kostenlos",
"cloudIntro.title": "Deine Bots arbeiten weiter, auch wenn dieser Computer aus ist",
"cloudIntro.body": "MausBot Cloud lässt deine Bots für dich in der Cloud laufen, immer an.",
diff --git a/src/locales/en.json b/src/locales/en.json
index 461edc14af..08f96ff4c1 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -140,6 +140,12 @@
"productHunt.title": "We're live on Product Hunt",
"productHunt.body": "MausBot just launched. An upvote would mean a lot to us.",
"productHunt.button": "Upvote on Product Hunt",
+ "boatOffer.title": "$50 of Boat credit for you",
+ "boatOffer.body": "Boat runs the cloud computers behind MausBot. Buy Boat's $100 plan or bigger, then tell Boat that MausBot sent you, and they'll add $50 in credits to your Boat account.",
+ "boatOffer.yourself": "You claim it yourself: it isn't automatic.",
+ "boatOffer.get": "Get Boat",
+ "boatOffer.claim": "I bought it: claim my $50",
+ "boatOffer.mailFailed": "Couldn't open your email app. Write to {address} instead.",
"cloudIntro.badge": "Free for {days} days",
"cloudIntro.title": "Keep your bots working when this computer is off",
"cloudIntro.body": "MausBot Cloud runs your bots for you in the cloud, always on.",
diff --git a/src/locales/es.json b/src/locales/es.json
index 9600c74e4c..537d06594c 100644
--- a/src/locales/es.json
+++ b/src/locales/es.json
@@ -87,6 +87,12 @@
"star.title": "¿Te gusta {app}?",
"star.body": "Una estrella en GitHub ayuda a que más personas lo encuentren.",
"star.button": "Dar una estrella en GitHub",
+ "boatOffer.title": "50 $ de crédito de Boat para ti",
+ "boatOffer.body": "Boat gestiona los equipos en la nube que hay detrás de MausBot. Compra el plan de 100 $ de Boat o uno superior, luego dile a Boat que te envía MausBot y añadirán 50 $ en créditos a tu cuenta de Boat.",
+ "boatOffer.yourself": "Lo reclamas tú: no es automático.",
+ "boatOffer.get": "Ir a Boat",
+ "boatOffer.claim": "Ya lo compré: reclamar mis 50 $",
+ "boatOffer.mailFailed": "No se pudo abrir tu app de correo. Escribe a {address}.",
"productHunt.title": "Ya estamos en Product Hunt",
"productHunt.body": "MausBot acaba de lanzarse. Tu voto significaría mucho para nosotros.",
"productHunt.button": "Votar en Product Hunt",
diff --git a/src/locales/fr.json b/src/locales/fr.json
index 054453b429..6ba0989275 100644
--- a/src/locales/fr.json
+++ b/src/locales/fr.json
@@ -40,6 +40,12 @@
"star.title": "Vous aimez {app} ?",
"star.body": "Une étoile sur GitHub aide plus de gens à le découvrir.",
"star.button": "Mettre une étoile sur GitHub",
+ "boatOffer.title": "50 $ de crédit Boat pour vous",
+ "boatOffer.body": "Boat fait tourner les ordinateurs cloud de MausBot. Souscrivez l'offre Boat à 100 $ ou plus, puis dites à Boat que vous venez de la part de MausBot : Boat ajoutera 50 $ de crédits à votre compte Boat.",
+ "boatOffer.yourself": "C'est à vous de le réclamer : ce n'est pas automatique.",
+ "boatOffer.get": "Aller sur Boat",
+ "boatOffer.claim": "Je l'ai acheté : réclamer mes 50 $",
+ "boatOffer.mailFailed": "Impossible d'ouvrir votre messagerie. Écrivez plutôt à {address}.",
"cloudIntro.badge": "Gratuit pendant {days} jours",
"cloudIntro.title": "Vos bots continuent de travailler quand cet ordinateur est éteint",
"cloudIntro.body": "MausBot Cloud fait tourner vos bots pour vous dans le cloud, toujours allumé.",
diff --git a/src/locales/hi.json b/src/locales/hi.json
index 32f9bddebd..03a93e0e80 100644
--- a/src/locales/hi.json
+++ b/src/locales/hi.json
@@ -40,6 +40,12 @@
"star.title": "{app} पसंद आ रहा है?",
"star.body": "GitHub पर एक स्टार से ज़्यादा लोग इसे ढूँढ पाते हैं।",
"star.button": "GitHub पर स्टार दें",
+ "boatOffer.title": "आपके लिए $50 का Boat क्रेडिट",
+ "boatOffer.body": "MausBot के पीछे के क्लाउड कंप्यूटर Boat चलाता है। Boat का $100 या उससे बड़ा प्लान खरीदें, फिर Boat को बताएँ कि आपको MausBot ने भेजा है, और वे आपके Boat खाते में $50 का क्रेडिट जोड़ देंगे।",
+ "boatOffer.yourself": "इसे आपको खुद क्लेम करना होगा: यह अपने-आप नहीं मिलता।",
+ "boatOffer.get": "Boat पर जाएँ",
+ "boatOffer.claim": "मैंने खरीद लिया: मेरे $50 क्लेम करें",
+ "boatOffer.mailFailed": "आपका ईमेल ऐप नहीं खुल सका। इसके बजाय {address} पर लिखें।",
"cloudIntro.badge": "{days} दिन मुफ़्त",
"cloudIntro.title": "यह कंप्यूटर बंद होने पर भी आपके बॉट काम करते रहें",
"cloudIntro.body": "MausBot Cloud आपके बॉट को आपके लिए क्लाउड में चलाता है, हमेशा चालू।",
diff --git a/src/locales/it.json b/src/locales/it.json
index 9e7a6f3d4d..2b6a4edddd 100644
--- a/src/locales/it.json
+++ b/src/locales/it.json
@@ -92,6 +92,12 @@
"star.title": "Ti piace {app}?",
"star.body": "Una stella su GitHub aiuta più persone a trovarlo.",
"star.button": "Stella su GitHub",
+ "boatOffer.title": "50 $ di credito Boat per te",
+ "boatOffer.body": "Boat gestisce i computer cloud dietro MausBot. Acquista il piano Boat da 100 $ o superiore, poi di' a Boat che ti manda MausBot e aggiungeranno 50 $ di crediti al tuo account Boat.",
+ "boatOffer.yourself": "Il credito lo richiedi tu: non è automatico.",
+ "boatOffer.get": "Vai su Boat",
+ "boatOffer.claim": "L'ho acquistato: richiedi i miei 50 $",
+ "boatOffer.mailFailed": "Non riesco ad aprire l'app di posta. Scrivi invece a {address}.",
"productHunt.title": "Siamo su Product Hunt",
"productHunt.body": "MausBot è appena uscito. Un voto per noi conta molto.",
"productHunt.button": "Vota su Product Hunt",
diff --git a/src/locales/ja.json b/src/locales/ja.json
index 97332af82c..36751c1852 100644
--- a/src/locales/ja.json
+++ b/src/locales/ja.json
@@ -94,6 +94,12 @@
"star.title": "{app} を気に入っていただけましたか?",
"star.body": "GitHub でスターを付けていただくと、より多くの人に見つけてもらえます。",
"star.button": "GitHub でスターを付ける",
+ "boatOffer.title": "$50 分の Boat クレジットがもらえます",
+ "boatOffer.body": "MausBot を支えるクラウドコンピューターは Boat が運営しています。Boat の $100 以上のプランを購入し、MausBot の紹介で来たことを Boat に伝えると、Boat のアカウントに $50 分のクレジットが追加されます。",
+ "boatOffer.yourself": "申請はご自身で行ってください。自動では適用されません。",
+ "boatOffer.get": "Boat を開く",
+ "boatOffer.claim": "購入済み:$50 を申請する",
+ "boatOffer.mailFailed": "メールアプリを開けませんでした。代わりに {address} 宛てにメールしてください。",
"productHunt.title": "Product Huntで公開中です",
"productHunt.body": "MausBotをローンチしました。応援の投票をいただけるととても嬉しいです。",
"productHunt.button": "Product Huntで投票する",
diff --git a/src/locales/ko.json b/src/locales/ko.json
index 9da396bacc..993d30ec28 100644
--- a/src/locales/ko.json
+++ b/src/locales/ko.json
@@ -137,6 +137,12 @@
"star.title": "{app}이 마음에 드세요?",
"star.body": "GitHub에 별을 눌러 주시면 더 많은 사람이 찾을 수 있어요.",
"star.button": "GitHub에서 별 주기",
+ "boatOffer.title": "$50 Boat 크레딧을 받으세요",
+ "boatOffer.body": "MausBot 뒤에서 돌아가는 클라우드 컴퓨터는 Boat가 운영해요. Boat의 $100 이상 요금제를 구매한 다음 MausBot 소개로 왔다고 Boat에 알리면 Boat 계정에 $50 크레딧을 추가해 줘요.",
+ "boatOffer.yourself": "직접 신청해야 해요. 자동으로 적용되지 않아요.",
+ "boatOffer.get": "Boat로 이동",
+ "boatOffer.claim": "구매했어요: $50 받기",
+ "boatOffer.mailFailed": "메일 앱을 열지 못했어요. 대신 {address}(으)로 메일을 보내세요.",
"productHunt.title": "Product Hunt에 올라왔어요",
"productHunt.body": "MausBot이 방금 출시됐어요. 추천 한 표가 큰 힘이 돼요.",
"productHunt.button": "Product Hunt에서 추천하기",
diff --git a/src/locales/pl.json b/src/locales/pl.json
index 9003facb77..c53c63993f 100644
--- a/src/locales/pl.json
+++ b/src/locales/pl.json
@@ -94,6 +94,12 @@
"star.title": "Podoba ci się {app}?",
"star.body": "Gwiazdka na GitHubie pomaga większej liczbie osób go znaleźć.",
"star.button": "Dodaj gwiazdkę na GitHubie",
+ "boatOffer.title": "50 $ kredytu Boat dla ciebie",
+ "boatOffer.body": "Boat obsługuje komputery w chmurze, na których działa MausBot. Kup plan Boat za 100 $ lub wyższy, potem powiedz Boat, że przysłał cię MausBot, a Boat doda 50 $ kredytu do twojego konta Boat.",
+ "boatOffer.yourself": "Zgłaszasz się po niego samodzielnie: nie dzieje się to automatycznie.",
+ "boatOffer.get": "Przejdź do Boat",
+ "boatOffer.claim": "Plan kupiony: odbierz moje 50 $",
+ "boatOffer.mailFailed": "Nie udało się otworzyć aplikacji poczty. Napisz zamiast tego na {address}.",
"productHunt.title": "Jesteśmy na Product Hunt",
"productHunt.body": "MausBot właśnie zadebiutował. Głos poparcia znaczyłby dla nas wiele.",
"productHunt.button": "Zagłosuj na Product Hunt",
diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json
index bc54e47aec..1324ba6c90 100644
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@ -86,6 +86,12 @@
"star.title": "Está gostando do {app}?",
"star.body": "Uma estrela no GitHub ajuda mais pessoas a encontrá-lo.",
"star.button": "Dar uma estrela no GitHub",
+ "boatOffer.title": "US$ 50 em créditos do Boat para você",
+ "boatOffer.body": "O Boat roda os computadores na nuvem por trás do MausBot. Compre o plano de US$ 100 do Boat ou um maior, depois diga ao Boat que o MausBot indicou você, e eles vão adicionar US$ 50 em créditos à sua conta do Boat.",
+ "boatOffer.yourself": "Quem pede é você: não é automático.",
+ "boatOffer.get": "Ir para o Boat",
+ "boatOffer.claim": "Já comprei: pedir meus US$ 50",
+ "boatOffer.mailFailed": "Não foi possível abrir seu app de e-mail. Escreva para {address}.",
"productHunt.title": "Estamos no ar no Product Hunt",
"productHunt.body": "O MausBot acabou de ser lançado. Seu voto significaria muito para nós.",
"productHunt.button": "Votar no Product Hunt",
diff --git a/src/locales/ru.json b/src/locales/ru.json
index 1d30b1ec87..21f33345e9 100644
--- a/src/locales/ru.json
+++ b/src/locales/ru.json
@@ -94,6 +94,12 @@
"star.title": "Нравится {app}?",
"star.body": "Звезда на GitHub поможет большему числу людей его найти.",
"star.button": "Поставить звезду на GitHub",
+ "boatOffer.title": "$50 кредитов Boat для вас",
+ "boatOffer.body": "Boat обеспечивает облачные компьютеры, на которых работает MausBot. Купите тариф Boat за $100 или дороже, затем сообщите Boat, что вас направил MausBot, и они начислят $50 кредитов на ваш аккаунт Boat.",
+ "boatOffer.yourself": "Получить их нужно самостоятельно: это не происходит автоматически.",
+ "boatOffer.get": "Перейти в Boat",
+ "boatOffer.claim": "Тариф куплен: получить мои $50",
+ "boatOffer.mailFailed": "Не удалось открыть почтовое приложение. Напишите на {address}.",
"productHunt.title": "Мы запустились на Product Hunt",
"productHunt.body": "MausBot только что запустился. Для нас очень важен ваш голос.",
"productHunt.button": "Проголосовать на Product Hunt",
diff --git a/src/locales/tr.json b/src/locales/tr.json
index a901e77d3d..ecd63d58c3 100644
--- a/src/locales/tr.json
+++ b/src/locales/tr.json
@@ -72,6 +72,12 @@
"star.title": "{app}'u beğendiniz mi?",
"star.body": "GitHub'da vereceğiniz bir yıldız, daha fazla kişinin onu bulmasına yardımcı olur.",
"star.button": "GitHub'da yıldız ver",
+ "boatOffer.title": "Size 50 $ Boat kredisi",
+ "boatOffer.body": "MausBot'un arkasındaki bulut bilgisayarları Boat çalıştırır. Boat'un 100 $ veya daha büyük bir planını satın alın, ardından Boat'a sizi MausBot'un yönlendirdiğini söyleyin; Boat hesabınıza 50 $ kredi eklenecek.",
+ "boatOffer.yourself": "Krediyi kendiniz talep edersiniz: otomatik değildir.",
+ "boatOffer.get": "Boat'a git",
+ "boatOffer.claim": "Satın aldım: 50 $'ımı talep et",
+ "boatOffer.mailFailed": "E-posta uygulamanız açılamadı. Bunun yerine {address} adresine yazın.",
"productHunt.title": "Product Hunt'ta yayındayız",
"productHunt.body": "MausBot az önce yayına girdi. Vereceğiniz bir oy bizim için çok değerli.",
"productHunt.button": "Product Hunt'ta oy ver",
diff --git a/src/locales/uk.json b/src/locales/uk.json
index 7b404487b7..e343724c30 100644
--- a/src/locales/uk.json
+++ b/src/locales/uk.json
@@ -40,6 +40,12 @@
"star.title": "Подобається {app}?",
"star.body": "Зірка на GitHub допомагає більшій кількості людей знайти його.",
"star.button": "Поставити зірку на GitHub",
+ "boatOffer.title": "$50 кредитів Boat для вас",
+ "boatOffer.body": "Boat забезпечує хмарні комп'ютери, на яких працює MausBot. Придбайте тариф Boat за $100 або дорожчий, потім повідомте Boat, що вас направив MausBot, і вони нарахують $50 кредитів на ваш акаунт Boat.",
+ "boatOffer.yourself": "Отримати їх потрібно самостійно: це не відбувається автоматично.",
+ "boatOffer.get": "Перейти до Boat",
+ "boatOffer.claim": "Тариф придбано: отримати мої $50",
+ "boatOffer.mailFailed": "Не вдалося відкрити поштовий застосунок. Напишіть на {address}.",
"cloudIntro.badge": "{days} днів безкоштовно",
"cloudIntro.title": "Ваші боти працюють, навіть коли цей комп’ютер вимкнено",
"cloudIntro.body": "MausBot Cloud тримає ваших ботів у роботі в хмарі, завжди увімкнено.",
diff --git a/src/locales/vi.json b/src/locales/vi.json
index c2107562b2..c36609f63f 100644
--- a/src/locales/vi.json
+++ b/src/locales/vi.json
@@ -72,6 +72,12 @@
"star.title": "Bạn thích {app} chứ?",
"star.body": "Một ngôi sao trên GitHub sẽ giúp nhiều người biết đến ứng dụng hơn.",
"star.button": "Tặng sao trên GitHub",
+ "boatOffer.title": "$50 tín dụng Boat dành cho bạn",
+ "boatOffer.body": "Boat vận hành các máy tính đám mây phía sau MausBot. Hãy mua gói $100 trở lên của Boat, sau đó cho Boat biết bạn đến từ MausBot, và họ sẽ cộng $50 tín dụng vào tài khoản Boat của bạn.",
+ "boatOffer.yourself": "Bạn tự yêu cầu nhận: việc này không tự động.",
+ "boatOffer.get": "Đến Boat",
+ "boatOffer.claim": "Tôi đã mua: nhận $50 của tôi",
+ "boatOffer.mailFailed": "Không thể mở ứng dụng email của bạn. Hãy viết thư đến {address}.",
"productHunt.title": "Chúng tôi đã có mặt trên Product Hunt",
"productHunt.body": "MausBot vừa ra mắt. Một lượt bình chọn sẽ có ý nghĩa rất lớn với chúng tôi.",
"productHunt.button": "Bình chọn trên Product Hunt",
diff --git a/src/locales/vocabulary.test.ts b/src/locales/vocabulary.test.ts
index 8403fa5307..a510dc188b 100644
--- a/src/locales/vocabulary.test.ts
+++ b/src/locales/vocabulary.test.ts
@@ -42,6 +42,9 @@ const EN_ALLOWED: Record<string, string> = {
"botAccess.cloud.boat": "the own-key provider picker names its two providers, Boat and a VPS",
"botAccess.cloud.hostedBackendDescription": "the own-key provider picker names its two providers, Boat and a VPS",
"botAccess.cloud.vpsAutoDescription": "the own-key provider picker's VPS line names its Cloud choice",
+ "boatOffer.title": "Boat's credit offer names Boat, whose credit and plan it is",
+ "boatOffer.body": "Boat's credit offer names Boat, whose credit and plan it is",
+ "boatOffer.get": "Boat's credit offer names Boat, whose credit and plan it is",
};
const ROOT = fileURLToPath(new URL("../../", import.meta.url));
@@ -54,6 +57,7 @@ const isSource = (name: string) => /\.(?:ts|tsx|mjs|cjs|js)$/.test(name) && !/\.
const ALLOWED: ReadonlyArray<{ file: string; snippet?: string; why: string }> = [
{ file: "shared/credential-request.ts", snippet: "when Boat is selected", why: "the card that asks for a person's own Boat key" },
{ file: "server/boat-create-idempotency.ts", snippet: "unnamed Boat", why: "own-key repair: boat.dev's own name for a machine" },
+ { file: "src/lib/boat-offer.ts", snippet: "MausBot introduced me", why: "the email a person sends Boat to claim its credit" },
{ file: "server/workspace-backup.ts", snippet: "OMB-WORKSPACE-1", why: "a backup file's format marker" },
{ file: "electron/company-backups.mjs", snippet: "OMB-WORKSPACE-1", why: "a backup file's format marker" },
];
diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.json
index 03c46bed05..80506cc541 100644
--- a/src/locales/zh-tw.json
+++ b/src/locales/zh-tw.json
@@ -71,6 +71,12 @@
"star.title": "喜歡 {app} 嗎?",
"star.body": "在 GitHub 上給顆星,能幫助更多人找到它。",
"star.button": "在 GitHub 上給星",
+ "boatOffer.title": "你可獲得 $50 的 Boat 額度",
+ "boatOffer.body": "MausBot 背後的雲端電腦由 Boat 營運。購買 Boat $100 或以上的方案後,告訴 Boat 是 MausBot 介紹你來的,他們就會在你的 Boat 帳號加入 $50 額度。",
+ "boatOffer.yourself": "需要你自己申請:不會自動發放。",
+ "boatOffer.get": "前往 Boat",
+ "boatOffer.claim": "我已購買:申請我的 $50",
+ "boatOffer.mailFailed": "無法開啟你的郵件 App。請改寄信到 {address}。",
"cloudIntro.badge": "免費 {days} 天",
"cloudIntro.title": "這台電腦關機時,你的機器人也能繼續工作",
"cloudIntro.body": "MausBot Cloud 會在雲端為你持續執行機器人,隨時在線。",
diff --git a/src/locales/zh.json b/src/locales/zh.json
index b9c315ad11..07fce4257f 100644
--- a/src/locales/zh.json
+++ b/src/locales/zh.json
@@ -61,6 +61,12 @@
"star.title": "喜欢 {app} 吗?",
"star.body": "在 GitHub 上点个星,能帮助更多人发现它。",
"star.button": "在 GitHub 上点星",
+ "boatOffer.title": "你可获得 $50 的 Boat 额度",
+ "boatOffer.body": "MausBot 背后的云端电脑由 Boat 运营。购买 Boat $100 或以上的套餐后,告诉 Boat 是 MausBot 介绍你来的,他们就会在你的 Boat 账号中添加 $50 额度。",
+ "boatOffer.yourself": "需要你自己申请:不会自动发放。",
+ "boatOffer.get": "前往 Boat",
+ "boatOffer.claim": "我已购买:申请我的 $50",
+ "boatOffer.mailFailed": "无法打开你的邮件应用。请改为发邮件到 {address}。",
"cloudIntro.badge": "免费 {days} 天",
"cloudIntro.title": "这台电脑关机时,你的机器人也能继续工作",
"cloudIntro.body": "MausBot Cloud 在云端为你持续运行机器人,始终在线。",