feat(webui): expand and organize settings with autosave (#5704)
* feat(webui): expand settings with autosave and live configuration * feat(memory): add long-term memory and idle compaction switches * refactor(webui): clarify settings hierarchy and align compact controls * refactor(webui): keep only memory consolidation in memory settings * refactor(webui): defer runtime changes until explicit restart * refactor(webui): remove default workspace setting * fix(webui): align model lists and remove preset counters * fix(i18n): use natural Chinese labels for chat platforms * fix(i18n): shorten chat settings navigation label * fix(webui): match settings navigation icons to text size * refactor(webui): remove redundant settings sidebar heading * refactor(webui): use icon-only back navigation in settings * fix(webui): remove back arrow hover hint * refactor(webui): remove redundant overview details * refactor(webui): hide secondary descriptions in settings rows * style(webui): replace settings dividers with rounded highlights * refactor(webui): remove redundant model list subtitles and badges * fix(i18n): restore chat translation namespace boundaries * fix(i18n): complete settings translations for all locales * fix(webui): reveal settings only for enabled capabilities * fix(webui): consolidate capabilities and isolate settings feedback * fix(webui): clear restart notices when settings are reverted * fix(webui): anchor restart controls in settings sidebar * fix(webui): shorten sidebar restart label * fix(webui): align settings spacing and control sizes * refactor(webui): unify settings dialogs and interaction feedback * fix(webui): keep settings option groups on one line without scrolling * refactor(webui): align settings spacing and sidebar icon proportions * style(webui): match main sidebar typography to settings * style(webui): use monospace for sidebar session handles * refactor(webui): remove heartbeat configuration from automations * feat(webui): expose configuration actions beside capability toggles * style(webui): remove ellipsis from configuration actions * refactor(webui): remove redundant app configuration controls * feat(webui): add compact sidebar navigation and shortcut hints * fix(webui): synchronize npm dependency lockfile * test(webui): align input radius expectation with pill styling * feat(webui): show daily token usage and cache breakdown * feat(webui): add model usage details and cache hit rates * feat(webui): chart daily token usage by model * refactor(webui): simplify usage details and model labels * fix(webui): hide usage dialog date range * refactor(webui): consolidate model usage into chart legends * fix(webui): enforce restart choices and correct settings test route * fix(webui): polish settings localization and controls * fix(webui): avoid repeated usage legend labels * fix(webui): skip empty usage columns in keyboard navigation * test(webui): assert settings behavior positively * feat(webui): refine sidebar navigation and add drag resizing * style(webui): soften sidebar scroll edges * style(webui): harmonize sidebar typography and text colors * feat(webui): move channels to the main sidebar * style(webui): remove dotted underlines from settings hints * fix(webui): unify tooltip hover delay * fix(webui): support Seatbelt sandbox settings * fix(webui): remove unused appearance density preference * fix(webui): align settings input values consistently * style(webui): group compact settings controls before inputs * feat(webui): edit multiline settings in compact dialogs * feat(webui): add continuous settings scrolling with gentle snapping * Revert "feat(webui): add continuous settings scrolling with gentle snapping" This reverts commit f0978c261a53c844185eeab4d0c3190fbd196fe6.
This commit is contained in:
1 parent
20f115bf46
commit
8ea683679d
244 files changed
+6929
-3900
No files matched your search
@@ -1079,3 +1079,11 @@ export async function updateTranscriptionSettings(
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
export async function updateRuntimeConfigSettings(
|
||||
transport: WebUIMutationTransport,
|
||||
values: Record<string, import("@/lib/types").RuntimeConfigValue>,
|
||||
): Promise<SettingsPayload> {
|
||||
return mutation<SettingsPayload>(transport, "settings.runtime_config.update", { values });
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
export type LocalDensity = "comfortable" | "compact";
|
||||
export type LocalActivityMode = "auto" | "expanded";
|
||||
export type FileEditDisplayMode = "summary" | "diff" | "collapsed_diff";
|
||||
|
||||
export interface LocalPreferences {
|
||||
density: LocalDensity;
|
||||
activityMode: LocalActivityMode;
|
||||
codeWrap: boolean;
|
||||
brandLogos: boolean;
|
||||
@@ -20,7 +18,6 @@ type PersistedLocalPreferences = Partial<LocalPreferences> & {
|
||||
};
|
||||
|
||||
export const DEFAULT_LOCAL_PREFS: LocalPreferences = {
|
||||
density: "comfortable",
|
||||
activityMode: "auto",
|
||||
codeWrap: true,
|
||||
brandLogos: true,
|
||||
@@ -38,7 +35,6 @@ export function readLocalPreferences(): LocalPreferences {
|
||||
if (!raw) return DEFAULT_LOCAL_PREFS;
|
||||
const parsed = JSON.parse(raw) as PersistedLocalPreferences;
|
||||
return {
|
||||
density: parsed.density === "compact" ? "compact" : "comfortable",
|
||||
activityMode: parsed.activityMode === "expanded" ? "expanded" : "auto",
|
||||
codeWrap: parsed.codeWrap !== false,
|
||||
brandLogos: parsed.schemaVersion === LOCAL_PREFS_SCHEMA_VERSION
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
export const SIDEBAR_SHORTCUTS = {
|
||||
newChat: { key: "O", shift: true },
|
||||
search: { key: "K", shift: false },
|
||||
apps: { key: "1", shift: true },
|
||||
skills: { key: "2", shift: true },
|
||||
automations: { key: "3", shift: true },
|
||||
channels: { key: "4", shift: true },
|
||||
settings: { key: ",", shift: false },
|
||||
} as const;
|
||||
|
||||
export type SidebarShortcut = keyof typeof SIDEBAR_SHORTCUTS;
|
||||
|
||||
export function sidebarShortcutLabel(action: SidebarShortcut, apple: boolean): string {
|
||||
const { key, shift } = SIDEBAR_SHORTCUTS[action];
|
||||
return apple ? `⌘${shift ? "⇧" : ""}${key}` : `Ctrl+${shift ? "Shift+" : ""}${key}`;
|
||||
}
|
||||
|
||||
export function sidebarShortcutAria(action: SidebarShortcut): string {
|
||||
const { key, shift } = SIDEBAR_SHORTCUTS[action];
|
||||
const suffix = `${shift ? "Shift+" : ""}${key}`;
|
||||
return `Meta+${suffix} Control+${suffix}`;
|
||||
}
|
||||
|
||||
export function matchSidebarShortcut(event: KeyboardEvent): SidebarShortcut | undefined {
|
||||
if (event.defaultPrevented || event.repeat || event.isComposing || event.altKey ||
|
||||
!(event.metaKey || event.ctrlKey)) return undefined;
|
||||
return (Object.keys(SIDEBAR_SHORTCUTS) as SidebarShortcut[]).find((action) => {
|
||||
const { key, shift } = SIDEBAR_SHORTCUTS[action];
|
||||
return event.shiftKey === shift && (event.key.toUpperCase() === key ||
|
||||
(/^[0-9]$/.test(key) && event.code === `Digit${key}`));
|
||||
});
|
||||
}
|
||||
@@ -571,7 +571,11 @@ export interface ProviderOAuthPending {
|
||||
export type ProviderOAuthLoginResult = SettingsPayload | ProviderOAuthAuthorizationRequired;
|
||||
export type ProviderOAuthCompletionResult = SettingsPayload | ProviderOAuthPending;
|
||||
|
||||
export type RuntimeConfigValue = string | number | boolean | string[] | null;
|
||||
|
||||
|
||||
export interface SettingsPayload {
|
||||
runtime_config?: Record<string, RuntimeConfigValue>;
|
||||
surface?: RuntimeSurface;
|
||||
runtime_surface?: RuntimeSurface;
|
||||
runtime_capabilities?: RuntimeCapabilities;
|
||||
@@ -819,6 +823,12 @@ export interface SettingsPayload {
|
||||
timed_requests: number;
|
||||
duration_ms: number;
|
||||
}>;
|
||||
model_days_30d?: Array<{
|
||||
date: string;
|
||||
provider: string;
|
||||
model: string;
|
||||
total_tokens: number;
|
||||
}>;
|
||||
updated_at?: string | null;
|
||||
};
|
||||
advanced: {
|
||||
|
||||
Reference in new issue
Block a user