Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(store): correct theme persistence to use system preference on first load

Steven Enamakelb717d870e0cc
diff --git a/app/src/components/settings/panels/AppearancePanel.test.tsx b/app/src/components/settings/panels/AppearancePanel.test.tsx
index 4dede9bd8d..5ba4ccb812 100644
--- a/app/src/components/settings/panels/AppearancePanel.test.tsx
+++ b/app/src/components/settings/panels/AppearancePanel.test.tsx
@@ -22,7 +22,6 @@ function renderPanel(
tabBarLabels: 'hover',
fontSize,
customFontSizePx,
- agentMessageViewMode: 'bubbles',
},
},
});
diff --git a/app/src/pages/__tests__/Conversations.render.test.tsx b/app/src/pages/__tests__/Conversations.render.test.tsx
index 0507a201bf..3c45be98c1 100644
--- a/app/src/pages/__tests__/Conversations.render.test.tsx
+++ b/app/src/pages/__tests__/Conversations.render.test.tsx
@@ -548,7 +548,6 @@ describe('Conversations — smoke render (#1123 welcome-lock removal)', () => {
mode: 'system',
tabBarLabels: 'hover',
fontSize: 'medium',
- agentMessageViewMode: 'text',
},
});
});
@@ -681,7 +680,6 @@ describe('Conversations — smoke render (#1123 welcome-lock removal)', () => {
mode: 'system',
tabBarLabels: 'hover',
fontSize: 'medium',
- agentMessageViewMode: 'bubbles',
},
});
});
diff --git a/app/src/store/index.ts b/app/src/store/index.ts
index 4aa20e877f..92cebe2921 100644
--- a/app/src/store/index.ts
+++ b/app/src/store/index.ts
@@ -103,9 +103,7 @@ const themePersistConfig = {
'tabBarLabels',
'fontSize',
'customFontSizePx',
- 'agentMessageViewMode',
'developerMode',
- 'hideAgentInsights',
'activeThemeId',
'themeVariant',
'customThemes',
diff --git a/app/src/store/themeSlice.test.ts b/app/src/store/themeSlice.test.ts
index 08318df7fb..81a592fc68 100644
--- a/app/src/store/themeSlice.test.ts
+++ b/app/src/store/themeSlice.test.ts
@@ -12,14 +12,11 @@ import themeReducer, {
resetActiveTheme,
selectEffectiveFontSizePx,
selectEffectiveTheme,
- selectHideAgentInsights,
selectRootFontSizePx,
setActiveTheme,
- setAgentMessageViewMode,
setCustomFontSizePx,
setFontRole,
setFontSize,
- setHideAgentInsights,
setTabBarLabels,
setThemeMode,
setThemeToken,
@@ -42,11 +39,6 @@ describe('themeSlice', () => {
expect(state.fontSize).toBe('medium');
});
- it('defaults assistant message rendering to plain text', () => {
- const state = themeReducer(undefined, { type: '@@INIT' });
- expect(state.agentMessageViewMode).toBe('text');
- });
-
it('updates fontSize via setFontSize', () => {
let state = themeReducer(undefined, { type: '@@INIT' });
state = themeReducer(state, setFontSize('large'));
@@ -65,9 +57,7 @@ describe('themeSlice', () => {
tabBarLabels: 'always',
fontSize: 'xlarge',
customFontSizePx: null,
- agentMessageViewMode: 'text',
developerMode: false,
- hideAgentInsights: false,
// setThemeMode('dark') syncs the variant; the active family is unchanged.
activeThemeId: 'classic',
themeVariant: 'dark',
@@ -75,26 +65,6 @@ describe('themeSlice', () => {
});
});
- it('updates assistant message view mode', () => {
- let state = themeReducer(undefined, { type: '@@INIT' });
- state = themeReducer(state, setAgentMessageViewMode('text'));
- expect(state.agentMessageViewMode).toBe('text');
- });
-
- it('defaults hideAgentInsights to false and toggles it', () => {
- let state = themeReducer(undefined, { type: '@@INIT' });
- expect(state.hideAgentInsights).toBe(false);
- expect(selectHideAgentInsights({ theme: state })).toBe(false);
-
- state = themeReducer(state, setHideAgentInsights(true));
- expect(state.hideAgentInsights).toBe(true);
- expect(selectHideAgentInsights({ theme: state })).toBe(true);
- });
-
- it('falls back to false when hideAgentInsights is absent from persisted state', () => {
- expect(selectHideAgentInsights({ theme: {} as never })).toBe(false);
- });
-
it('maps every font size to a concrete px value', () => {
const sizes: FontSize[] = ['small', 'medium', 'large', 'xlarge'];
expect(sizes.map(size => FONT_SIZE_PX[size])).toEqual(['14px', '16px', '18px', '20px']);
diff --git a/app/src/store/themeSlice.ts b/app/src/store/themeSlice.ts
index d3801305f0..8e7279458a 100644
--- a/app/src/store/themeSlice.ts
+++ b/app/src/store/themeSlice.ts
@@ -20,7 +20,6 @@ const SYSTEM_THEME_ID = 'system';
/** Default theme family selected on first run. */
const DEFAULT_FAMILY_ID = 'classic';
export type TabBarLabels = 'hover' | 'always';
-export type AgentMessageViewMode = 'bubbles' | 'text';
/**
* Global app font size (issue #3120). Drives the root `<html>` font-size, which
* scales every rem-based Tailwind text utility — including chat messages and the
@@ -71,7 +70,6 @@ interface ThemeState {
* tile clears this back to `null`.
*/
customFontSizePx: number | null;
- agentMessageViewMode: AgentMessageViewMode;
/**
* Runtime Developer Mode (default OFF).
* When true, all developer and diagnostic surfaces become visible.
@@ -80,15 +78,6 @@ interface ThemeState {
* is authoritative and is never relaxed by this toggle.
*/
developerMode: boolean;
- /**
- * Hide the live "Agentic task insights" step-by-step timeline in chat
- * (default OFF). When true, the verbose per-agent step rows are collapsed
- * away: the chat shows only the existing message-bubble loading plus a
- * compact blinking "Processing" link while a turn is in flight. The full
- * timeline is still one click away via that link / the "View full agent
- * process Source" affordance, which open the existing side panel.
- */
- hideAgentInsights: boolean;
/**
* Active selection: a theme **family** id (`classic`, `ocean`, `matrix`,
* `hal9000`, `sepia`) or a custom theme id. Combined with
@@ -112,9 +101,7 @@ const initialState: ThemeState = {
tabBarLabels: 'hover',
fontSize: 'medium',
customFontSizePx: null,
- agentMessageViewMode: 'text',
developerMode: false,
- hideAgentInsights: false,
activeThemeId: DEFAULT_FAMILY_ID,
themeVariant: 'system',
customThemes: [],
@@ -206,15 +193,9 @@ const themeSlice = createSlice({
setCustomFontSizePx(state, action: PayloadAction<number | null>) {
state.customFontSizePx = action.payload === null ? null : clampFontSizePx(action.payload);
},
- setAgentMessageViewMode(state, action: PayloadAction<AgentMessageViewMode>) {
- state.agentMessageViewMode = action.payload;
- },
setDeveloperMode(state, action: PayloadAction<boolean>) {
state.developerMode = action.payload;
},
- setHideAgentInsights(state, action: PayloadAction<boolean>) {
- state.hideAgentInsights = action.payload;
- },
},
extraReducers: builder => {
builder.addCase(REHYDRATE, (state, action) => {
@@ -244,9 +225,7 @@ export const {
setTabBarLabels,
setFontSize,
setCustomFontSizePx,
- setAgentMessageViewMode,
setDeveloperMode,
- setHideAgentInsights,
setActiveTheme,
upsertCustomTheme,
deleteCustomTheme,
@@ -363,14 +342,6 @@ export function selectEffectiveTheme(state: { theme?: ThemeState }): Theme {
return effectiveThemeFromState(state.theme);
}
-/**
- * Selector for the persisted `hideAgentInsights` preference. Falls back to
- * `false` so existing persisted state (written before this field existed)
- * keeps the verbose timeline visible until the user opts out.
- */
-export const selectHideAgentInsights = (state: { theme: ThemeState }): boolean =>
- state.theme.hideAgentInsights ?? false;
-
/**
* Selector for the persisted `developerMode` preference.
* Use {@link useDeveloperMode} in components — it combines this with `IS_DEV`.