Skip to content

chore: add brand assets + sync infrastructure#212

Merged
thebtf merged 4 commits into
mainfrom
chore/brand-assets
May 7, 2026
Merged

chore: add brand assets + sync infrastructure#212
thebtf merged 4 commits into
mainfrom
chore/brand-assets

Conversation

@thebtf
Copy link
Copy Markdown
Owner

@thebtf thebtf commented May 7, 2026

Summary

Single source of truth for brand assets at assets/branding/ (12 SVG + README).
Propagated copies in ui/public/branding/, docs/public/branding/, root favicons.

What

  • assets/branding/ — canonical SVG set (6 sizes × solid/transparent + README)
  • scripts/sync-branding.ps1 — copies SVG to all consumers; never edit propagated copies directly
  • AppSidebar.vue — placeholder <div>E</div> -> <img src="/branding/favicon-32.svg">
  • ui/index.html, docs/index.html — favicon links (16/32/svg) + apple-touch-icon + theme-color #0C0F1A
  • README.md/ru/zh — brand mark above header (icon-256, 128px)
  • ui/DESIGN.mdcolors.brand-ink token, brand: YAML block, ## Brand Mark body section, 5 new Don'ts

Why

Brand was a placeholder <div>E</div> in sidebar and no favicons anywhere. SSOT pattern lets assets/branding/ stay the only place to edit; sync script keeps consumers in sync.

Touched

48 files, +827/-6. No code logic changes outside Sidebar img swap.

Summary by CodeRabbit

Примечания к выпуску

  • Chores

    • Добавлены фирменные активы и иконки (favicon, логотип Engram) в интерфейс и документацию.
    • Добавлен скрипт синхронизации брендинга; добавлены метатеги favicon/theme в HTML.
    • Обновлён сайдбар: логотип заменён на фирменную иконку.
    • Файлы брендинга доступны без аутентификации и через статичные маршруты.
  • Documentation

    • Создана подробная документация и страница‑галерея фирменных активов; добавлены правила использования и запреты.

Single source of truth at assets/branding/ (12 SVG: 6 sizes x solid/transparent + README).
Propagated copies in ui/public/branding/, docs/public/branding/, root favicons.
Sync via scripts/sync-branding.ps1 (never edit propagated copies directly).

Code wiring:
- ui/src/components/layout/AppSidebar.vue: replace placeholder div with favicon-32.svg
- ui/index.html, docs/index.html: favicon links + apple-touch-icon + theme-color #0C0F1A
- README.md/ru/zh: brand mark above header (icon-256, 128px)

ui/DESIGN.md updated:
- new colors.brand-ink token
- brand: block in YAML frontmatter (paths + usage map)
- ## Brand Mark body section (canonical source rule, sizing rules, gallery link)
- 5 new Donts (recolor, shadows, sizing, transparent on light, propagated-copy edits)
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5e9ee3c4-bc79-494f-a251-984b72bafd69

📥 Commits

Reviewing files that changed from the base of the PR and between ba907f3 and 3dfffab.

