refactor(desktop): drop per-session icons, read-only cross-profile reads

The per-session icon picker added more noise than value — rip it out end
to end (sessions.icon column, set_session_icon, the PATCH field, the
picker UI, and the SessionInfo.icon type).

The cross-profile session aggregator now opens each profile's state.db
read-only (mode=ro, no schema init), so listing other profiles on every
sidebar refresh never DDLs or takes a write lock on their live DBs. The
single-profile hot path stays on par with /api/sessions.
This commit is contained in:
Brooklyn Nicholson
2026-06-04 18:24:35 -05:00
parent 48d8d80771
commit cf9dc366dd
7 changed files with 40 additions and 199 deletions
-14
View File
@@ -209,20 +209,6 @@ export function renameSession(
})
}
// Set ("" clears) a per-session icon glyph. `profile` targets another profile's
// session (the backend opens its state.db). Omit for the current profile.
export function setSessionIcon(
id: string,
icon: string,
profile?: string | null
): Promise<{ ok: boolean; icon: string | null }> {
return window.hermesDesktop.api<{ ok: boolean; icon: string | null }>({
path: `/api/sessions/${encodeURIComponent(id)}`,
method: 'PATCH',
body: { icon, ...(profile ? { profile } : {}) }
})
}
export function getGlobalModelInfo(): Promise<ModelInfoResponse> {
return window.hermesDesktop.api<ModelInfoResponse>({
...profileScoped(),