Skip to content

The agent that grows with you

feat(desktop): full-width butterbar above the statusbar

Brooklyn Nicholson3f62bc534296
diff --git a/apps/desktop/src/app/contrib/controller.tsx b/apps/desktop/src/app/contrib/controller.tsx
index 0090c5d2043..1ac6c520487 100644
--- a/apps/desktop/src/app/contrib/controller.tsx
+++ b/apps/desktop/src/app/contrib/controller.tsx
@@ -118,6 +118,7 @@ import { HudShell } from '../hud/hud-shell'
import { $terminalTakeover, setTerminalTakeover } from '../right-sidebar/store'
import { terminalPaletteToggle } from '../right-sidebar/terminal/reveal-focus'
import { $workspaceIsPage, WORKSPACE_PAGE_HEADER_AREA } from '../routes'
+import { Butterbar } from '../shell/butterbar'
import { BASIC_TREE, DEFAULT_TREE, registerLayoutPresets } from './layout-presets'
import { bindLayoutSides } from './layout-sides'
@@ -853,6 +854,9 @@ export function ContribController() {
statusBar.left/right contributions merged in. Unmounted — not
just hidden — while toggled off, so its 15s status poll and the
per-turn readouts stop with it. */}
+ {/* Notices registered through `registerButterbar` / `useButterbar`;
+ renders nothing while none are registered. */}
+ <Butterbar />
{statusbarVisible && <WiredPane part="statusbar" />}
</div>
</ContribWiring>
diff --git a/apps/desktop/src/app/shell/butterbar.css b/apps/desktop/src/app/shell/butterbar.css
new file mode 100644
index 00000000000..62ea4a49811
--- /dev/null
+++ b/apps/desktop/src/app/shell/butterbar.css
@@ -0,0 +1,138 @@
+/* One tint drives the whole bar. A tone picks a palette token; a custom
+ `color` sets --bb-tint inline. Every other color is mixed from that tint
+ against the live theme (chrome + foreground), so any hue lands readable in
+ light and dark without per-theme overrides. */
+[data-slot='butterbar'] {
+ --bb-tint: var(--ui-accent);
+ /* How hard the fill leans into the tint. Dark chrome needs more of it to
+ read as a band; light chrome saturates fast. */
+ --bb-mix: 17%;
+ --bb-bg: color-mix(in oklab, var(--bb-tint) var(--bb-mix), var(--ui-bg-chrome));
+ /* Text and links mix toward the theme foreground, never a fixed white or
+ black: amber darkens on light paper and lifts on dark. */
+ --bb-fg: color-mix(in oklab, var(--bb-tint) 38%, var(--ui-text-secondary));
+ --bb-link: color-mix(in oklab, var(--bb-tint) 62%, var(--foreground));
+ --bb-edge: color-mix(in oklab, var(--bb-tint) 26%, transparent);
+ --bb-hover: color-mix(in oklab, var(--bb-tint) 18%, transparent);
+ --bb-dot: color-mix(in oklab, var(--bb-fg) 34%, transparent);
+ --bb-dot-active: var(--bb-link);
+ --ref-color: var(--bb-link);
+
+ background: var(--bb-bg);
+ /* Hairlines on both edges separate it from the workspace above and the
+ statusbar below, which share the chrome color. */
+ box-shadow:
+ inset 0 1px 0 var(--bb-edge),
+ inset 0 -1px 0 color-mix(in oklab, var(--bb-tint) 10%, transparent);
+ color: var(--bb-fg);
+}
+
+:where(:root.dark) [data-slot='butterbar'] {
+ --bb-mix: 20%;
+ --bb-fg: color-mix(in oklab, var(--bb-tint) 34%, var(--ui-text-secondary));
+ --bb-link: color-mix(in oklab, var(--bb-tint) 55%, var(--foreground));
+}
+
+[data-slot='butterbar'][data-tone='info'] {
+ --bb-tint: var(--ui-blue);
+}
+
+[data-slot='butterbar'][data-tone='success'] {
+ --bb-tint: var(--ui-green);
+}
+
+[data-slot='butterbar'][data-tone='warn'] {
+ --bb-tint: var(--ui-yellow);
+}
+
+[data-slot='butterbar'][data-tone='danger'] {
+ --bb-tint: var(--ui-red);
+}
+
+/* Neutral is a quiet step off the chrome: no hue, the links carry it. */
+[data-slot='butterbar'][data-tone='neutral'] {
+ --bb-tint: var(--foreground);
+ --bb-mix: 5%;
+ --bb-fg: var(--ui-text-tertiary);
+ --bb-link: var(--ui-text-secondary);
+ --bb-edge: var(--ui-stroke-quaternary);
+ --bb-hover: var(--chrome-action-hover);
+}
+
+:where(:root.dark) [data-slot='butterbar'][data-tone='neutral'] {
+ --bb-mix: 7%;
+}
+
+/* Solid paints the tint itself. Text picks black or white from the tint's own
+ lightness (relative color), then leans a little back toward the tint so it
+ sits in the band instead of punching out of it. */
+[data-slot='butterbar'][data-variant='solid'] {
+ --bb-on: oklch(from var(--bb-tint) clamp(0, (0.62 - l) * 1000, 1) 0 0);
+ --bb-bg: var(--bb-tint);
+ --bb-fg: color-mix(in oklab, var(--bb-on) 88%, var(--bb-tint));
+ --bb-link: var(--bb-on);
+ --bb-edge: transparent;
+ --bb-hover: color-mix(in oklab, var(--bb-on) 16%, transparent);
+ --bb-dot: color-mix(in oklab, var(--bb-on) 38%, transparent);
+
+ box-shadow: none;
+}
+
+[data-slot='butterbar'][data-variant='solid'][data-tone='neutral'] {
+ --bb-tint: color-mix(in oklab, var(--foreground) 88%, var(--ui-bg-chrome));
+}
+
+[data-slot='butterbar'] a {
+ color: var(--bb-link);
+ font-weight: 500;
+ text-decoration: underline;
+ text-decoration-color: color-mix(in oklab, currentColor 35%, transparent);
+ text-underline-offset: 0.2em;
+ transition: text-decoration-color 150ms ease-out;
+}
+
+[data-slot='butterbar'] a:hover {
+ text-decoration-color: currentColor;
+ transition: none;
+}
+
+.butterbar-dot > span {
+ width: 0.3125rem;
+ height: 0.3125rem;
+ border-radius: 999px;
+ background: var(--bb-dot);
+ transition:
+ width 200ms ease-out,
+ background-color 150ms ease-out;
+}
+
+.butterbar-dot:hover > span {
+ background: color-mix(in oklab, var(--bb-dot-active) 70%, transparent);
+ transition: width 200ms ease-out;
+}
+
+.butterbar-dot[aria-current='true'] > span {
+ width: 0.75rem;
+ background: var(--bb-dot-active);
+}
+
+@keyframes butterbar-in {
+ from {
+ opacity: 0;
+ transform: translateY(40%);
+ }
+}
+
+.butterbar-slide {
+ animation: butterbar-in 240ms cubic-bezier(0.2, 0.9, 0.25, 1);
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .butterbar-slide {
+ animation: none;
+ }
+
+ .butterbar-dot > span {
+ transition: none;
+ }
+}
diff --git a/apps/desktop/src/app/shell/butterbar.tsx b/apps/desktop/src/app/shell/butterbar.tsx
new file mode 100644
index 00000000000..ed9784aec0f
--- /dev/null
+++ b/apps/desktop/src/app/shell/butterbar.tsx
@@ -0,0 +1,115 @@
+import './butterbar.css'
+
+import { useStore } from '@nanostores/react'
+import { type CSSProperties, useEffect, useState } from 'react'
+
+import { Button } from '@/components/ui/button'
+import { Codicon } from '@/components/ui/codicon'
+import { useI18n } from '@/i18n'
+import { $butterbarItems, type ButterbarItem, dismissButterbar, isButterbarCloseable } from '@/store/butterbar'
+
+const DEFAULT_DWELL_MS = 3000
+
+/** Full-width notice strip above the statusbar. Reads the butterbar store, so
+ * any module can put a notice here with `registerButterbar` — no props. One
+ * item shows bare; several rotate with dots and pause while hovered. */
+export function Butterbar() {
+ const items = useStore($butterbarItems)
+ const [activeId, setActiveId] = useState<null | string>(null)
+ const [paused, setPaused] = useState(false)
+ const index = Math.max(0, items.findIndex(item => item.id === activeId))
+ const item = items[index]
+ const multiple = items.length > 1
+
+ useEffect(() => {
+ if (!multiple || paused || !item) {
+ return
+ }
+
+ const timer = window.setTimeout(
+ () => setActiveId(items[(index + 1) % items.length].id),
+ item.durationMs ?? DEFAULT_DWELL_MS
+ )
+
+ return () => window.clearTimeout(timer)
+ }, [index, item, items, multiple, paused])
+
+ if (!item) {
+ return null
+ }
+
+ return (
+ <div
+ className="grid h-6 shrink-0 grid-cols-[1fr_minmax(0,max-content)_1fr] items-center gap-2 px-2.5 text-[0.6875rem] leading-4 [-webkit-app-region:no-drag]"
+ data-slot="butterbar"
+ data-tone={item.tone ?? 'accent'}
+ data-variant={item.variant ?? 'soft'}
+ onBlur={() => setPaused(false)}
+ onFocus={() => setPaused(true)}
+ onPointerEnter={() => setPaused(true)}
+ onPointerLeave={() => setPaused(false)}
+ role="region"
+ style={item.color ? ({ '--bb-tint': item.color } as CSSProperties) : undefined}
+ >
+ <span aria-hidden />
+ <div
+ aria-live={multiple ? 'off' : 'polite'}
+ className="butterbar-slide flex min-w-0 items-center justify-center gap-1.5"
+ key={multiple ? item.id : undefined}
+ >
+ {item.icon && <span className="flex shrink-0 items-center opacity-80">{item.icon}</span>}
+ <div className="min-w-0 truncate">{item.node}</div>
+ </div>
+ <div className="flex min-w-0 items-center justify-end gap-1">
+ {multiple && <ButterbarDots activeIndex={index} items={items} onSelect={setActiveId} />}
+ {isButterbarCloseable(item) && <ButterbarClose item={item} />}
+ </div>
+ </div>
+ )
+}
+
+function ButterbarDots({
+ activeIndex,
+ items,
+ onSelect
+}: {
+ activeIndex: number
+ items: readonly ButterbarItem[]
+ onSelect: (id: string) => void
+}) {
+ const copy = useI18n().t.butterbar
+
+ return (
+ <div className="flex shrink-0 items-center">
+ {items.map((entry, i) => (
+ <button
+ aria-current={i === activeIndex}
+ aria-label={copy.goTo(i + 1, items.length)}
+ className="butterbar-dot grid h-6 cursor-pointer place-items-center px-[0.1875rem]"
+ key={entry.id}
+ onClick={() => onSelect(entry.id)}
+ type="button"
+ >
+ <span />
+ </button>
+ ))}
+ </div>
+ )
+}
+
+function ButterbarClose({ item }: { item: ButterbarItem }) {
+ const { t } = useI18n()
+
+ return (
+ <Button
+ aria-label={t.common.close}
+ className="-mr-1 size-5 text-(--bb-fg) hover:bg-(--bb-hover) hover:text-(--bb-link)"
+ onClick={() => dismissButterbar(item)}
+ size="icon-xs"
+ type="button"
+ variant="ghost"
+ >
+ <Codicon name="close" size="0.75rem" />
+ </Button>
+ )
+}
diff --git a/apps/desktop/src/i18n/ar.ts b/apps/desktop/src/i18n/ar.ts
index c7d64ce41e0..a6cf824bc54 100644
--- a/apps/desktop/src/i18n/ar.ts
+++ b/apps/desktop/src/i18n/ar.ts
@@ -21,6 +21,7 @@ export const ar = defineLocale({
boot: arBoot.boot,
notifications: arDiagnostics.notifications,
remoteDisplayBanner: arBoot.remoteDisplayBanner,
+ butterbar: arBoot.butterbar,
titlebar: arChrome.titlebar,
keybinds: arChrome.keybinds,
language: arSettings.language,
diff --git a/apps/desktop/src/i18n/ar_boot.ts b/apps/desktop/src/i18n/ar_boot.ts
index 4a2995df2b7..bccfc5bc9da 100644
--- a/apps/desktop/src/i18n/ar_boot.ts
+++ b/apps/desktop/src/i18n/ar_boot.ts
@@ -57,6 +57,9 @@ export const arBoot = {
remoteDisplayBanner: {
message: reason => `العرض البرمجي نشط — تم اكتشاف شاشة بعيدة (${reason}). تم تعطيل تسريع GPU لمنع الوميض.`
},
+ butterbar: {
+ goTo: (index, total) => `عرض الإشعار ${index} من ${total}`
+ },
updates: {
discontinuedTitle: 'لم يعد إصدار Hermes هذا مدعومًا',
discontinuedBody: 'لم يعد إصدار Hermes هذا مدعومًا وقد يتوقف عن العمل — ألغِ تثبيته. ستبقى بياناتك على القرص.',
@@ -326,5 +329,5 @@ export const arBoot = {
}
} satisfies Pick<
TranslationOverrides,
- 'boot' | 'remoteDisplayBanner' | 'updates' | 'guidedGreeting' | 'install' | 'onboarding'
+ 'boot' | 'remoteDisplayBanner' | 'butterbar' | 'updates' | 'guidedGreeting' | 'install' | 'onboarding'
>
diff --git a/apps/desktop/src/i18n/de.ts b/apps/desktop/src/i18n/de.ts
index 7b7c7e3531b..679e01991b0 100644
--- a/apps/desktop/src/i18n/de.ts
+++ b/apps/desktop/src/i18n/de.ts
@@ -3,6 +3,7 @@ import { defineFieldCopy } from '@/app/settings/field-copy'
import { deAuxTasks } from './de_aux_tasks'
import { deBoot } from './de_boot'
import { deModelMenu } from './de_model_menu'
+import { deNotices } from './de_notices'
import { deSharedMetrics } from './de_shared_metrics'
import { defineLocale, type TranslationOverrides } from './define-locale'
import { introDe } from './intro-de'
@@ -509,10 +510,7 @@ export const deOverrides = {
creditsTitle: 'Credits'
}
},
- remoteDisplayBanner: {
- message: reason =>
- `Software-Rendering aktiv — Remote-Display erkannt (${reason}). GPU-Beschleunigung ist deaktiviert, um Flackern zu verhindern.`
- },
+ ...deNotices,
billingBlock: {
titleNous: 'Keine Nous-Credits mehr',
titleProvider: provider => `Keine Credits mehr — ${provider}`,
diff --git a/apps/desktop/src/i18n/de_notices.ts b/apps/desktop/src/i18n/de_notices.ts
new file mode 100644
index 00000000000..d861ddd33d2
--- /dev/null
+++ b/apps/desktop/src/i18n/de_notices.ts
@@ -0,0 +1,12 @@
+import type { TranslationOverrides } from './define-locale'
+
+// Shell notices (remote-display toast, butterbar), spread into de.ts.
+export const deNotices = {
+ remoteDisplayBanner: {
+ message: reason =>
+ `Software-Rendering aktiv — Remote-Display erkannt (${reason}). GPU-Beschleunigung ist deaktiviert, um Flackern zu verhindern.`
+ },
+ butterbar: {
+ goTo: (index, total) => `Hinweis ${index} von ${total} anzeigen`
+ }
+} satisfies Pick<TranslationOverrides, 'remoteDisplayBanner' | 'butterbar'>
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index 49071605d69..4e30da689cb 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -3,6 +3,7 @@ import { FIELD_DESCRIPTIONS, FIELD_LABELS } from '@/app/settings/constants'
import { enAuxTasks } from './en_aux_tasks'
import { enBoot } from './en_boot'
import { enModelMenu } from './en_model_menu'
+import { enNotices } from './en_notices'
import { enSharedMetrics } from './en_shared_metrics'
import type { Translations } from './types'
@@ -500,10 +501,7 @@ export const en: Translations = {
}
},
- remoteDisplayBanner: {
- message: reason =>
- `Software rendering active — remote display detected (${reason}). GPU acceleration is disabled to prevent flickering.`
- },
+ ...enNotices,
billingBlock: {
titleNous: 'Out of Nous credits',
diff --git a/apps/desktop/src/i18n/en_notices.ts b/apps/desktop/src/i18n/en_notices.ts
new file mode 100644
index 00000000000..63988104280
--- /dev/null
+++ b/apps/desktop/src/i18n/en_notices.ts
@@ -0,0 +1,12 @@
+import type { Translations } from './types'
+
+// Shell notices (remote-display toast, butterbar), spread into en.ts.
+export const enNotices = {
+ remoteDisplayBanner: {
+ message: reason =>
+ `Software rendering active — remote display detected (${reason}). GPU acceleration is disabled to prevent flickering.`
+ },
+ butterbar: {
+ goTo: (index, total) => `Show notice ${index} of ${total}`
+ }
+} satisfies Pick<Translations, 'remoteDisplayBanner' | 'butterbar'>
diff --git a/apps/desktop/src/i18n/es.ts b/apps/desktop/src/i18n/es.ts
index d5a2b95afa0..5557514ceca 100644
--- a/apps/desktop/src/i18n/es.ts
+++ b/apps/desktop/src/i18n/es.ts
@@ -4,6 +4,7 @@ import { defineLocale, type TranslationOverrides } from './define-locale'
import { esAuxTasks } from './es_aux_tasks'
import { esBoot } from './es_boot'
import { esModelMenu } from './es_model_menu'
+import { esNotices } from './es_notices'
import { esSharedMetrics } from './es_shared_metrics'
import { introEs } from './intro-es'
@@ -512,10 +513,7 @@ export const esOverrides = {
creditsTitle: 'Créditos'
}
},
- remoteDisplayBanner: {
- message: reason =>
- `Renderizado por software activo — se detectó una pantalla remota (${reason}). Se desactivó la aceleración por GPU para evitar parpadeos.`
- },
+ ...esNotices,
billingBlock: {
titleNous: 'Sin créditos de Nous',
titleProvider: provider => `Sin créditos — ${provider}`,
diff --git a/apps/desktop/src/i18n/es_notices.ts b/apps/desktop/src/i18n/es_notices.ts
new file mode 100644
index 00000000000..f69691e8d23
--- /dev/null
+++ b/apps/desktop/src/i18n/es_notices.ts
@@ -0,0 +1,12 @@
+import type { TranslationOverrides } from './define-locale'
+
+// Shell notices (remote-display toast, butterbar), spread into es.ts.
+export const esNotices = {
+ remoteDisplayBanner: {
+ message: reason =>
+ `Renderizado por software activo — se detectó una pantalla remota (${reason}). Se desactivó la aceleración por GPU para evitar parpadeos.`
+ },
+ butterbar: {
+ goTo: (index, total) => `Mostrar aviso ${index} de ${total}`
+ }
+} satisfies Pick<TranslationOverrides, 'remoteDisplayBanner' | 'butterbar'>
diff --git a/apps/desktop/src/i18n/fr.ts b/apps/desktop/src/i18n/fr.ts
index 728fbf80b29..cf5e860d128 100644
--- a/apps/desktop/src/i18n/fr.ts
+++ b/apps/desktop/src/i18n/fr.ts
@@ -4,6 +4,7 @@ import { defineLocale, type TranslationOverrides } from './define-locale'
import { frAuxTasks } from './fr_aux_tasks'
import { frBoot } from './fr_boot'
import { frModelMenu } from './fr_model_menu'
+import { frNotices } from './fr_notices'
import { frSharedMetrics } from './fr_shared_metrics'
import { introFr } from './intro-fr'
@@ -509,10 +510,7 @@ export const frOverrides = {
creditsTitle: 'Crédits'
}
},
- remoteDisplayBanner: {
- message: reason =>
- `Rendu logiciel actif — affichage distant détecté (${reason}). L'accélération GPU est désactivée pour éviter les scintillements.`
- },
+ ...frNotices,
billingBlock: {
titleNous: 'Plus de crédits Nous',
titleProvider: provider => `Plus de crédits — ${provider}`,
diff --git a/apps/desktop/src/i18n/fr_notices.ts b/apps/desktop/src/i18n/fr_notices.ts
new file mode 100644
index 00000000000..b5d6dfa5964
--- /dev/null
+++ b/apps/desktop/src/i18n/fr_notices.ts
@@ -0,0 +1,12 @@
+import type { TranslationOverrides } from './define-locale'
+
+// Shell notices (remote-display toast, butterbar), spread into fr.ts.
+export const frNotices = {
+ remoteDisplayBanner: {
+ message: reason =>
+ `Rendu logiciel actif — affichage distant détecté (${reason}). L'accélération GPU est désactivée pour éviter les scintillements.`
+ },
+ butterbar: {
+ goTo: (index, total) => `Afficher l'avis ${index} sur ${total}`
+ }
+} satisfies Pick<TranslationOverrides, 'remoteDisplayBanner' | 'butterbar'>
diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.ts
index 65af3bb6849..e120127dc88 100644
--- a/apps/desktop/src/i18n/ja.ts
+++ b/apps/desktop/src/i18n/ja.ts
@@ -4,6 +4,7 @@ import { defineLocale } from './define-locale'
import { introJa } from './intro-ja'
import { jaAuxTasks } from './ja_aux_tasks'
import { jaModelMenu } from './ja_model_menu'
+import { jaNotices } from './ja_notices'
import { jaPluginSettings } from './ja_plugins'
import { jaSharedMetrics } from './ja_shared_metrics'
@@ -259,10 +260,7 @@ export const ja = defineLocale({
}
},
- remoteDisplayBanner: {
- message: reason =>
- `ソフトウェアレンダリングが有効です — リモートディスプレイを検出しました(${reason})。ちらつきを防ぐため GPU アクセラレーションは無効化されています。`
- },
+ ...jaNotices,
billingBlock: {
titleNous: 'Nous クレジットが不足しています',
diff --git a/apps/desktop/src/i18n/ja_notices.ts b/apps/desktop/src/i18n/ja_notices.ts
new file mode 100644
index 00000000000..e73af9728b9
--- /dev/null
+++ b/apps/desktop/src/i18n/ja_notices.ts
@@ -0,0 +1,12 @@
+import type { TranslationOverrides } from './define-locale'
+
+// Shell notices (remote-display toast, butterbar), spread into ja.ts.
+export const jaNotices = {
+ remoteDisplayBanner: {
+ message: reason =>
+ `ソフトウェアレンダリングが有効です — リモートディスプレイを検出しました(${reason})。ちらつきを防ぐため GPU アクセラレーションは無効化されています。`
+ },
+ butterbar: {
+ goTo: (index, total) => `お知らせ ${index} / ${total} を表示`
+ }
+} satisfies Pick<TranslationOverrides, 'remoteDisplayBanner' | 'butterbar'>
diff --git a/apps/desktop/src/i18n/ru.ts b/apps/desktop/src/i18n/ru.ts
index 2e2d234dc46..eadcf0b4c30 100644
--- a/apps/desktop/src/i18n/ru.ts
+++ b/apps/desktop/src/i18n/ru.ts
@@ -3,6 +3,7 @@ import { defineFieldCopy } from '@/app/settings/field-copy'
import { defineLocale } from './define-locale'
import { ruAuxTasks } from './ru_aux_tasks'
import { ruModelMenu } from './ru_model_menu'
+import { ruNotices } from './ru_notices'
import { ruPluginSettings } from './ru_plugins'
import { ruSharedMetrics } from './ru_shared_metrics'
@@ -259,10 +260,7 @@ export const ru = defineLocale({
creditsTitle: 'Кредиты'
}
},
- remoteDisplayBanner: {
- message: reason =>
- `Включён программный рендеринг — обнаружен удалённый дисплей (${reason}). GPU-ускорение отключено, чтобы избежать мерцания.`
- },
+ ...ruNotices,
billingBlock: {
titleNous: 'Кредиты Nous закончились',
diff --git a/apps/desktop/src/i18n/ru_notices.ts b/apps/desktop/src/i18n/ru_notices.ts
new file mode 100644
index 00000000000..a013d4c573d
--- /dev/null
+++ b/apps/desktop/src/i18n/ru_notices.ts
@@ -0,0 +1,12 @@
+import type { TranslationOverrides } from './define-locale'
+
+// Shell notices (remote-display toast, butterbar), spread into ru.ts.
+export const ruNotices = {
+ remoteDisplayBanner: {
+ message: reason =>
+ `Включён программный рендеринг — обнаружен удалённый дисплей (${reason}). GPU-ускорение отключено, чтобы избежать мерцания.`
+ },
+ butterbar: {
+ goTo: (index, total) => `Показать уведомление ${index} из ${total}`
+ }
+} satisfies Pick<TranslationOverrides, 'remoteDisplayBanner' | 'butterbar'>
diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.ts
index 7beab2772f5..56852a3c0ff 100644
--- a/apps/desktop/src/i18n/types.ts
+++ b/apps/desktop/src/i18n/types.ts
@@ -11,6 +11,7 @@ import type { TipId } from '@/lib/tips/catalog'
import type { AuxTaskCopyMap } from './types_aux_tasks'
import type { BootTranslations } from './types_boot'
import type { ModelMenuTranslations } from './types_model_menu'
+import type { NoticeTranslations } from './types_notices'
import type { SharedMetricsTranslations } from './types_shared_metrics'
/** The locales compiled into the app (`TRANSLATIONS`). */
@@ -65,7 +66,7 @@ interface ModeOptionCopy {
description: string
}
-export interface Translations {
+export interface Translations extends NoticeTranslations {
/** Shared-metrics consent: first-run dialog + Settings › Safety toggles. */
sharedMetrics: SharedMetricsTranslations
externalOpenFailed: {
@@ -534,10 +535,6 @@ export interface Translations {
}
}
- remoteDisplayBanner: {
- message: (reason: string) => string
- }
-
billingBlock: {
titleNous: string
titleProvider: (provider: string) => string
diff --git a/apps/desktop/src/i18n/types_notices.ts b/apps/desktop/src/i18n/types_notices.ts
new file mode 100644
index 00000000000..3769298c73d
--- /dev/null
+++ b/apps/desktop/src/i18n/types_notices.ts
@@ -0,0 +1,11 @@
+// Shell notice strings: the remote-display toast and the butterbar; `Translations`
+// spreads this in.
+export interface NoticeTranslations {
+ remoteDisplayBanner: {
+ message: (reason: string) => string
+ }
+
+ butterbar: {
+ goTo: (index: number, total: number) => string
+ }
+}
diff --git a/apps/desktop/src/i18n/zh-hant.ts b/apps/desktop/src/i18n/zh-hant.ts
index 4d9368a0aca..ac21c12e369 100644
--- a/apps/desktop/src/i18n/zh-hant.ts
+++ b/apps/desktop/src/i18n/zh-hant.ts
@@ -73,6 +73,7 @@ export const zhHant = defineLocale({
boot: zhHantBoot.boot,
notifications: zhHantDiagnostics.notifications,
remoteDisplayBanner: zhHantBoot.remoteDisplayBanner,
+ butterbar: zhHantBoot.butterbar,
billingBlock: zhHantCommon.billingBlock,
sendDiagnostics: zhHantDiagnostics.sendDiagnostics,
titlebar: zhHantChrome.titlebar,
diff --git a/apps/desktop/src/i18n/zh-hant_boot.ts b/apps/desktop/src/i18n/zh-hant_boot.ts
index da4d14b460f..aa1387026e1 100644
--- a/apps/desktop/src/i18n/zh-hant_boot.ts
+++ b/apps/desktop/src/i18n/zh-hant_boot.ts
@@ -61,6 +61,9 @@ export const zhHantBoot = {
remoteDisplayBanner: {
message: reason => `軟體繪圖已啟用 — 偵測到遠端顯示(${reason})。為防止畫面閃爍,已停用 GPU 加速。`
},
+ butterbar: {
+ goTo: (index, total) => `顯示第 ${index} 則通知,共 ${total} 則`
+ },
updates: {
discontinuedTitle: '此版本的 Hermes 已停止支援',
@@ -332,5 +335,5 @@ export const zhHantBoot = {
}
} satisfies Pick<
TranslationOverrides,
- 'boot' | 'remoteDisplayBanner' | 'updates' | 'guidedGreeting' | 'install' | 'onboarding'
+ 'boot' | 'remoteDisplayBanner' | 'butterbar' | 'updates' | 'guidedGreeting' | 'install' | 'onboarding'
>
diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts
index e9416cc3185..f113ff13db6 100644
--- a/apps/desktop/src/i18n/zh.ts
+++ b/apps/desktop/src/i18n/zh.ts
@@ -4,6 +4,7 @@ import { defineLocale } from './define-locale'
import { introZh } from './intro-zh'
import { zhAuxTasks } from './zh_aux_tasks'
import { zhModelMenu } from './zh_model_menu'
+import { zhNotices } from './zh_notices'
import { zhSharedMetrics } from './zh_shared_metrics'
export const zh = defineLocale({
@@ -290,9 +291,7 @@ export const zh = defineLocale({
}
},
- remoteDisplayBanner: {
- message: reason => `软件渲染已启用 — 检测到远程显示(${reason})。为防止画面闪烁,已禁用 GPU 加速。`
- },
+ ...zhNotices,
billingBlock: {
titleNous: 'Nous 额度已用尽',
diff --git a/apps/desktop/src/i18n/zh_notices.ts b/apps/desktop/src/i18n/zh_notices.ts
new file mode 100644
index 00000000000..ea60ba7e601
--- /dev/null
+++ b/apps/desktop/src/i18n/zh_notices.ts
@@ -0,0 +1,11 @@
+import type { TranslationOverrides } from './define-locale'
+
+// Shell notices (remote-display toast, butterbar), spread into zh.ts.
+export const zhNotices = {
+ remoteDisplayBanner: {
+ message: reason => `软件渲染已启用 — 检测到远程显示(${reason})。为防止画面闪烁,已禁用 GPU 加速。`
+ },
+ butterbar: {
+ goTo: (index, total) => `显示第 ${index} 条通知,共 ${total} 条`
+ }
+} satisfies Pick<TranslationOverrides, 'remoteDisplayBanner' | 'butterbar'>
diff --git a/locales/_keys.desktop.json b/locales/_keys.desktop.json
index a0f44a82d0c..a533a9dde43 100644
--- a/locales/_keys.desktop.json
+++ b/locales/_keys.desktop.json
@@ -514,6 +514,7 @@
"boot.updateHold.title",
"boot.updateHold.titleUnverified",
"boot.updateHold.unverified",
+ "butterbar.goTo",
"commandCenter.actionDone",
"commandCenter.actionFailed",
"commandCenter.actionRunning",