Skip to content

Commit 2fe9e32

Browse files
improvement(settings): mark the self-host section with a sprout
Server was already doing double duty for MCP servers and Mothership, and the icon set ships no botanical glyph, so the mark is a text emoji.
1 parent 5b54292 commit 2fe9e32

3 files changed

Lines changed: 35 additions & 2 deletions

File tree

apps/sim/components/icons.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8944,3 +8944,24 @@ export function ZohoDeskIcon(props: SVGProps<SVGSVGElement>) {
89448944
</svg>
89458945
)
89468946
}
8947+
8948+
/**
8949+
* The Self-host settings mark — a sprout, for a deployment you grow yourself.
8950+
*
8951+
* Text rather than an SVG because the icon set ships no botanical glyph. It is
8952+
* consequently the one nav mark that keeps its own colors instead of inheriting
8953+
* `--text-icon`, and it renders in the host platform's emoji font. The explicit
8954+
* font size pins the glyph to the 14px the line icons around it optically read
8955+
* as, independent of whatever the consumer's `size-*` box sets.
8956+
*/
8957+
export function SproutIcon({ className }: { className?: string }) {
8958+
return (
8959+
<span
8960+
className={`inline-flex items-center justify-center text-sm leading-none ${className ?? ''}`}
8961+
role='img'
8962+
aria-label='Self-host'
8963+
>
8964+
🌱
8965+
</span>
8966+
)
8967+
}

apps/sim/components/settings/navigation.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/**
22
* @vitest-environment node
33
*/
4+
import { createElement } from 'react'
45
import { resetEnvFlagsMock, resetEnvMock, setEnv, setEnvFlags } from '@sim/testing'
6+
import { renderToStaticMarkup } from 'react-dom/server'
57
import { afterAll, beforeEach, describe, expect, it } from 'vitest'
68
import {
79
ACCOUNT_SETTINGS_ITEMS,
@@ -177,6 +179,16 @@ describe('settings navigation boundaries', () => {
177179
).not.toContain('self-host')
178180
})
179181

182+
/**
183+
* The sprout is a text glyph, not an SVG line icon — a swap back to an icon
184+
* component would silently drop the mark this section is recognized by.
185+
*/
186+
it('marks the Self-host section with the sprout glyph', () => {
187+
const selfHost = buildUnifiedSettingsNavigation().find(({ id }) => id === 'self-host')
188+
189+
expect(renderToStaticMarkup(createElement(selfHost!.icon, {}))).toContain('\u{1F331}')
190+
})
191+
180192
it('keeps the Sandboxes section on the pre-Daytona E2B flag alone', () => {
181193
setEnv({ NEXT_PUBLIC_SANDBOX_ENABLED: undefined, NEXT_PUBLIC_E2B_ENABLED: 'true' })
182194

apps/sim/components/settings/navigation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
Wrench,
2525
} from '@sim/emcn/icons'
2626
import { type PermissionType, permissionSatisfies } from '@sim/platform-authz/workspace'
27-
import { CodeIcon, McpIcon } from '@/components/icons'
27+
import { CodeIcon, McpIcon, SproutIcon } from '@/components/icons'
2828
import { getEnv, isTruthy } from '@/lib/core/config/env'
2929
import {
3030
isAccessControlEnabled,
@@ -690,7 +690,7 @@ export const SETTINGS_SECTION_REGISTRY: readonly SettingsSectionRegistryEntry[]
690690
},
691691
{
692692
label: 'Self-host',
693-
icon: Server,
693+
icon: SproutIcon,
694694
unified: {
695695
id: 'self-host',
696696
description: 'Manage this deployment from the Sim managed service.',

0 commit comments

Comments
 (0)