fix(tui): persist global details mode sections

Pin all detail sections when /details sets a global mode so config sync does not restore built-in section defaults.
This commit is contained in:
Brooklyn Nicholson 2026-04-29 16:46:42 -05:00
parent b52b63396c
commit c2cb6d1071
4 changed files with 48 additions and 2 deletions

View file

@ -141,6 +141,12 @@ describe('createSlashHandler', () => {
expect(createSlashHandler(ctx)('/details toggle')).toBe(true)
expect(getUiState().detailsMode).toBe('expanded')
expect(getUiState().detailsModeCommandOverride).toBe(true)
expect(getUiState().sections).toEqual({
thinking: 'expanded',
tools: 'expanded',
subagents: 'expanded',
activity: 'expanded'
})
expect(ctx.gateway.rpc).toHaveBeenCalledWith('config.set', {
key: 'details_mode',
value: 'expanded'