feat(client): let users hide and reorder sidebar rows and groups

Add a Customize sidebar mode, opened from any section menu or Cmd+K, that hides rows and groups
and reorders them by drag or keyboard, with reset and undo. The layout saves to a new
sidebarLayout setting; a hidden Book Dock or Requests row returns while work is waiting.
Also line up the Rows shown menu labels, which sat 3px apart.

Closes #1434
This commit is contained in:
neon
2026-10-20 16:38:23 +00:00
parent 568614265f
commit 3c87418416
26 changed files with 1598 additions and 78 deletions
+2
View File
@@ -47,6 +47,8 @@ export interface UserSettings {
/** Separate from dashboardConfig so legacy clients replacing it preserve shelf preferences. */
dashboardShelfConfig?: import("./dashboard").DashboardShelfConfig;
sidebarConfig?: import("./sidebar").SidebarConfig;
/** Separate from sidebarConfig so an older client rewriting that key cannot wipe the layout. */
sidebarLayout?: import("./sidebar").SidebarLayout | null;
achievementPreferences?: {
enabled?: boolean;
};
+13
View File
@@ -36,6 +36,19 @@ export interface SidebarConfig {
sections: Record<SidebarSectionId, SidebarSectionState>;
}
/**
* Which sidebar rows and groups a user hid, and the order they arranged them in. Ids are nav entry
* ids (`series`, `book-dock`) and group ids (`browse`, `libraries`); ids a client does not know are
* ignored, and ids missing from an order fall back to their default position.
*/
export interface SidebarLayout {
hidden: string[];
/** Movable groups, top to bottom. The top group is pinned and never listed. */
groupOrder: string[];
/** Row order inside each nav group, keyed by group id. */
rowOrder: Record<string, string[]>;
}
/** Totals behind the sidebar Browse badges, served as one cached payload so the shell needs a single request. */
export interface BrowseCounts {
authors: number;