Files
coder/.github
Jake Howell d198b7b723 refactor: describe built-in images from shared asset metadata (#30728)
> 🤖 This PR was modified by Coder Agents on behalf of Jake Howell.

Alternative to #30666, independently based on `main` and updated for the
Frimousse/Emojibase migration in #30526. Built-in image descriptions
belong to asset metadata, not filename heuristics or the picker
component. No Emoji Mart dependency is introduced, and no packages are
added.

An authored icon catalog supplies meaningful names to Frimousse and
descriptions to a synchronous `getBuiltinImageDescription()` lookup.
Generated emoji descriptions use the existing pinned Emojibase English
labels. Group avatars in chat sharing and the shared workspace
autocomplete opt into descriptions; stored URLs and the default
decorative `Avatar` behavior stay unchanged. Picker searches retain
filename aliases such as `k8s`, `aws-dark`, and `gemini-monochrome`.

<details>
<summary>Design rationale, tradeoffs, and validation</summary>

- Keep names, descriptions, and explicit icon variants together: 146
catalog entries cover all 160 shipped icon files exactly once, including
deprecated sources. Distinct supported variants have distinct picker
names. The legacy `mux.svg` alias remains supported for saved URLs and
descriptions but is hidden from the picker and icon list in favor of
`xum.svg`.
- Let shipped assets define emoji coverage, rather than the upstream
dataset: 3,779 normalized descriptions cover all 3,785 emoji PNGs.
Generation uses Emojibase labels, including skin tones, fails on missing
labels, and excludes spritesheets and unshipped emoji.
- Keep runtime lookup independent of the picker and full Emojibase
dataset. Generation reuses the existing data dependency and Makefile
workflow; lookup needs no fetch, hook, or loading state and handles
presentation selectors, query parameters, and fragments.
- Keep descriptions separate from alt-text policy. Unknown/external
sources return `undefined`; each caller decides whether an image is
informative. Custom-image descriptions and adoption on other screens
remain out of scope. No API or database migration is needed.
- The minified emoji metadata is 27.9 kB gzipped, plus 2.2 kB for the
authored icon catalog. This is additional description data, not an
application-wide bundle-size reduction.

Local validation passed: frontend format/check/lint (including types),
51 targeted unit tests, 22 Chromium Storybook cases, production build,
deterministic generation, missing-label failure guard, and spelling
checks. Frontend reviews and browser checks covered search labels,
keyboard selection, and sharing accessible names. Existing popover
accessibility findings and narrow-screen picker overflow are outside
this diff; this does not claim full accessibility compliance.
Screenshots are shared in chat rather than uploaded here.

</details>
2026-12-03 14:58:49 +11:00
..