Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
fix(open-knowledge): stop horizontal scroll in project switcher menu (#1902)
Andrew Mikofalvy446b60ccc259
diff --git a/.changeset/project-switcher-overflow.md b/.changeset/project-switcher-overflow.mdnew file mode 100644index 000000000..1bab977d7--- /dev/null+++ b/.changeset/project-switcher-overflow.md@@ -0,0 +1,5 @@+---+"@inkeep/open-knowledge": patch+---++Fix horizontal scrolling in the project switcher's recent-projects menu. Long project names and paths now truncate with an ellipsis inside the dropdown instead of forcing the menu wider than its container and introducing a horizontal scrollbar. The recents list clips overflow on the x-axis, and each row shrinks to the menu width so both the name and the path ellipsize cleanly.diff --git a/packages/app/src/components/ProjectSwitcher.tsx b/packages/app/src/components/ProjectSwitcher.tsxindex b0f53523c..dd8f492ef 100644--- a/packages/app/src/components/ProjectSwitcher.tsx+++ b/packages/app/src/components/ProjectSwitcher.tsx@@ -185,17 +185,22 @@ export function ProjectSwitcher({ bridge }: ProjectSwitcherProps) {<Trans>No matching projects.</Trans></DropdownMenuLabel>) : (- <div className="max-h-64 overflow-y-auto overscroll-contain subtle-scrollbar scroll-fade-mask">+ <div className="max-h-64 overflow-x-hidden overflow-y-auto overscroll-contain subtle-scrollbar scroll-fade-mask">{filtered.slice(0, 10).map((row) => (<DropdownMenuItemkey={row.path}disabled={row.missing}onSelect={() => openProject(row.path)}- className="flex flex-col items-start gap-0.5"+ className="flex w-full min-w-0 flex-col items-start gap-0.5"data-testid={`project-switcher-recent-${row.path}`}>- <span className="font-medium text-sm">{row.name}</span>- <span className="max-w-[240px] truncate text-muted-foreground text-xs">+ <span className="w-full truncate font-medium text-sm" title={row.name}>+ {row.name}+ </span>+ <span+ className="w-full truncate text-muted-foreground text-xs"+ title={row.path}+ >{row.path}{row.missing ? t` (missing)` : ''}</span>