fix(ui): pre-register 4 bot brand SVGs locally so picker renders offline - #249
Merged
Conversation
…offline @kenji audit msg `e4cfbfb0` round-2 #2: the bot logo picker was rendering through `<IconifyIcon icon="simple-icons:telegram">` etc., which Iconify lazy-fetches from `api.iconify.design` at runtime. On cold-offline Electron launches (or firewalled networks) the logos silently degraded to the `glyph` monogram fallback. Desktop brand logos should not depend on a third-party CDN at runtime. Ship a partial offline fix that covers 4 of the 6 brands today: - New `packages/ui/src/bot-brand-icons.ts` holds the verbatim SVG `<path>` bodies for telegram / wechat / discord / qq, each copied from upstream Simple Icons (CC0) at the version where the icon was last published (1.2.87 for the first three; 1.2.10 for `tencentqq` before Simple Icons retired the standalone QQ id). - `icons.tsx` registers these as a local Iconify collection under the `maka-bot:*` prefix at module load via `addCollection`, mirroring the existing `addCollection(phData)` Phosphor registration so `<Icon icon="maka-bot:telegram">` resolves synchronously without any network roundtrip. - `BOT_BRAND` points telegram, wechat, wecom, discord, qq at `maka-bot:*`. Honest gap (documented in both `bot-brand.ts` and `bot-brand-icons.ts`): feishu/lark and dingtalk are not (and never were) carried by Simple Icons under those names, so they still fall through `simple-icons:*` CDN lazy fetch with the colored-tile + glyph offline fallback. Sourcing them from each brand's official kit is a separate follow-up so this PR's SVG provenance stays auditable; until then, kenji's contract goal (no `simple-icons:*` ids at all) is partially met. No new runtime deps. `@iconify-json/simple-icons` was used only as a local one-shot extraction source and is not added to `packages/ui`'s `dependencies`.
4 tasks
jackwener
added a commit
that referenced
this pull request
Jun 25, 2026
… dvh (#250) @kenji audit msg `232aec0f` (`#my-ai:c28a6293`). Round 3 against `af66ebb7` post-#249. **#2 — Plan Reminder select collapsed state was text-only.** PR #247 added a brand icon to each `<SelectItem>`, but `<SelectValue />` defaulted to rendering just the label string — open dropdown showed a logo, collapsed trigger showed plain text. Build a `value → { label, icon }` lookup inside `PlanReminderSelect` and pass a function-child to `SelectValue` so the picked state renders the same icon + label row the dropdown items render. **#6 — `100vh` residue in renderer CSS.** Four sites still on `100vh`: - `maka-tokens.css:760` `.maka-shell` `height` - `maka-tokens.css:1941` `.maka-modal` `max-height: calc(100vh - 80px)` - `styles.css:5028` `.maka-help-modal` `max-height: calc(100vh - 96px)` - `styles.css:13121` `.maka-onboarding-stack` `min-height: calc(100vh - 84px)` Replace each with `100dvh` so Electron browser frames with dynamic chrome (or a future mobile-style viewport) don't get half a viewport of height calculation drift. Other renderer surfaces already use `100dvh`; this brings the legacy four into line. Deferred per kenji's own scope: - **#1** feishu/dingtalk official-brand-kit sourcing — separate PR. - **#3 / #4** SettingsSelect / Segmented / ChoiceCard primitive unification — design-system refactor; no end-result delta on its own. - **#5** layout-property transitions in sidebar/tabs/accordion — kenji explicitly gated on visual smoke harness.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Acts on @kenji audit msg `e4cfbfb0` round-2 #2 (`#my-ai:c28a6293` thread).
The bot logo picker used `<IconifyIcon icon="simple-icons:telegram">` etc., which lazy-fetches from `api.iconify.design` at runtime. On cold-offline Electron launches or firewalled networks the logos degraded to the monogram fallback. Desktop brand logos shouldn't depend on a third-party CDN.
Partial offline fix landing 4 of 6 brands today:
packages/ui/src/bot-brand-icons.tsships the SVG<path>bodies for telegram / wechat / discord / qq, copied verbatim from upstream Simple Icons (CC0). Provenance + pinned upstream version documented inline.icons.tsxregisters them as a local Iconify collection under themaka-bot:*prefix at module load.BOT_BRANDupdated: telegram, wechat, wecom, discord, qq now point atmaka-bot:*.Honest gap (documented inline): feishu/lark and dingtalk are not (and never were) carried by Simple Icons under those names. They still use
simple-icons:*CDN lazy fetch with the colored-tile + glyph offline fallback. Sourcing those two from each brand's official kit is a separate follow-up so this PR's SVG provenance stays auditable. kenji's contract goal (zerosimple-icons:*ids) is partially met.No new runtime deps.
@iconify-json/simple-iconswas used only as a local one-shot extraction source.Test plan
tsc --noEmit -p apps/desktop/tsconfig.renderer.json— clean on touched files.pnpm -F @maka/ui build— clean.