feat(ui): add sidebar density mode to session list (#764)

Adds compact/detailed toggle for the session list sidebar. Compact is the default (no behavior change for existing users). Detailed mode shows message count and model; profile names only appear when mixing sessions across profiles.

Fixes #673

Co-authored-by: franksong2702 <franksong2702@users.noreply.github.com>
This commit is contained in:
Frank Song
2026-04-21 03:43:40 +08:00
committed by GitHub
parent a8979f74d5
commit 0dd5d6f21c
10 changed files with 277 additions and 14 deletions

View File

@@ -1256,6 +1256,7 @@ _SETTINGS_DEFAULTS = {
"sound_enabled": False, # play notification sound when assistant finishes
"notifications_enabled": False, # browser notification when tab is in background
"bubble_layout": False, # right-aligned user / left-aligned assistant chat bubbles
"sidebar_density": "compact", # compact | detailed
"password_hash": None, # PBKDF2-HMAC-SHA256 hash; None = auth disabled
}
_SETTINGS_LEGACY_DROP_KEYS = {"assistant_language"}
@@ -1351,6 +1352,7 @@ def load_settings() -> dict:
_SETTINGS_ALLOWED_KEYS = set(_SETTINGS_DEFAULTS.keys()) - {"password_hash"}
_SETTINGS_ENUM_VALUES = {
"send_key": {"enter", "ctrl+enter"},
"sidebar_density": {"compact", "detailed"},
}
_SETTINGS_BOOL_KEYS = {
"onboarding_completed",