Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Python aicode-complexitycode-healthcode-intelligencecode-qualitydead-codedeveloper-toolsdocumentationgit-analyticsmcpopen-sourcepythonrefactoringstatic-analysistechnical-debt
feat(web): keep the sidebar open on Docs (#4186)
Raghav Chamadiya272848e1d7dc
diff --git a/docs/start/DASHBOARD.md b/docs/start/DASHBOARD.mdindex 1715dc63c..527dc9033 100644--- a/docs/start/DASHBOARD.md+++ b/docs/start/DASHBOARD.md@@ -68,9 +68,6 @@ page shows it, and a small History card beside the page summarises owners,hotspots and fix history. You can attach human notes to a page,and those notes survive regeneration.-The sidebar auto-collapses to icons here so the page gets the width, and-restores when you leave.-### Present mode (the hidden one)Inside the docs header there is a **Present** button. It turns the wiki youdiff --git a/packages/web/src/components/layout/sidebar.tsx b/packages/web/src/components/layout/sidebar.tsxindex 943755be6..687bf06c3 100644--- a/packages/web/src/components/layout/sidebar.tsx+++ b/packages/web/src/components/layout/sidebar.tsx@@ -72,25 +72,7 @@ export function Sidebar({});}}, [derivedActiveRepoId]);- // Docs is a reading surface — auto-collapse the sidebar on entering it so- // the page gets the width, and restore the previous state on leaving.- // Manual toggles always win while the route type is unchanged.- const isDocsRoute = /^\/repos\/[^/]+\/docs(\/|$)/.test(pathname ?? "");- const [collapsed, setCollapsed] = React.useState(isDocsRoute);- const preDocsCollapsed = React.useRef(false);- const wasDocsRoute = React.useRef(isDocsRoute);- React.useEffect(() => {- if (isDocsRoute === wasDocsRoute.current) return;- wasDocsRoute.current = isDocsRoute;- if (isDocsRoute) {- setCollapsed((c) => {- preDocsCollapsed.current = c;- return true;- });- } else {- setCollapsed(preDocsCollapsed.current);- }- }, [isDocsRoute]);+ const [collapsed, setCollapsed] = React.useState(false);// Workspace group: collapsed unless the user is on a workspace route, so// the (more used) per-repo navigation leads. Tracks route changes in both@@ -307,8 +289,7 @@ export function Sidebar({if (isIconOnly) {// Collapsed: the active repo still exposes its full nav as- // icons (so the repository-view options stay reachable, e.g.- // on Docs where the sidebar auto-collapses); inactive repos+ // icons (so the repository-view options stay reachable); inactive repos// stay a single dot that jumps to their overview.if (isActive) {return (