⛔ Files ignored due to path filters (3)
  • assets/branding/apple-touch-icon.png is excluded by !**/*.png
  • docs/public/branding/apple-touch-icon.png is excluded by !**/*.png
  • ui/public/branding/apple-touch-icon.png is excluded by !**/*.png
📒 Files selected for processing (4)
  • docs/index.html
  • scripts/sync-branding.ps1
  • ui/DESIGN.md
  • ui/index.html

Walkthrough

PR добавляет систему брендовых активов: документацию и правила, скрипт синхронизации SVG, публичную галерею, favicon метаданные, интеграцию иконки в Sidebar и маршруты/исключения для статических брендинговых файлов.

Changes

Branding Assets & Integration System

Layer / File(s) Summary
Design Tokens & Configuration
ui/DESIGN.md
Добавлены новый цветовой токен colors.brand-ink и конфигурационный блок brand с определением источников активов, путей обслуживания и маппингом файлов для размеров и вариантов прозрачности.
Asset Documentation & Guidelines
assets/branding/README.md, ui/DESIGN.md
Новый assets/branding README и расширение DESIGN.md: каталог SVG, размеры/варианты, правила solid/transparent, ограничения на модификацию и ссылка на live-галерею.
Asset Synchronization Script
scripts/sync-branding.ps1
PowerShell скрипт для синхронизации SVG из assets/branding в ui/public/branding и docs/public/branding, с проверками наличия SVG и копированием favicon.svg в корневые пути.
Public Branding Gallery
ui/public/branding/index.html
Статическая страница с каталогом активов, превью на поверхностях, цветами, масштабами, примерами использования и кодовыми сниппетами интеграции.
Favicon & Theme Metadata
docs/index.html, ui/index.html, ui/DESIGN.md
Добавлены теги favicon (16x16, 32x32, generic, Apple touch) и meta theme-color в HTML; документация Sidebar уточнена для использования solid favicon-32.svg.
Sidebar Component Integration
ui/src/components/layout/AppSidebar.vue
Логотип в боковой панели заменён на /branding/favicon-32.svg с явными width/height и обновлёнными стилями.
README Branding Headers
README.md, README.ru.md, README.zh.md
Вставлен центрированный блок с иконкой Engram в заголовки README перед навигацией/контентом.
Static Routes & Auth Exemptions
internal/worker/service.go, internal/worker/middleware.go
Добавлены маршруты GET /branding/* и GET /favicon.svg; middleware обновлён для пропуска путей /assets/, /branding/, /favicon.svg, /api/docs.

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs:

  • thebtf/engram#212: схожая реализация брендовых активов и синхронизации (gallery, favicons, sync script, sidebar интеграция).
  • thebtf/engram#24: изменяет TokenAuth.Middleware — пересечения в логике исключений путей для статики.
  • thebtf/engram#10: затрагивает setupRoutes и обслуживание статических файлов.

🐰 Я — заяц, что в коде пляшет у фонаря,
SVG блестят, фавикон в порядке,
Скрипт копирует, README гордо смотрит,
Галерея светит, цвета пляшут рядом,
Пусть иконки бегут по public-пути — ура!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the main changes: adding brand assets and implementing a synchronization infrastructure to manage them across multiple locations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/brand-assets

Comment @coderabbitai help to get the list of available commands and usage tips.

@thebtf
Copy link
Copy Markdown
Owner Author

thebtf commented May 7, 2026

@coderabbitai review

@thebtf
Copy link
Copy Markdown
Owner Author

thebtf commented May 7, 2026

@codex review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive branding system for Engram, including canonical SVG assets, a synchronization script, and updated design documentation. Key updates involve integrating the new icons into the project's READMEs, HTML headers, and UI sidebar, as well as creating a live brand gallery. Feedback from the review suggests improving the cross-platform compatibility of the sync script and removing hardcoded local development paths and domains from the documentation.

Comment thread scripts/sync-branding.ps1 Outdated
Comment thread ui/public/branding/index.html Outdated
Comment thread ui/public/branding/index.html Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f05901e45c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/src/components/layout/AppSidebar.vue
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

♻️ Duplicate comments (1)
docs/index.html (1)

11-11: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Та же проблема с apple-touch-icon (SVG), что и в ui/index.html строка 9.

SVG не поддерживается в качестве apple-touch-icon на iOS. Исправление аналогично описанному в комментарии к ui/index.html.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/index.html` at line 11, В данном документе есть ссылка <link
rel="apple-touch-icon" href="..."> указывающая на SVG (engram-icon-256.svg), а
iOS не поддерживает SVG для apple-touch-icon; замените ссылку на растровый PNG
(например engram-icon-180.png или другой подходящий размер), добавьте корректный
размер атрибута (sizes="180x180") и обеспечьте наличие файла PNG в ресурсах,
аналогично исправлению в ui/index.html.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/sync-branding.ps1`:
- Around line 34-39: В текущем цикле синхронизации (переменные $targets,
$svgFiles, $dest, Copy-Item) нужно не только копировать/перезаписывать, но и
удалять устаревшие SVG из целевой папки: перед копированием получи список
существующих SVG в $dest (Get-ChildItem *.svg), вычисли имена файлов, которых
нет в $svgFiles (сравни по .Name), и удаляй их (Remove-Item -Force), затем
выполняй New-Item/Copy-Item как сейчас — это гарантирует, что ui/public/branding
и docs/public/branding будут зеркалить assets/branding.

In `@ui/DESIGN.md`:
- Around line 232-233: В разделе DESIGN.md исправить конфликт в описании
варианта логотипа для sidebar: согласовать значение поля sidebar-logo (текущее
значение favicon-32.svg — solid) с упоминаниями в секциях "usage" и "Sidebar"
или явно разделить на два разных поля (например sidebar-logo-solid и
sidebar-logo-transparent) и обновить ссылки/описания соответственно; также
проверьте и синхронизируйте связанные поля apple-touch-icon и любые упоминания
тех же ассетов в других местах (референты: ключи sidebar-logo и apple-touch-icon
и секции Usage/Sidebar).

In `@ui/index.html`:
- Line 9: The apple-touch-icon currently points to an SVG which iOS doesn't
support; add a 180x180 PNG named apple-touch-icon.png into assets/branding/,
update the link href in ui/index.html (replace the SVG href) to reference the
PNG, and modify scripts/sync-branding.ps1 to copy/sync PNG files alongside SVGs;
also apply the same href change in docs/index.html (the corresponding link on
line 11). Ensure the PNG filename and link are consistent across all files and
the sync script includes *.png in its source list.

In `@ui/public/branding/index.html`:
- Around line 502-503: В футере удалите утёкший абсолютный путь разработчика и
замените его на безопасный/динамический текст: уберите строку с literal "Source:
<code>D:\Dev\engram\ui\public\branding\</code>" в том HTML-блоке и либо оставьте
только "Engram dashboard" с датой, либо подставляйте публично безопасную
информацию (например версия из package.json или относительный URL) при сборке;
отредактируйте тот же фрагмент в index.html рядом с элементом <span id="ts">
(скрипт, который устанавливает дату) чтобы выводил только допустимый
текст/метаданные, а не локальный путь разработчика.
- Around line 450-452: Replace the incorrect import example that uses "import
logoUrl from '/branding/engram-icon.svg?url'" and the misleading comment
"cache-busted by Vite" with a direct absolute public URL reference and remove
any local developer filesystem paths; specifically, update the usage around the
logoUrl import and the <img :src="logoUrl"> example to use an absolute path like
"/branding/engram-icon.svg" in the markup (no JS import) and delete the Windows
path "D:\Dev\engram\ui\public\branding\" from the public file content/comments.

---

Duplicate comments:
In `@docs/index.html`:
- Line 11: В данном документе есть ссылка <link rel="apple-touch-icon"
href="..."> указывающая на SVG (engram-icon-256.svg), а iOS не поддерживает SVG
для apple-touch-icon; замените ссылку на растровый PNG (например
engram-icon-180.png или другой подходящий размер), добавьте корректный размер
атрибута (sizes="180x180") и обеспечьте наличие файла PNG в ресурсах, аналогично
исправлению в ui/index.html.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f4531194-bdb8-4ed2-a418-a7ba2bf74d93

📥 Commits

Reviewing files that changed from the base of the PR and between 7190160 and f05901e.

⛔ Files ignored due to path filters (38)
  • assets/branding/engram-icon-256-transparent.svg is excluded by !**/*.svg
  • assets/branding/engram-icon-256.svg is excluded by !**/*.svg
  • assets/branding/engram-icon-512-transparent.svg is excluded by !**/*.svg
  • assets/branding/engram-icon-512.svg is excluded by !**/*.svg
  • assets/branding/engram-icon-transparent.svg is excluded by !**/*.svg
  • assets/branding/engram-icon.svg is excluded by !**/*.svg
  • assets/branding/favicon-16-transparent.svg is excluded by !**/*.svg
  • assets/branding/favicon-16.svg is excluded by !**/*.svg
  • assets/branding/favicon-32-transparent.svg is excluded by !**/*.svg
  • assets/branding/favicon-32.svg is excluded by !**/*.svg
  • assets/branding/favicon-transparent.svg is excluded by !**/*.svg
  • assets/branding/favicon.svg is excluded by !**/*.svg
  • docs/public/branding/engram-icon-256-transparent.svg is excluded by !**/*.svg
  • docs/public/branding/engram-icon-256.svg is excluded by !**/*.svg
  • docs/public/branding/engram-icon-512-transparent.svg is excluded by !**/*.svg
  • docs/public/branding/engram-icon-512.svg is excluded by !**/*.svg
  • docs/public/branding/engram-icon-transparent.svg is excluded by !**/*.svg
  • docs/public/branding/engram-icon.svg is excluded by !**/*.svg
  • docs/public/branding/favicon-16-transparent.svg is excluded by !**/*.svg
  • docs/public/branding/favicon-16.svg is excluded by !**/*.svg
  • docs/public/branding/favicon-32-transparent.svg is excluded by !**/*.svg
  • docs/public/branding/favicon-32.svg is excluded by !**/*.svg
  • docs/public/branding/favicon-transparent.svg is excluded by !**/*.svg
  • docs/public/branding/favicon.svg is excluded by !**/*.svg
  • docs/public/favicon.svg is excluded by !**/*.svg
  • ui/public/branding/engram-icon-256-transparent.svg is excluded by !**/*.svg
  • ui/public/branding/engram-icon-256.svg is excluded by !**/*.svg
  • ui/public/branding/engram-icon-512-transparent.svg is excluded by !**/*.svg
  • ui/public/branding/engram-icon-512.svg is excluded by !**/*.svg
  • ui/public/branding/engram-icon-transparent.svg is excluded by !**/*.svg
  • ui/public/branding/engram-icon.svg is excluded by !**/*.svg
  • ui/public/branding/favicon-16-transparent.svg is excluded by !**/*.svg
  • ui/public/branding/favicon-16.svg is excluded by !**/*.svg
  • ui/public/branding/favicon-32-transparent.svg is excluded by !**/*.svg
  • ui/public/branding/favicon-32.svg is excluded by !**/*.svg
  • ui/public/branding/favicon-transparent.svg is excluded by !**/*.svg
  • ui/public/branding/favicon.svg is excluded by !**/*.svg
  • ui/public/favicon.svg is excluded by !**/*.svg
📒 Files selected for processing (10)
  • README.md
  • README.ru.md
  • README.zh.md
  • assets/branding/README.md
  • docs/index.html
  • scripts/sync-branding.ps1
  • ui/DESIGN.md
  • ui/index.html
  • ui/public/branding/index.html
  • ui/src/components/layout/AppSidebar.vue

Comment thread scripts/sync-branding.ps1
Comment thread ui/DESIGN.md
Comment thread ui/index.html Outdated
Comment thread ui/public/branding/index.html
Comment thread ui/public/branding/index.html Outdated
- scripts/sync-branding.ps1: use forward slashes in Join-Path string
  literals for PowerShell Core cross-platform compatibility (Linux/macOS)
- ui/public/branding/index.html: replace hardcoded unleashed.lan:37777
  with generic your-engram-domain.com placeholder in usage example
- ui/public/branding/index.html: replace absolute Windows path in footer
  with repo-relative assets/branding/ reference
- internal/worker/service.go: add /branding/* and /favicon.svg routes so
  brand assets are reachable when dashboard is served by the worker
- internal/worker/middleware.go: exempt /branding/* and /favicon.svg from
  token auth (public static assets, same treatment as /assets/*)

Reviewer comment ids: PRRC_kwDORY-ek86-shrt, PRRC_kwDORY-ek86-shrz,
                      PRRC_kwDORY-ek86-shsJ, PRRC_kwDORY-ek86-skE1
thebtf added 2 commits May 7, 2026 09:40
- scripts/sync-branding.ps1: remove stale SVGs from target directories
  before copying (fixes sync divergence when a source file is renamed
  or deleted). Adds $sourceNames diff + Remove-Item pipeline per CR
  suggestion.
- ui/DESIGN.md: remove conflicting "sidebar logo" example from the
  Transparent variant description; the Sidebar section already specifies
  solid favicon-32.svg as the canonical sidebar mark.

Reviewer comment ids: PRRC_kwDORY-ek86-sm_6, PRRC_kwDORY-ek86-snAC
iOS Safari does not respect SVG apple-touch-icon. Adds 180x180 raster PNG
generated from engram-icon-256.svg via cairosvg, propagated to both
ui/public/branding/ and docs/public/branding/ via sync-branding.ps1.

sync-branding.ps1: extend to copy SVG + PNG assets and prune stale assets
of either type. Source set now declared via *.svg + *.png glob.

ui/index.html, docs/index.html: update apple-touch-icon link to PNG with
explicit sizes=180x180.

Resolves the last MINOR finding from CodeRabbit on PR #212.
@thebtf thebtf merged commit 13393b6 into main May 7, 2026
7 checks passed
@thebtf thebtf deleted the chore/brand-assets branch May 7, 2026 06:46
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3dfffab421

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +745 to +746
s.router.Get("/branding/*", serveAssets)
s.router.Get("/favicon.svg", serveAssets)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Set SVG MIME type for branding assets

When the dashboard is served by the worker, these new /branding/* and /favicon.svg routes still go through serveAssets, which only assigns content types for .js and .css; I checked internal/worker/static.go, and Go's fallback detection returns application/octet-stream for these SVGs while SecurityHeaders adds X-Content-Type-Options: nosniff. In that worker-served context the new favicon links and sidebar logo can be rejected or not rendered by browsers even though they work under Vite, so the route needs to serve .svg as image/svg+xml (and keep image MIME handling complete).

Useful? React with 👍 / 👎.

thebtf added a commit that referenced this pull request May 7, 2026
5 fixes since v6.0.0:
- clipboard copy fix in dialog + CLI --help/--version flags (#209)
- gitleaks-friendly placeholder in setup.md example (e229fbf)
- bump muxcore v0.21.6 -> v0.21.19 (#210)
- inset sidebar with rounded content panel (#211)
- brand assets + sync infrastructure (#212)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant