Commit graph

16 commits

Author SHA1 Message Date
fa1f82767c Find/Replace
"Open-Source-KI-Plattform": "Powered by Livtec",
2026-11-10 19:31:25 +01:00
145725b6b1 Fix v5.0.3 build: type-safe notification gate + robust SMB overlay
Two issues from the client's make rebrand on v5.0.3:

1. TypeScript build failed (implicit-any in AccountPopover): the
   conditional-spread notification item lost contextual typing. Reworked
   to leave useSettingsItems untouched (compiles as upstream) and instead
   drop the "notifications" row in the component for non-admins:
   const items = isAdmin ? rawItems : rawItems.map(group =>
     filter out row.id === "notifications"). Uses only standard narrowing
   (item.kind, row.id), so no fragile typing. Still gates on isAdmin.

2. SMB UI patch did not apply: git-apply is brittle about context lines
   and re-runs (make rebrand does not re-clone). Converted the SMB
   overlay from a git-apply .patch to string-anchored patchFile edits
   (same mechanism as the other overlays) — idempotent and tolerant of
   context drift. Removed the now-unused branding/smb/smb-ui.patch.

Verified every anchor against the real v5.0.3 sources; v5's own SearchCard
already reads document.metadata, confirming the metadata access type-checks.
2026-11-10 16:34:42 +01:00
2c42e9fd03 Upgrade to Onyx v5.0.3; gate notifications on full-admin only
- Pin upstream to v5.0.3 (branding/branding.config.json).
- Notifications: gate on isAdmin (FULL_ADMIN_PANEL_ACCESS) instead of
  hasAdminAccess. hasAdminAccess also returns true for group/agent
  managers, so manage-agents users were still seeing the bell/panel. Now
  only full admins see notifications; everyone else gets nothing.
  Re-authored for v5's refactored AccountPopover (useSettingsItems hook +
  Dropdown views model): hide the notifications menu row and the account-
  button unread badge for non-admins.
- Re-sync the overlay onto v5.0.3:
  - smb-ui.patch regenerated (v5 moved the doc types and uses
    openExternalLink); still 2 files, keyed on metadata.smb_source,
    applies clean.
  - SettingsPage language limit re-synced to v5's LOCALE_OPTIONS spread
    (was SUPPORTED_LOCALES.map).
  - Verified against v5.0.3: all patch anchors match, icons regex matches,
    logo/favicon target paths exist.
2026-11-09 21:39:49 +01:00
Naeem Dosh
01be9421df Upgrade to Onyx v4.8.2; drop dead badge fix; refresh connector docs
- Pin upstream to v4.8.2 (better official translations). Branding overlay
  re-verified: logos, favicon, Onyx->AIDO codemod (incl. the official
  next-intl catalogs, now 9 locales with Arabic), notification-hide, and
  de/en language limiting all apply clean and type-check.
- Re-sync smb-ui.patch onto v4.8.2 and remove the "Initial Indexing"
  badge hunk: connectors now ingest as the File source, which reports
  status correctly on its own, so the hunk was dead. The patch is now two
  files (chat citation + licensed Search), keyed on metadata.smb_source.
- Refresh the SMB connector docs to the current design: File-source
  ingestion (chat-searchable), the full extension set, the per-source
  index document and per-connector group access, and the UI overlay that
  copies the full path. Fix stale ingestion_api / v4.5.2 references and a
  trailing-whitespace nit in the connector payload.

DHI is a no-op on v4.8.2 (Dockerfile defaults to public node images).
2026-09-30 17:44:57 +05:00
Naeem Dosh
7297f18d15 Upgrade to Onyx v4.7.2; drop temporary i18n overlay
- Pin upstream to v4.7.2 and use its official next-intl i18n (German
  included); disable the temporary react-i18next backport.
- Extend the string codemod to rebrand Onyx->AIDO inside the official
  next-intl message catalogs (web/src/i18n/messages/*.json).
- Re-sync the SMB UI overlay patch onto v4.7.2 (path-copy for cited SMB
  documents + the ingestion_api "Initial Indexing" status fix).
- Re-add notification-hide-for-non-admins and de/en language limiting as
  string-based targeted patches in apply-branding.mjs, so they survive
  future version bumps (no more brittle patch files for these).
- DHI base-image swap is now a no-op: v4.7.2 defaults to public node
  images (DHI is a CI-only build-arg override).
2026-09-16 17:02:28 +05:00
Naeem Dosh
ab646927ed SMB Phase 2: suppress broken preview for SMB docs, copy logical path
Frontend overlay (folds into the white-label apply step). Documents synced from
SMB shares (source=ingestion_api) have no browsable file, so Onyx's preview click
was a dead end. openDocument now, for ingestion_api docs, copies the logical
network path (semantic_identifier, e.g. \\company\share\file) to the clipboard
with a toast instead of attempting a broken preview. Single change at the shared
click chokepoint, so it covers the document sidebar + citations.

- branding/smb/smb-ui.patch: the utils.ts change (applies clean to v4.5.2 and on
  top of the i18n patch; order-independent).
- apply-branding.mjs: new step 0b applies it (gated by smbUi.enabled, idempotent
  via a marker), before the codemod.
- branding.config.json: smbUi block.

Verified: full apply green (i18n + SMB + branding), idempotent re-apply, no
conflict markers. Compile build in progress.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-08 23:40:43 +05:00
dfbac553ff chore(branding): add B→SS and R→ss replacement mappings
Adds two additional string replacement rules to `branding/branding.config.json`:

- `"B": "SS"`
- `"R": "ss"`

These mappings supplement the existing Onyx → Livtec branding rules.
2026-08-20 11:14:21 +02:00
NaeemDosh
6ea23b97e7 i18n: remove notification filter (admin=full), fix selected-tool + agent-filter labels, translate projects/agent-viewer/chat-header
Client feedback round:
- Notifications: removed the sanitize/suppress filter entirely. sanitize=false +
  empty suppressTypes => apply-branding.mjs now SKIPS patching useNotifications, so
  the (admin-only) notification centre renders pure upstream, unfiltered.
- Selected tool lost its translation: AppInputBar rendered tool.display_name for the
  selected pill; now getLocalizedToolLabel(tool, t) (matches the dropdown). Same fix
  applied to the agent 'More Agents' actions filter (AgentsFilters).
- Chat top-right: Share, Export As…, Move to Project, Plaintext/Markdown, Fit/Full width.
- Projects: CreateProjectModal (title/desc/name/placeholder/Cancel/Create) + project
  view (Recent Chats, Last message).
- Agent summary (AgentViewerModal): Featured, Knowledge, No Knowledge, Actions & Tools,
  No Actions, More Info, Instructions, Overwrite System Prompts.
- Agent editor: conversation-starter example placeholders (indexed keys).

Patch 64 files, applies clean to v4.5.2; apply green; full missing-hook + duplicate-hook
scan CLEAN; no conflict markers. Build verification in progress.
2026-08-19 16:56:40 +05:00
NaeemDosh
33c549bfca i18n: fix tool names, hide notifications for non-admins, full agent-creation German
Client feedback round:
- TOOLS bug: getLocalizedToolLabel calls t("tools.<x>") with no fallback and the
  tools.* keys were missing, so the UI showed raw keys (tools.web_search). Added
  tools.* to de/en (Websuche, Interne Suche, Bildgenerierung, ...).
- NOTIFICATIONS: hidden for non-admin end users (bell + panel) via AccountPopover
  canSeeNotifications gate (admin/curator/global_curator still see it, English).
  Client doesn't use it for users. Documented in branding.config.json.
- CREATE AGENT: wrapped the remaining strings across AgentEditorPage, AgentKnowledgePane,
  KnowledgeMainContent, InputDatePicker (Select Date), BackButton (Back). ~30 labels/
  descriptions/placeholders: Knowledge, Use Knowledge, instructions/starters/reminders
  descriptions, Share, Feature/private/unlisted notes, labels, Create/Edit Agent, Cancel.
  Added agent_editor.* + general.back/select_date German keys.

Patch regenerated (61 files, git add -A), applies cleanly to pristine v4.5.2; apply green;
only de/en; all keys resolve; no conflict markers. Image build verification in progress.
2026-08-19 01:14:56 +05:00
NaeemDosh
ea2c56f9e0 i18n: client-editable German dictionary + limit UI languages to de/en
Two client requests on the v4.5.2 German build:

1. Editable/persistent translations. German dictionaries now live at
   branding/i18n/locales/{de,en}.json (the client edits these). apply-branding.mjs
   overlays them onto web/public/locales/<lang>/common.json AFTER the patch, so edits
   survive make setup (previously the dict was inside the patch and got overwritten).
   Added MISSING-de.md (the ~12 non-admin keys still English; dict is ~98% complete).

2. Limit the selector to German + English. New config i18n.languages=["de","en"];
   apply strips every other bundled language (es/fr/pt) from i18n.ts (imports +
   resources), the Settings selector, and public/locales. Config-driven + idempotent.

Note for coverage: dictionary edits only reach strings that are t()-wrapped. Components
kept at v4.5.2 during the re-sync (never-break-UI) render English regardless — those need
a component-wrapping pass (separate dev work), documented in README.

Verified in a built image: compiles (4.8min); de+en dictionaries served (200),
es/fr/pt removed (404); homepage 200.
2026-08-11 05:44:59 +05:00
NaeemDosh
01b9adfcd9 i18n: re-sync German UI overlay onto Onyx v4.5.2 + lock to release tag
Client is moving to release v4.5.2 (from the ~v4.3 the overlay was built on) and wants
the pin on a release NUMBER, not a raw commit.

- Re-synced end-user-i18n.patch: cherry-picked PR #12558 onto v4.5.2 and resolved the
  ~25 conflicts from upstream's own refactors. Strategy = never break the UI: kept
  v4.5.2's version for tangled components (they stay English) and hand-merged only the
  two that matter — AppProvider (i18n init + I18nextProvider) and SettingsPage (language
  selector). New i18n infra + all 5 locale dicts merged cleanly. 4 files upstream
  relocated were dropped (no dangling imports — verified).
- Pin to release tag: upstream.pinnedCommit + i18n.baseCommit = v4.5.2 (make setup
  checks out the tag). Regenerated patch applies to pristine v4.5.2 with zero conflicts.
- apply-branding.mjs: idempotent i18n step via a sentinel file (src/lib/i18n.ts), so
  re-running make apply no longer errors once branding has edited the patched files.
- DHI base-image swap now also triggers on v4.5.2 (its Dockerfile uses dhi.io/node).
- README: tag-pin model, coverage caveat, per-release re-sync guidance.

Verified: patch applies clean to v4.5.2; full make apply green (i18n + 201 code + 376
locale replacements); selector + init wired; no leaked conflict markers. Image build to
be run on a stable connection (local build blocked by network).
2026-08-07 13:38:15 +05:00
NaeemDosh
1f2d637263 feat(i18n): backport end-user German UI from Onyx PR #12558 as overlay
Temporary multi-language support until Onyx ships official i18n (ETA Q4'26/Q1'27).
Backports PR #12558 (react-i18next; end-user UI only, Admin stays English) as a
config-driven overlay so the official source stays intact and upgrades stay easy.

- branding/i18n/end-user-i18n.patch: the PR's 70-file change set, pinned to its exact
  base commit (727e096d) so it applies with zero conflicts.
- branding.config.json: pin upstream to 727e096d; add i18n block (enabled, patch,
  baseCommit, defaultLanguage=de, rebrandLocales).
- apply-branding.mjs: step 0 git-applies the patch BEFORE the string codemod; the
  codemod then rebrands Onyx->AIDO inside every locale dict (de/en/es/fr/pt).
  Idempotent; fails loudly if the checkout isn't at i18n.baseCommit.
- README: 'German UI / i18n (temporary)' section — how to edit translations, add
  languages, and retire the overlay when official i18n lands.

Verified: patch applies cleanly on a fresh pinned checkout; `make apply` runs green
(198 code + 376 locale replacements across 5 languages); i18n deps resolve. Fill/refine
German in web/public/locales/de/common.json (PR ships a full draft).
2026-08-02 15:04:55 +05:00
NaeemDosh
bbfbad2ca7 Fix upstream build: swap Docker Hardened Images (dhi.io) for public node bases
Onyx's web Dockerfile now bases on Docker Hardened Images (dhi.io/node:24-debian13*),
which require a paid DHI subscription + `docker login dhi.io` — so `make build` fails
with a registry-login error for anyone without DHI access.

The apply overlay now rewrites those two FROM lines to the equivalent PUBLIC Docker
Hub node images (24-trixie / 24-trixie-slim, Debian 13 / glibc to match the DHI variant
the Dockerfile targets) and sets the runtime to the non-root `node` user, matching
upstream's posture — no docker login needed.

- branding.config.json: new build.baseImageReplacements map (config-driven)
- apply-branding.mjs: step 1b swaps DHI FROM lines (digest-stripped) + adds USER node;
  idempotent, no-op with a warning if the DHI bases are absent (safe across upstream changes)
- README: upgrade note #3 documenting the swap

Verified end-to-end: full web image builds on the public bases (no login), serves 200,
and runs correctly as the non-root node user.
2026-07-04 02:40:05 +05:00
NaeemDosh
bbd9835558 Fix remaining branding leaks: error-page logo/links + notification bell
Follow-up to client testing on the flattened (sparse-checkout) structure.

- icons.tsx: swap inline OnyxLogoTypeIcon SVG (error/health pages, craft) for
  the AIDO wordmark asset, via a new template + anchored, idempotent patch.
- Notification bell content is backend-generated (official image, not rebuilt),
  so rebrand it at render time: generate lib/branding-runtime.ts from config and
  route the notifications hook through it — sanitize 'Onyx'->brand and suppress
  upstream/EE product notices (permissions-migration announcement, license/trial).
- Repoint hardcoded Onyx links/emails: Discord, support@onyx.app, '@onyx.app
  administrators' (WebResultIcon hostname logic intentionally left untouched).
- .gitignore: ignore generated /web/, /data/, .onyx-sparse-tmp/ so 'make setup'
  output can't be committed accidentally.
- README + verify updated for the new touchpoints.

Verified in the flattened layout: branded web image builds, 0 stray 'Onyx',
and bundle greps confirm all leaks gone.
2026-06-29 22:57:50 +05:00
livdebus
1d650c4d30 refactor: flatten structure, sparse-checkout upstream, add base compose for dockge/traefik
Replace the nested `onyx/` full-clone approach with a flattened, self-contained
deployment structure:

- `make setup` now uses `git sparse-checkout` to fetch only `web/` and
  `deployment/data/nginx/` from upstream, extracting them flat into `./web`
  and `./data/nginx`. This avoids downloading the entire Onyx repository
  when we only rebuild the branded web container ourselves.
- Add a top-level `docker-compose.yml` as the base stack file instead of
  referencing paths inside `onyx/deployment/...`. This keeps the compose
  project in the repo root so it can be managed by dockge and simplifies
  putting Traefik in front of the Onyx nginx.
- Update `docker-compose.branding.yml` build context from `./onyx/web` to `./web`.
- Update `branding.config.json`:
  - `webSrcRoot`: `onyx/web` → `web`
  - `pinnedCommit`: pinned hash → `main`
  - Add rename literals for "Open Source AI Platform" → "Powered by Livtec"
    and `https://www.onyx.app` → `https://livtec.cloud`
- Replace the minimal `.env.example` with the full Onyx deployment template.
- Add `setup.sh` for server provisioning (Node.js 25, make, /opt/stacks/onyx).
- Update `make verify` to search `./web/src` instead of `./onyx/web/src`.

All backend/model services continue to use official upstream Docker images;
only the `web_server` image is built locally from the branded source.
2026-06-29 12:43:31 +02:00
NaeemDosh
c6e3776617 AIDO white-label overlay for Onyx Community Edition
Thin-overlay white-label: branding driven by a single config, applied into
onyx/web by apply-branding.mjs; only the web image is built locally while all
other services use official Onyx images.

- branding/branding.config.json: single source of truth (name, assets, links)
- branding/apply-branding.mjs: asset fetch + logo swap + favicon repoint + codemod
- docker-compose.branding.yml + Makefile: build only livtec/aido-web, pull the rest
- .env/.env.nginx examples + README (update-branding & upgrade-Onyx workflows)

Community Edition only; no EE/commercial features used.
2026-06-27 08:06:58 +05:00