Skip to content

Commit 1cd3054

Browse files
improvement(settings): drop the section header from self hosting
One row does not need a section label, and removing it takes the divider with it. The body is now the Chat keys row and its managed-keys link, nothing else.
1 parent c4e4f96 commit 1cd3054

2 files changed

Lines changed: 22 additions & 13 deletions

File tree

apps/sim/app/workspace/[workspaceId]/settings/components/self-host/self-host.test.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ describe('SelfHost settings section', () => {
1212
expect(markup).toContain('href="https://www.sim.ai/selfhost/settings/chat-keys"')
1313
})
1414

15+
/**
16+
* The body is the Chat keys row and nothing else — no section label, and so
17+
* none of `SettingsSection`'s label/divider chrome above it.
18+
*/
19+
it('renders the Chat keys row with no section header', () => {
20+
const markup = renderToStaticMarkup(<SelfHost />)
21+
22+
expect(markup.indexOf('Chat keys')).toBeLessThan(markup.indexOf('Managed keys'))
23+
expect(markup).not.toContain('<section')
24+
expect(markup).not.toContain('bg-[var(--border)]')
25+
})
26+
1527
/**
1628
* The section is deliberately only the managed link — no status readouts,
1729
* capability inventories, or environment-variable listings.

apps/sim/app/workspace/[workspaceId]/settings/components/self-host/self-host.tsx

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,24 @@
33
import { ChipLink } from '@sim/emcn'
44
import { SITE_URL } from '@/lib/core/utils/urls'
55
import { SettingsPanel } from '@/app/workspace/[workspaceId]/settings/components/settings-panel'
6-
import { SettingsSection } from '@/app/workspace/[workspaceId]/settings/components/settings-section/settings-section'
76

87
/** Chat keys are issued by the managed service, not by this deployment. */
98
const CHAT_KEYS_HREF = `${SITE_URL}/selfhost/settings/chat-keys`
109

1110
export function SelfHost() {
1211
return (
1312
<SettingsPanel>
14-
<SettingsSection label='Chat keys'>
15-
<div className='flex items-center justify-between px-2'>
16-
<div className='flex flex-col justify-center gap-[1px]'>
17-
<span className='text-[var(--text-body)] text-sm'>Managed on sim.ai</span>
18-
<span className='text-[var(--text-muted)] text-caption'>
19-
Manage the model-provider keys that power Chat on this deployment.
20-
</span>
21-
</div>
22-
<ChipLink href={CHAT_KEYS_HREF} target='_blank' rel='noopener noreferrer'>
23-
Manage keys
24-
</ChipLink>
13+
<div className='flex items-center justify-between px-2'>
14+
<div className='flex flex-col justify-center gap-[1px]'>
15+
<span className='text-[var(--text-body)] text-sm'>Chat keys</span>
16+
<span className='text-[var(--text-muted)] text-caption'>
17+
Model-provider keys that power Chat on this deployment.
18+
</span>
2519
</div>
26-
</SettingsSection>
20+
<ChipLink href={CHAT_KEYS_HREF} target='_blank' rel='noopener noreferrer'>
21+
Managed keys
22+
</ChipLink>
23+
</div>
2724
</SettingsPanel>
2825
)
2926
}

0 commit comments

Comments
 (0)