refactor(settings): redesign OpenCode settings with shared collapsible sections

- Replace bordered cards with compact flat rows and maintenance sections
- Add shared SettingsDisclosure for config, maintenance, and sandbox sections
- Auto-scroll expanded sections into view when outside the scrollport
- Make agent file editor and agent form full-height and keyboard-aware on mobile
This commit is contained in:
Chris Scott committed 2026-09-19 10:14:34 -04:00
1 parent 295d24ced7
commit 2a4fa956b4
18 files changed
+1013 -742

No files matched your search

@@ -43,10 +43,11 @@ describe('ServerHealthStatus', () => {
mockActions()
})
it('keeps Update and Versions enabled', () => {
it('keeps Update, Restart, and Versions enabled', () => {
render(<ServerHealthStatus />)
expect(screen.getByRole('button', { name: /Update/i })).toBeEnabled()
expect(screen.getByRole('button', { name: /Restart/i })).toBeEnabled()
expect(screen.getByRole('button', { name: /Versions/i })).toBeEnabled()
})
@@ -62,6 +63,18 @@ describe('ServerHealthStatus', () => {
expect(performUpgrade).toHaveBeenCalled()
})
it('invokes a restart when Restart is clicked', async () => {
const user = userEvent.setup()
const requestRestart = vi.fn()
mockActions({ requestRestart })
render(<ServerHealthStatus />)
await user.click(screen.getByRole('button', { name: /Restart/i }))
expect(requestRestart).toHaveBeenCalled()
})
it('opens the version dialog when Versions is clicked', async () => {
const user = userEvent.setup()
const onOpenVersionDialog = vi.fn()