diff --git a/branding/apply-branding.mjs b/branding/apply-branding.mjs index e1f3b3e..dd8a156 100644 --- a/branding/apply-branding.mjs +++ b/branding/apply-branding.mjs @@ -268,6 +268,10 @@ await patchFile("components/icons/icons.tsx", [{ // NOT rebuild), so rebrand/suppress it at render time. Generate a tiny runtime // helper from config, then route the notifications list through it. const N = CONFIG.notifications ?? { sanitize: true, suppressTypes: [] }; +// Only patch the notification pipeline if there's something to do. With +// sanitize=false and no suppressTypes the notification centre stays pure upstream +// — used now that the bell is admin-only and admins want unfiltered visibility. +if (N.sanitize || (N.suppressTypes && N.suppressTypes.length > 0)) { const runtime = `// AUTO-GENERATED by branding/apply-branding.mjs — do not edit by hand. // Runtime rebranding for backend-generated content (notification bell) that the // build-time codemod cannot reach. Driven by branding.config.json → notifications. @@ -309,6 +313,9 @@ await patchFile("hooks/useNotifications.ts", [ replace: ` return filterBrandedNotifications(\n data.flatMap((page) =>\n page.notifications.filter((notification) => {\n if (seenNotificationIds.has(notification.id)) {\n return false;\n }\n seenNotificationIds.add(notification.id);\n return true;\n })\n )\n );`, }, ]); +} else { + ok("notifications: filter disabled — admins see all notifications unmodified (pure upstream)"); +} // ── 3. String codemod (user-visible references) ───────────────────────────── step("3/4 String codemod"); diff --git a/branding/branding.config.json b/branding/branding.config.json index 97c53a9..907d5a0 100644 --- a/branding/branding.config.json +++ b/branding/branding.config.json @@ -1,20 +1,17 @@ { "$comment": "SINGLE SOURCE OF TRUTH for the Livtec / AIDO white-label of Onyx Community Edition. Edit values here, then run `node branding/apply-branding.mjs` and rebuild the web image. Values mirror the AIDO/Lobe white-label so the two products stay visually identical.", - "brand": { "name": "AIDO", "legalName": "Livtec AG", "poweredByHtml": "Powered by Livtec", "ogDescription": "Ein KI-Assistent, der genau auf Ihre Unternehmensdokumente abgestimmt ist." }, - "upstream": { "$comment": "Pin the exact Onyx release tag this overlay is authored against. `make setup` checks this out. Locked to a release NUMBER (e.g. v4.5.2), not a raw commit. The i18n patch below is re-synced against this exact tag, so it applies cleanly (see i18n). To move to a newer Onyx: re-sync the i18n patch onto the new tag, then bump this. When Onyx ships official i18n, bump this and set i18n.enabled=false.", "repo": "https://github.com/onyx-dot-app/onyx", "pinnedCommit": "v4.5.2", "webSrcRoot": "web" }, - "i18n": { "$comment": "TEMPORARY end-user internationalization, backported from Onyx PR #12558 (react-i18next; user UI only, Admin stays English) until the official feature ships. apply-branding.mjs git-applies `patch` onto the pinned checkout BEFORE the branding string codemod, then the codemod also rebrands Onyx->AIDO inside the bundled locale dictionaries. Fill/refine translations in web/public/locales//common.json. Set enabled=false to drop it once official i18n lands.", "enabled": true, @@ -22,12 +19,14 @@ "baseCommit": "v4.5.2", "defaultLanguage": "de", "rebrandLocales": true, - "languages": ["de", "en"], + "languages": [ + "de", + "en" + ], "$languages_comment": "Languages offered in the UI selector. Any of the PR's bundled languages NOT listed here (es/fr/pt) are stripped from i18n.ts + the Settings selector at apply time. To offer another language, add its code here AND a dictionary at dictionaries/.json.", "dictionaries": "branding/i18n/locales", "$dictionaries_comment": "Client-editable source dictionaries. After the patch is applied, apply-branding.mjs copies dictionaries/.json over web/public/locales//common.json — so edits here PERSIST across `make setup` (they're the source of truth, not the patch). Edit branding/i18n/locales/de.json to add/refine German (see MISSING-de.md for untranslated keys), then `make apply && make build`." }, - "build": { "$comment": "As of 2026-07, Onyx's web Dockerfile bases on Docker Hardened Images (dhi.io/node:*), a paid Docker offering that requires a DHI subscription + `docker login dhi.io` — so `make build` fails with a registry login error for anyone without DHI access. The apply step rewrites those FROM lines to the equivalent PUBLIC Docker Hub node images (Debian 13 / glibc, matching the DHI variant the Dockerfile targets), so the branded image builds with no login. Keys = the dhi.io image ref (the trailing @sha256 digest, if any, is stripped automatically); values = the public replacement. No-op (with a warning) if the DHI lines are absent, so this stays safe across upstream changes.", "baseImageReplacements": { @@ -35,7 +34,6 @@ "dhi.io/node:24-debian13": "docker.io/library/node:24-trixie-slim" } }, - "assets": { "$comment": "Remote source URLs are fetched at apply time into onyx/web/public/branding/. If a fetch fails (e.g. offline), the apply script keeps any existing committed file in branding/assets/ as a fallback.", "mark": { @@ -54,7 +52,6 @@ "note": "Browser tab icon. Replaces the default /onyx.ico reference." } }, - "links": { "$comment": "Maps Onyx's hardcoded link constants to Livtec destinations. DOCS_BASE_URL drives most in-app documentation links; deep sub-paths (e.g. /admins) consolidate to this root.", "docsBaseUrl": "https://portal.livtec.cloud", @@ -65,15 +62,15 @@ "blog": "https://livtec.cloud/blog/", "changelog": "https://livtec.cloud/" }, - "emails": { "business": "hello@livtec.cloud", "support": "support@livtec.cloud" }, - "rename": { "$comment": "Drives the user-visible string codemod. `word` replaces standalone, capitalised whole-word matches of \\bOnyx\\b only — camelCase identifiers (OnyxDocument, SvgOnyxLogo), lowercase package refs (@onyx, onyx.app, onyx.ico) are never touched. `literals` are exact-string replacements applied before the word pass for multi-word brand terms.", - "word": { "Onyx": "AIDO" }, + "word": { + "Onyx": "AIDO" + }, "literals": { "Open Source AI Platform": "Powered by Livtec", "https://docs.onyx.app": "https://portal.livtec.cloud", @@ -83,15 +80,9 @@ "@onyx.app administrators": "@livtec.cloud administrators" } }, - "notifications": { - "$comment": "The notification bell content is generated by the backend (official onyx-backend image we do NOT rebuild), so it is rebranded at render time in the web image. `sanitize` rewrites any 'Onyx' in a notification's title/description to the brand name. `suppressTypes` hides whole notification categories that are upstream/EE product messaging irrelevant to a white-labeled CE deployment (e.g. the permissions-migration announcement and license/trial warnings). Operational notifications (reindex, approvals, connector errors, scheduled tasks) are kept. Empty the list to show everything (still sanitized). NOTE: the notification centre (bell + panel) is also hidden for non-admin end users via the i18n patch (AccountPopover → canSeeNotifications); admins/curators still see it. To show it for everyone, remove that gate from the patch.", - "sanitize": true, - "suppressTypes": [ - "feature_announcement", - "release_notes", - "license_expiry_warning", - "two_day_trial_ending" - ] + "$comment": "Notification centre is now admin-only (hidden for non-admins via the i18n patch). Admins want full, unmodified visibility, so filtering is OFF: sanitize=false + empty suppressTypes => apply-branding.mjs skips patching useNotifications entirely and notifications render straight from the backend. To re-enable rebrand/suppression, set sanitize=true and/or list suppressTypes.", + "sanitize": false, + "suppressTypes": [] } } diff --git a/branding/i18n/end-user-i18n.patch b/branding/i18n/end-user-i18n.patch index 885143a..a95f648 100644 --- a/branding/i18n/end-user-i18n.patch +++ b/branding/i18n/end-user-i18n.patch @@ -11546,7 +11546,7 @@ index 28d376ef..4df8a551 100644 ); diff --git a/web/src/layouts/chromes/AppChrome.tsx b/web/src/layouts/chromes/AppChrome.tsx -index 2ecb033e..72c56150 100644 +index 2ecb033e..2c92244e 100644 --- a/web/src/layouts/chromes/AppChrome.tsx +++ b/web/src/layouts/chromes/AppChrome.tsx @@ -9,6 +9,7 @@ import { @@ -11565,6 +11565,51 @@ index 2ecb033e..72c56150 100644 const appFocus = useAppFocus(); const businessTier = useTierAtLeast(Tier.BUSINESS); const { state, setAppMode } = useQueryController(); +@@ -247,7 +249,7 @@ function Header() { + sizePreset="main-ui" + rounding="sm" + icon={SvgChevronLeft} +- title="Export As…" ++ title={t("chat.header.export_as", "Export As…")} + onClick={noProp(() => setShowExportOptions(false))} + />, + +@@ -255,7 +257,7 @@ function Header() { + sizePreset="main-ui" + rounding="sm" + icon={SvgFileText} +- title="Plaintext" ++ title={t("chat.header.plaintext", "Plaintext")} + onClick={noProp(() => handleExport("text"))} + /> + , +@@ -264,7 +266,7 @@ function Header() { + sizePreset="main-ui" + rounding="sm" + icon={SvgHash} +- title="Markdown" ++ title={t("chat.header.markdown", "Markdown")} + onClick={noProp(() => handleExport("markdown"))} + /> + , +@@ -276,7 +278,7 @@ function Header() { + sizePreset="main-ui" + rounding="sm" + icon={SvgFolderIn} +- title="Move to Project" ++ title={t("chat.header.move_to_project", "Move to Project")} + onClick={noProp(() => setShowMoveOptions(true))} + />, + setShowExportOptions(true))} + />, + null, @@ -294,7 +296,7 @@ function Header() { rounding="sm" color="danger" @@ -11610,6 +11655,22 @@ index 2ecb033e..72c56150 100644 description="Conversation and research" onClick={noProp(() => { setAppMode("chat"); +@@ -466,13 +468,13 @@ function Header() { + onClick={() => setShowShareModal(true)} + aria-label="share-chat-button" + > +- Share ++ {t("chat.header.share", "Share")} + + +diff --git a/web/src/sections/modals/AgentViewerModal.tsx b/web/src/sections/modals/AgentViewerModal.tsx +index cab609ce..a073b0b0 100644 +--- a/web/src/sections/modals/AgentViewerModal.tsx ++++ b/web/src/sections/modals/AgentViewerModal.tsx +@@ -1,5 +1,7 @@ + "use client"; + ++import { useTranslation } from "react-i18next"; ++ + import { useCallback, useMemo, useState } from "react"; + import { useRouter } from "next/navigation"; + import type { Route } from "next"; +@@ -169,6 +171,7 @@ export interface AgentViewerModalProps { + agent: FullAgent; + } + export default function AgentViewerModal({ agent }: AgentViewerModalProps) { ++ const { t } = useTranslation(); + const agentViewerModal = useModal(); + const router = useRouter(); + const { allRecentFiles } = useProjectsContext(); +@@ -251,7 +254,7 @@ export default function AgentViewerModal({ agent }: AgentViewerModalProps) { + {agent.is_featured && ( + +
+ +@@ -306,13 +309,13 @@ export default function AgentViewerModal({ agent }: AgentViewerModalProps) { + })} +
+ ) : ( +- ++ + )} + + + {/* Actions & Tools */} + +- ++ + + {hasActions ? ( +
+@@ -328,7 +331,7 @@ export default function AgentViewerModal({ agent }: AgentViewerModalProps) { + ))} +
+ ) : ( +- ++ + )} +
+
+@@ -336,12 +339,12 @@ export default function AgentViewerModal({ agent }: AgentViewerModalProps) { + {/* More Info (Collapsible) */} + + +- ++ + +
+ {agent.system_prompt && ( + + )} + + +diff --git a/web/src/sections/modals/CreateProjectModal.tsx b/web/src/sections/modals/CreateProjectModal.tsx +index 257eafc9..af7fddfc 100644 +--- a/web/src/sections/modals/CreateProjectModal.tsx ++++ b/web/src/sections/modals/CreateProjectModal.tsx +@@ -1,5 +1,7 @@ + "use client"; + ++import { useTranslation } from "react-i18next"; ++ + import { Formik, Form } from "formik"; + import * as Yup from "yup"; + import { Button } from "@opal/components"; +@@ -22,6 +24,7 @@ interface CreateProjectModalProps { + export default function CreateProjectModal({ + initialProjectName, + }: CreateProjectModalProps) { ++ const { t } = useTranslation(); + const { createProject } = useProjectsContext(); + const modal = useModal(); + const route = useAppRouter(); +@@ -31,8 +34,8 @@ export default function CreateProjectModal({ + + modal.toggle(false)} + /> + ( +
+ +- ++ + + +@@ -70,10 +73,10 @@ export default function CreateProjectModal({ + type="button" + onClick={() => modal.toggle(false)} + > +- Cancel ++ {t("general.cancel", "Cancel")} + + + + diff --git a/web/src/sections/modals/ShareChatSessionModal.tsx b/web/src/sections/modals/ShareChatSessionModal.tsx index 66a7a6b1..bc7f79d6 100644 --- a/web/src/sections/modals/ShareChatSessionModal.tsx @@ -13517,6 +13742,54 @@ index dbd41f2c..d4e5c45e 100644 { +@@ -295,7 +301,7 @@ export default function ProjectChatSessionList() { +
+
+ +- Recent Chats ++ {t("projects.recent_chats", "Recent Chats")} + +
+ diff --git a/web/src/sections/projects/ProjectContextPanel.tsx b/web/src/sections/projects/ProjectContextPanel.tsx index 590bfbf9..28cfde96 100644 --- a/web/src/sections/projects/ProjectContextPanel.tsx @@ -14237,7 +14510,7 @@ index 0a8b2597..24140167 100644 )} diff --git a/web/src/views/AgentEditorPage.tsx b/web/src/views/AgentEditorPage.tsx -index 9325a2e0..48049521 100644 +index 9325a2e0..7c44e4a0 100644 --- a/web/src/views/AgentEditorPage.tsx +++ b/web/src/views/AgentEditorPage.tsx @@ -1,6 +1,7 @@ @@ -14291,7 +14564,30 @@ index 9325a2e0..48049521 100644 variant="internal" searchIcon value={query} -@@ -547,6 +550,7 @@ export default function AgentEditorPage({ +@@ -447,6 +450,7 @@ function MCPServerCard({ + } + + function AgentStarterMessages() { ++ const { t } = useTranslation(); + const max_starters = STARTER_MESSAGES_EXAMPLES.length; + + const { values } = useFormikContext<{ +@@ -476,10 +480,10 @@ function AgentStarterMessages() { + arrayHelpers.remove(i)} + /> + ))} +@@ -547,6 +551,7 @@ export default function AgentEditorPage({ agent: existingAgent, refreshAgent, }: AgentEditorPageProps) { @@ -14299,7 +14595,7 @@ index 9325a2e0..48049521 100644 const router = useRouter(); const appRouter = useAppRouter(); const { refresh: refreshAgents } = useAgents(); -@@ -1224,8 +1228,8 @@ export default function AgentEditorPage({ +@@ -1224,8 +1229,8 @@ export default function AgentEditorPage({ { const rf = allRecentFiles.find( -@@ -1296,7 +1300,7 @@ export default function AgentEditorPage({ +@@ -1296,7 +1301,7 @@ export default function AgentEditorPage({ {deleteAgentModal.isOpen && ( Delete Agent -@@ -1319,7 +1323,7 @@ export default function AgentEditorPage({ +@@ -1319,7 +1324,7 @@ export default function AgentEditorPage({ @@ -14348,7 +14644,7 @@ index 9325a2e0..48049521 100644
-@@ -1377,21 +1383,28 @@ export default function AgentEditorPage({ +@@ -1377,21 +1384,28 @@ export default function AgentEditorPage({ alignItems="start" > @@ -14382,7 +14678,7 @@ index 9325a2e0..48049521 100644 />
-@@ -1399,7 +1412,7 @@ export default function AgentEditorPage({ +@@ -1399,7 +1413,7 @@ export default function AgentEditorPage({ -@@ -1414,13 +1427,13 @@ export default function AgentEditorPage({ +@@ -1414,13 +1428,13 @@ export default function AgentEditorPage({ } -@@ -1429,9 +1442,9 @@ export default function AgentEditorPage({ +@@ -1429,9 +1443,9 @@ export default function AgentEditorPage({ -@@ -1496,15 +1509,15 @@ export default function AgentEditorPage({ +@@ -1496,15 +1510,15 @@ export default function AgentEditorPage({ height="auto" >