Skip to content

refactor: describe built-in images from shared asset metadata - #30728

Open
jakehwll wants to merge 6 commits into
mainfrom
jakehwll/builtin-asset-catalog
Open

jakehwll wants to merge 6 commits into
mainfrom
jakehwll/builtin-asset-catalog

Conversation

@jakehwll

@jakehwll jakehwll commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 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.

Design rationale, tradeoffs, and validation
  • 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.

@linear-code

linear-code Bot commented Oct 14, 2026

Copy link
Copy Markdown

DEQ-352

@jakehwll
jakehwll requested a review from aqandrew October 14, 2026 03:06
@jakehwll

Copy link
Copy Markdown
Collaborator Author

Waiting on emojimart dependency removal here 🙂

Watch this space.

@jakehwll
jakehwll temporarily deployed to main November 7, 2026 14:48 — with GitHub Actions Inactive
@jakehwll
jakehwll temporarily deployed to main November 7, 2026 14:50 — with GitHub Actions Inactive
@jakehwll
jakehwll marked this pull request as ready for review November 7, 2026 14:52
@jakehwll
jakehwll requested review from a team and jdomeracki-coder as code owners November 7, 2026 14:52
@jakehwll
jakehwll temporarily deployed to main November 7, 2026 14:52 — with GitHub Actions Inactive
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T14:55:41.956918Z 1f4af6c Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: 1f4af6c1d1

ℹ️ 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 site/src/theme/builtinIcons.json Resolved
@jakehwll
jakehwll temporarily deployed to main November 8, 2026 01:35 — with GitHub Actions Inactive
@jakehwll
jakehwll temporarily deployed to main November 8, 2026 01:35 — with GitHub Actions Inactive
jeremyruppel added a commit that referenced this pull request Nov 12, 2026
… filter (#32013)

In the AI Gateway provider filter, each option showed the provider
type's logo with `alt=""`. A provider named after something other than
its type, such as `bedrock` beside the AWS logo, lost the type for
screen reader users (WCAG 1.1.1).

`ProviderIcon` now takes an optional `alt`, which defaults to `""`, so
other callers don't change. `ProviderFilter` sets it to the type's
display name (for example "AWS Bedrock") when the visible label doesn't
already include it. A custom icon stays decorative because we don't know
what it shows.

Closes DEQ-330

| Ticket | UI surface |
|---|---|
| DEQ-330 | AI Gateway > Sessions, "All providers" filter options. Not
visible: the only change is the accessible name, so no screenshots. |

<details>
<summary>Grouping and decision log</summary>

- Batch `alt-text-missing-active`: DEQ-330 and DEQ-482 are eligible.
Each has its own root cause, so this PR covers only DEQ-330.
- DEQ-482 (template icons in the Templates table) is not in this PR. The
icon is admin-chosen and there is no description source on `main`.
#30728 adds `getBuiltinImageDescription()`, but it is still open and
changes files outside `site/`.
- Deque suggested the alt "AWS". "AWS Bedrock" comes from the page's
existing `getProviderDisplayName`, which `ProvidersBadge` and
`SessionSummaryTable` already use, so the wording matches.
- When the label already contains the type label, the alt is left empty,
so options like `anthropic-prod` aren't announced as "Anthropic
anthropic-prod".
- The fallback `Building2Icon` (an unknown type with no icon) ignores
`alt`, because the generic icon carries no information.
- Self-review: `frontend-review` passed all rules.
`frontend-deep-review` raised three should-fix findings (which label
helper to use, test queries, an inline fixture) and two nits, and all
are fixed. The accessibility audit found no issues: the option's name
becomes "AWS Bedrock bedrock", and the trigger keeps `aria-label="Select
provider"`.
- Not fixed here, noted for follow-up: `ProvidersBadge` has the same
decorative icon next to a configured name, and `SelectFilter`'s trigger
`aria-label` replaces its visible text.

</details>

🤖 Generated by Coder Agents on behalf of @jeremyruppel.
@github-actions github-actions Bot added the stale This issue is like stale bread. label Nov 17, 2026
@github-actions github-actions Bot closed this Nov 21, 2026
Comment thread site/src/theme/builtinImages.ts Resolved
@jakehwll jakehwll reopened this Nov 24, 2026
@jakehwll
jakehwll requested a review from a team November 24, 2026 01:24
@jakehwll
jakehwll requested a review from aqandrew November 24, 2026 03:52
@github-actions github-actions Bot removed the stale This issue is like stale bread. label Nov 25, 2026

This branch was previously deployed

1 inactive (outdated) deployment
main — fc577dd6 Deployed Nov 8, 2026 by jakehwll via cla #252168
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants