feat(browser): mark browser extensions with a puzzle piece

Adds a puzzle glyph to the icon catalog (16 px grid, 1 px stroke, round joins, like its neighbours) and uses it for browser extensions only: the pane's Extensions button and the fallback of an extension without its own icon in the toolbar menu, Settings > Browser and the Add an extension dialog. OpenCode's own extensions keep their icon.
This commit is contained in:
Luke Parker 2026-11-17 15:19:21 +10:00
parent 5437e9b1eb
commit 36a2cddc74
4 changed files with 12 additions and 4 deletions

View file

@ -862,7 +862,8 @@ export default function SessionBrowserPane(props: {
variant="ghost-muted"
size="large"
data-action="browser-extensions"
icon={<Icon name="extensions" />}
// A browser extension's own mark, not the one for OpenCode's extensions.
icon={<Icon name="puzzle" />}
aria-label={plugin.t("extensions.menu")}
/>
</Tooltip>
@ -878,7 +879,7 @@ export default function SessionBrowserPane(props: {
}
onSelect={() => chooseExtension(extension())}
>
<Glyph image={extension().action?.icon ?? extension().icon} fallback="extensions" class="!size-4" />
<Glyph image={extension().action?.icon ?? extension().icon} fallback="puzzle" class="!size-4" />
<span class="min-w-0 flex-1 truncate">{extension().action?.title ?? extension().name}</span>
<Show when={extension().action?.badge}>
{(badge) => (

View file

@ -378,7 +378,7 @@ function ExtensionRow(props: {
title={
<Identity
image={props.extension.icon}
fallback="extensions"
fallback="puzzle"
name={props.extension.name}
detail={props.extension.version}
message={message()}
@ -660,7 +660,7 @@ const ACTION_COLUMN = "min-w-24 justify-center"
function ChoiceRow(props: { image?: string; name: string; children: JSX.Element }) {
return (
<div class="flex h-11 items-center gap-3">
<Glyph image={props.image} fallback="extensions" />
<Glyph image={props.image} fallback="puzzle" />
<span class="min-w-0 flex-1 truncate text-[13px] font-[530] leading-[var(--line-height-compact)] text-v2-text-text-base" title={props.name}>{props.name}</span>
{props.children}
</div>

View file

@ -136,6 +136,7 @@ export type IconName =
| "post-skill"
| "prompt"
| "providers"
| "puzzle"
| "refresh"
| "reset"
| "review"

View file

@ -238,6 +238,12 @@ const icons = {
viewBox: "0 0 16 16",
body: `<path d="M8.00001 14.4445C9.47277 14.4445 10.6667 11.5592 10.6667 8.00001C10.6667 4.44085 9.47277 1.55557 8.00001 1.55557M8.00001 14.4445C6.52725 14.4445 5.33335 11.5592 5.33335 8.00001C5.33335 4.44085 6.52725 1.55557 8.00001 1.55557M8.00001 14.4445C11.5592 14.4445 14.4444 11.5592 14.4444 8C14.4444 4.44083 11.5592 1.55557 8.00001 1.55557M8.00001 14.4445C4.44085 14.4445 1.55556 11.5592 1.55556 8C1.55556 4.44083 4.44085 1.55557 8.00001 1.55557M1.87203 6.00001H14.128M2.03555 10.4445H13.9644" stroke="currentColor"/>`,
},
// A browser extension, as every browser draws it: a piece with a tab on top and on the right, and a notch on the
// left and at the bottom. OpenCode's own extensions keep `extensions`.
puzzle: {
viewBox: "0 0 16 16",
body: `<path d="M1.5 4.5H4.5V3.5a2 2 0 0 1 4 0V4.5H11.5V7.5H12.5a2 2 0 0 1 0 4H11.5V14.5H8.5V13.5a2 2 0 0 0-4 0V14.5H1.5V11.5H2.5a2 2 0 0 0 0-4H1.5Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>`,
},
"outline-globe-plus": {
viewBox: "0 0 16 16",
body: `<path d="M7 12.6667C5.71133 12.6667 4.66667 10.1296 4.66667 7C4.66667 3.87039 5.71133 1.33333 7 1.33333C8.2426 1.33333 9.25833 3.69221 9.32933 6.66667" stroke="currentColor" stroke-miterlimit="10"/><path d="M12.6667 6.66667H1.33333" stroke="currentColor"/><path d="M12.6667 7.72825V7C12.6667 3.87039 10.1296 1.33333 7 1.33333C3.8704 1.33333 1.33333 3.87039 1.33333 7C1.33333 10.1296 3.8704 12.6667 7 12.6667H7.58694" stroke="currentColor" stroke-miterlimit="10"/><path d="M9.5 11.5H13.5M11.5 9.5V13.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`,