The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): default session list density to compact
Teknium865e4e71787f
diff --git a/apps/desktop/src/store/session-list-density.test.ts b/apps/desktop/src/store/session-list-density.test.tsindex 0a1107dea41..bde020789ad 100644--- a/apps/desktop/src/store/session-list-density.test.ts+++ b/apps/desktop/src/store/session-list-density.test.ts@@ -11,10 +11,10 @@ describe('session list density preference', () => {window.localStorage.clear()})- it('defaults to comfortable and persists changes', async () => {+ it('defaults to compact (pre-density behavior) and persists changes', async () => {const first = await loadStore()- expect(first.$sessionListDensity.get()).toBe('comfortable')+ expect(first.$sessionListDensity.get()).toBe('compact')first.setSessionListDensity('detailed')@@ -22,9 +22,9 @@ describe('session list density preference', () => {expect((await loadStore()).$sessionListDensity.get()).toBe('detailed')})- it('falls back to comfortable for an unknown stored value', async () => {+ it('falls back to compact for an unknown stored value', async () => {window.localStorage.setItem('hermes.desktop.sessionListDensity', 'tiny')- expect((await loadStore()).$sessionListDensity.get()).toBe('comfortable')+ expect((await loadStore()).$sessionListDensity.get()).toBe('compact')})})diff --git a/apps/desktop/src/store/session-list-density.ts b/apps/desktop/src/store/session-list-density.tsindex 5a703d390be..a2d0b355a41 100644--- a/apps/desktop/src/store/session-list-density.ts+++ b/apps/desktop/src/store/session-list-density.ts@@ -4,12 +4,14 @@ export type SessionListDensity = 'compact' | 'comfortable' | 'detailed'const STORAGE_KEY = 'hermes.desktop.sessionListDensity'+// Compact is the pre-density row exactly as it shipped, so existing users see+// no change until they opt into a denser-information mode themselves (#68119).const densityCodec: Codec<SessionListDensity> = {- decode: raw => (raw === 'compact' || raw === 'detailed' ? raw : 'comfortable'),+ decode: raw => (raw === 'comfortable' || raw === 'detailed' ? raw : 'compact'),encode: value => value}-export const $sessionListDensity = persistentAtom<SessionListDensity>(STORAGE_KEY, 'comfortable', densityCodec)+export const $sessionListDensity = persistentAtom<SessionListDensity>(STORAGE_KEY, 'compact', densityCodec)export function setSessionListDensity(density: SessionListDensity) {$sessionListDensity.set(density)