Skip to content

A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.

Island: optional date and time in the middle of the compact island

Eduardo Quirinoe67198eb4807
diff --git a/windows/src-tauri/src/settings.rs b/windows/src-tauri/src/settings.rs
index 400d5ed5..541af837 100644
--- a/windows/src-tauri/src/settings.rs
+++ b/windows/src-tauri/src/settings.rs
@@ -97,6 +97,8 @@ pub struct Settings {
pub phone_relay: bool,
/// The relay's address (`wss://…`), empty until the user enters it. Not a secret. Owned by Rust.
pub phone_relay_url: String,
+ /// The date and time in the middle of the compact island. Off by default.
+ pub show_clock: bool,
}
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
@@ -162,6 +164,7 @@ impl Default for Settings {
phone_services: Vec::new(),
phone_relay: false,
phone_relay_url: String::new(),
+ show_clock: false,
}
}
}
@@ -448,7 +451,8 @@ mod tests {
"phoneUsage": true,
"phoneServices": ["integration_stripe"],
"phoneRelay": true,
- "phoneRelayUrl": "wss://relay.example.workers.dev"
+ "phoneRelayUrl": "wss://relay.example.workers.dev",
+ "showClock": true
}"##;
fn custom() -> Value {
@@ -956,6 +960,7 @@ mod tests {
"phoneServices",
"phoneRelay",
"phoneRelayUrl",
+ "showClock",
]
);
let _ = std::fs::remove_dir_all(&dir);
diff --git a/windows/src/core/state.ts b/windows/src/core/state.ts
index 3c9c8aa5..a99718d6 100644
--- a/windows/src/core/state.ts
+++ b/windows/src/core/state.ts
@@ -103,6 +103,8 @@ export interface Settings {
autoCloseInterval: number;
/** Hovering the island opens it all the way (off: hovering only peeks). */
openOnHover: boolean;
+ /** Date and time in the middle of the compact island. */
+ showClock: boolean;
absenceInterval: number;
/** Declared pills next to the main one (at most 4), in the order they were added. */
activeIntegrations: string[];
@@ -169,6 +171,7 @@ export const DEFAULT_SETTINGS: Settings = {
soundVolume: 0.12,
autoCloseInterval: 15,
openOnHover: false,
+ showClock: false,
absenceInterval: 180,
activeIntegrations: [
"integration_resend", "integration_n8n", "integration_vercel", "integration_github",
diff --git a/windows/src/i18n/extra.json b/windows/src/i18n/extra.json
index 22982fd8..7684497a 100644
--- a/windows/src/i18n/extra.json
+++ b/windows/src/i18n/extra.json
@@ -4361,6 +4361,28 @@
"pt-BR": "O Coucou não conseguiu responder: verifique sua chave do Claude em Notch → Chat.",
"ru": "Coucou не смог ответить: проверьте ключ Claude в Notch → Чат.",
"id": "Coucou tidak bisa menjawab: periksa kunci Claude-mu di Notch → Obrolan."
+ },
+ "Show clock in the island": {
+ "zh-Hans": "在灵动岛中显示时钟",
+ "hi": "आइलैंड में घड़ी दिखाएँ",
+ "es": "Mostrar el reloj en la isla",
+ "ar": "إظهار الساعة في الجزيرة",
+ "fr": "Afficher l'horloge dans l'îlot",
+ "bn": "আইল্যান্ডে ঘড়ি দেখান",
+ "pt-BR": "Mostrar relógio na ilha",
+ "ru": "Показывать часы в острове",
+ "id": "Tampilkan jam di pulau"
+ },
+ "The date and the time in the middle of the island when it is compact.": {
+ "zh-Hans": "岛收起时,在中间显示日期和时间。",
+ "hi": "आइलैंड के छोटे होने पर बीच में तारीख़ और समय दिखता है।",
+ "es": "La fecha y la hora en el centro de la isla cuando está compacta.",
+ "ar": "التاريخ والوقت في وسط الجزيرة عندما تكون مصغّرة.",
+ "fr": "La date et l'heure au milieu de l'îlot quand il est compact.",
+ "bn": "আইল্যান্ড ছোট থাকলে মাঝখানে তারিখ ও সময় দেখায়।",
+ "pt-BR": "A data e a hora no meio da ilha quando ela está compacta.",
+ "ru": "Дата и время в середине острова, когда он свёрнут.",
+ "id": "Tanggal dan jam di tengah pulau saat ringkas."
}
}
}
diff --git a/windows/src/island/island.ts b/windows/src/island/island.ts
index bca15aaf..dde0f32c 100644
--- a/windows/src/island/island.ts
+++ b/windows/src/island/island.ts
@@ -57,6 +57,8 @@ export class Island {
private botGlow!: HTMLElement;
private greetingCanvas!: HTMLCanvasElement;
private miniGrid!: HTMLElement;
+ private clockEl!: HTMLElement;
+ private clockTimer?: number;
private countdown!: HTMLElement;
private wakeStrip!: HTMLElement;
@@ -258,6 +260,7 @@ export class Island {
this.botCanvas = h("canvas", { id: "bot-canvas" });
this.greetingCanvas = h("canvas", { id: "greeting-canvas" });
this.miniGrid = h("div", { id: "mini-grid" });
+ this.clockEl = h("div", { id: "island-clock" });
this.countdown = h("div", { id: "countdown" });
this.header = buildHeader(actions);
@@ -292,6 +295,7 @@ export class Island {
this.botGlow,
this.botCanvas,
this.miniGrid,
+ this.clockEl,
this.countdown,
);
@@ -678,6 +682,7 @@ export class Island {
// the state-driven DOM sync.
this.miniGrid.style.left = `${w - 40 - 14.5}px`;
this.miniGrid.style.top = `${hh / 2 - 14.5}px`;
+ this.clockEl.style.height = `${hh}px`;
this.greetingCanvas.style.left = `${(w - EXPANDED_W) / 2}px`;
this.uploadCanvas.el.style.left = `${(w - EXPANDED_W) / 2}px`;
@@ -1190,10 +1195,24 @@ export class Island {
}
}
+ this.updateClock();
+
syncMiniBotStates(State.tasks);
this.engine.setState(State.effectiveState);
}
+ /** The clock sits in the middle of the compact island, where the notch is on a Mac. */
+ private updateClock() {
+ const on = State.mode === "compact" && State.settings.showClock;
+ this.clockEl.style.opacity = on ? "1" : "0";
+ if (!on) return;
+ const now = new Date();
+ const date = now.toLocaleDateString([], { weekday: "short", day: "numeric", month: "short" });
+ const time = now.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
+ const text = `${date} ${time}`;
+ if (this.clockEl.textContent !== text) this.clockEl.textContent = text;
+ }
+
/** Applies settings coming from Rust at boot. */
applySettings() {
Sound.setEnabled(State.settings.soundEnabled);
@@ -1201,6 +1220,8 @@ export class Island {
this.fsm.homeToPetitDelay = State.settings.autoCloseInterval;
this.fsm.openOnHover = State.settings.openOnHover;
State.notify();
+ // ponytail: one timer for the life of the window; a minute is the clock's finest tick.
+ this.clockTimer ??= window.setInterval(() => this.updateClock(), 10_000);
}
get panelSize() {
diff --git a/windows/src/settings/main.ts b/windows/src/settings/main.ts
index 437363f0..a90007a3 100644
--- a/windows/src/settings/main.ts
+++ b/windows/src/settings/main.ts
@@ -958,6 +958,11 @@ function generalSection(): HTMLElement {
toggle(settings.openOnHover, (v) => { settings.openOnHover = v; void save(); }),
),
h("div", { class: "hint", text: t("Hovering the island opens it; it folds again shortly after the pointer leaves. Click inside to keep it open.") }),
+ h("div", { class: "row" },
+ h("label", { text: t("Show clock in the island") }),
+ toggle(settings.showClock, (v) => { settings.showClock = v; void save(); }),
+ ),
+ h("div", { class: "hint", text: t("The date and the time in the middle of the island when it is compact.") }),
h("div", { class: "row" },
h("label", { text: t("Auto-close") }),
autoClose,
diff --git a/windows/src/style.css b/windows/src/style.css
index 1a56c61b..72db9ba5 100644
--- a/windows/src/style.css
+++ b/windows/src/style.css
@@ -176,6 +176,23 @@ body {
transition: opacity 0.25s ease-in-out;
}
+/* Date and time in the middle of the compact island, between Mochi and the grid. */
+#island-clock {
+ position: absolute;
+ left: 50px;
+ right: 56px;
+ top: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 12px;
+ font-variant-numeric: tabular-nums;
+ white-space: nowrap;
+ color: rgba(255, 255, 255, 0.85);
+ pointer-events: none;
+ transition: opacity 0.25s ease-in-out;
+}
+
/* A mini Mochi: the slot is the body, the canvas is larger and overflows it so
hands, badges and particles are not cut off. */
.mini {