Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
feat(open-knowledge): VS Code-style file-tree sidebar density (#1903)
Andrew Mikofalvyff4ddfaee5cf
diff --git a/.changeset/sidebar-vscode-density.md b/.changeset/sidebar-vscode-density.mdnew file mode 100644index 000000000..480606b8b--- /dev/null+++ b/.changeset/sidebar-vscode-density.md@@ -0,0 +1,7 @@+---+"@inkeep/open-knowledge": minor+---++Sidebar density overhaul, modelled on VS Code / Cursor. Per-level indent drops from ~20px to ~10px, row height tightens from 30px to 24px, and the file icon shrinks from 16px to 14px, so longer filenames stay readable and more rows fit on screen at the same width. Indent guide lines are now visible at rest (not only on hover) so the tighter indent stays traceable. The pinned ancestor header that appears when you scroll into a deep subtree picks up a subtle elevation tint and a hairline divider so it reads as separate from the scrolling content. Long folder names now truncate at the end (`open-knowl…`) to match files, instead of in the middle (`open-…wledge`). The JSON/MDX extension badge still renders unchanged.++Updates `@pierre/trees` to `1.0.0-beta.4`; the file tree's reveal-on-activate now uses Pierre's native `scrollToPath` (replacing the previous hand-rolled scroll math).diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.mdindex e618c7262..7eea912a3 100644--- a/THIRD_PARTY_NOTICES.md+++ b/THIRD_PARTY_NOTICES.md@@ -744,7 +744,7 @@ Homepage: https://github.com/oramasearch/oramaCopyright 2023 OramaSearch Inc-### `@pierre/[email protected]`+### `@pierre/[email protected]`Copyright 2025 Pierre Computer Company@@ -6404,7 +6404,7 @@ The following MIT-licensed packages are patched in this repository via Bun's `pa| Package | Patch file || --- | --- || `@handlewithcare/[email protected]` | `patches/@handlewithcare%[email protected]` |-| `@pierre/[email protected]` | `patches/@pierre%[email protected]` |+| `@pierre/[email protected]` | `patches/@pierre%[email protected]` || `@tiptap/[email protected]` | `patches/@tiptap%[email protected]` || `@tiptap/[email protected]` | `patches/@tiptap%[email protected]` || `[email protected]` | `patches/[email protected]` |diff --git a/bun.lock b/bun.lockindex 383300d55..005855dcf 100644--- a/bun.lock+++ b/bun.lock@@ -93,7 +93,7 @@"@opentelemetry/resources": "^2.0.0","@opentelemetry/sdk-trace-web": "^2.0.0","@opentelemetry/semantic-conventions": "^1.30.0",- "@pierre/trees": "1.0.0-beta.3",+ "@pierre/trees": "1.0.0-beta.4","@tanstack/react-query": "^5.99.0","@tiptap/core": "^3.22.3","@tiptap/extension-collaboration": "^3.22.3",@@ -404,11 +404,11 @@},},"patchedDependencies": {+ "@pierre/[email protected]": "patches/@pierre%[email protected]","@tiptap/[email protected]": "patches/@tiptap%[email protected]","[email protected]": "patches/[email protected]","@handlewithcare/[email protected]": "patches/@handlewithcare%[email protected]","@tiptap/[email protected]": "patches/@tiptap%[email protected]",- "@pierre/[email protected]": "patches/@pierre%[email protected]","[email protected]": "patches/[email protected]","[email protected]": "patches/[email protected]",},@@ -1256,7 +1256,7 @@"@parcel/watcher-win32-x64": ["@parcel/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-hbQlYcCq5dlAX9Qx+kFb0FHue6vbjlf0FrNzSKdYK2APUf7tGfGxQCk2ihEREmbR6ZMc0MVAD5RIX/41gpUzTw=="],- "@pierre/trees": ["@pierre/[email protected]", "", { "dependencies": { "preact": "11.0.0-beta.0", "preact-render-to-string": "6.6.5" }, "peerDependencies": { "react": "^18.3.1 || ^19.0.0", "react-dom": "^18.3.1 || ^19.0.0" } }, "sha512-gfV7V1AoceIwTSFwiiWl/89gNtJROyo2dFeYYuAkT4F3AbE+ajCIGZEICBw1ygmVxVetF9Kq1Xpjz8BhXXZwTQ=="],+ "@pierre/trees": ["@pierre/[email protected]", "", { "dependencies": { "preact": "11.0.0-beta.0", "preact-render-to-string": "6.6.5" }, "peerDependencies": { "react": "^18.3.1 || ^19.0.0", "react-dom": "^18.3.1 || ^19.0.0" } }, "sha512-OfT1yk9ne8Te5+GB5zUY8yqE6B8BqjBHQJleH4lu8ltwNpoocZl4vXt1AzlEExpxI/pp+AFX5QG+lR3JjtTEag=="],"@pinojs/redact": ["@pinojs/[email protected]", "", {}, "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg=="],diff --git a/package.json b/package.jsonindex 96c0616f4..a41e8d74f 100644--- a/package.json+++ b/package.json@@ -74,6 +74,6 @@"[email protected]": "patches/[email protected]","[email protected]": "patches/[email protected]","@tiptap/[email protected]": "patches/@tiptap%[email protected]",- "@pierre/[email protected]": "patches/@pierre%[email protected]"+ "@pierre/[email protected]": "patches/@pierre%[email protected]"}}diff --git a/packages/app/package.json b/packages/app/package.jsonindex 6b42cf1a8..575482b85 100644--- a/packages/app/package.json+++ b/packages/app/package.json@@ -25,7 +25,7 @@"measure:fuzz": "bash scripts/measure-fuzz.sh","measure:stress": "bash scripts/measure-stress.sh","perf:compare": "bash scripts/perf-compare.sh",- "test:e2e": "playwright test tests/stress/ux-interactions.e2e.ts tests/stress/file-tree-create.e2e.ts tests/stress/file-tree-drag-to-root.e2e.ts tests/stress/file-tree-deselect-to-root.e2e.ts tests/stress/create-then-rename-editable.e2e.ts tests/stress/find-replace.e2e.ts tests/stress/editor-tabs.e2e.ts tests/stress/crdt-stress.e2e.ts tests/stress/slash-command.e2e.ts tests/stress/paste-fidelity.e2e.ts tests/stress/fr-7a-disconnect-source-mode.e2e.ts tests/stress/docs-open.e2e.ts tests/stress/frozen-table-headers.e2e.ts tests/stress/asset-embed.e2e.ts tests/stress/asset-embed-advanced.e2e.ts tests/stress/asset-click-dispatch.e2e.ts tests/stress/handoff.e2e.ts tests/stress/multi-agent-presence.e2e.ts tests/stress/editor-mode-persistence.e2e.ts tests/stress/sidebar-search-pill.e2e.ts tests/stress/command-palette-semantic.e2e.ts tests/stress/agent-activity-panel.e2e.ts tests/stress/drop-pipeline-auto-open.e2e.ts tests/stress/command-palette-flicker.e2e.ts tests/stress/cm6-list-hanging-indent.e2e.ts tests/stress/ng7-rapid-nav-coherence.e2e.ts tests/stress/init-load-byte-stable.e2e.ts tests/stress/single-file-ephemeral.e2e.ts tests/stress/reveal-on-activate.e2e.ts tests/stress/selection-indicator.e2e.ts tests/stress/new-file-cross-doc-bleed.e2e.ts tests/stress/editor-mode-flip-cross-doc-bleed.e2e.ts tests/stress/editor-area-viewport-resize.e2e.ts tests/stress/qa-sidebar-responsive.e2e.ts tests/stress/prd-6955-reassertion-repro.e2e.ts tests/stress/prd-6955-reassertion-wedge.e2e.ts tests/stress/prd-6914-repro.e2e.ts tests/stress/showall-lazy-tree.e2e.ts",+ "test:e2e": "playwright test tests/stress/ux-interactions.e2e.ts tests/stress/file-tree-create.e2e.ts tests/stress/file-tree-drag-to-root.e2e.ts tests/stress/file-tree-deselect-to-root.e2e.ts tests/stress/file-tree-compact-folders.e2e.ts tests/stress/create-then-rename-editable.e2e.ts tests/stress/find-replace.e2e.ts tests/stress/editor-tabs.e2e.ts tests/stress/crdt-stress.e2e.ts tests/stress/slash-command.e2e.ts tests/stress/paste-fidelity.e2e.ts tests/stress/fr-7a-disconnect-source-mode.e2e.ts tests/stress/docs-open.e2e.ts tests/stress/frozen-table-headers.e2e.ts tests/stress/asset-embed.e2e.ts tests/stress/asset-embed-advanced.e2e.ts tests/stress/asset-click-dispatch.e2e.ts tests/stress/handoff.e2e.ts tests/stress/multi-agent-presence.e2e.ts tests/stress/editor-mode-persistence.e2e.ts tests/stress/sidebar-search-pill.e2e.ts tests/stress/command-palette-semantic.e2e.ts tests/stress/agent-activity-panel.e2e.ts tests/stress/drop-pipeline-auto-open.e2e.ts tests/stress/command-palette-flicker.e2e.ts tests/stress/cm6-list-hanging-indent.e2e.ts tests/stress/ng7-rapid-nav-coherence.e2e.ts tests/stress/init-load-byte-stable.e2e.ts tests/stress/single-file-ephemeral.e2e.ts tests/stress/reveal-on-activate.e2e.ts tests/stress/selection-indicator.e2e.ts tests/stress/new-file-cross-doc-bleed.e2e.ts tests/stress/editor-mode-flip-cross-doc-bleed.e2e.ts tests/stress/editor-area-viewport-resize.e2e.ts tests/stress/qa-sidebar-responsive.e2e.ts tests/stress/prd-6955-reassertion-repro.e2e.ts tests/stress/prd-6955-reassertion-wedge.e2e.ts tests/stress/prd-6914-repro.e2e.ts tests/stress/showall-lazy-tree.e2e.ts","test:e2e:install-browsers": "playwright install chromium webkit firefox","test:visual": "playwright test --config playwright.visual.config.ts","test:visual:update": "playwright test --config playwright.visual.config.ts --update-snapshots",@@ -101,7 +101,7 @@"@opentelemetry/resources": "^2.0.0","@opentelemetry/sdk-trace-web": "^2.0.0","@opentelemetry/semantic-conventions": "^1.30.0",- "@pierre/trees": "1.0.0-beta.3",+ "@pierre/trees": "1.0.0-beta.4","@tanstack/react-query": "^5.99.0","@tiptap/core": "^3.22.3","@tiptap/extension-collaboration": "^3.22.3",diff --git a/packages/app/src/components/FileTree.tsx b/packages/app/src/components/FileTree.tsxindex ac2ea7dda..8889a88af 100644--- a/packages/app/src/components/FileTree.tsx+++ b/packages/app/src/components/FileTree.tsx@@ -26,7 +26,6 @@ import {type FileTreeDropResult,type FileTreeRenameEvent,type FileTree as PierreFileTreeModel,- themeToTreeStyles,} from '@pierre/trees';import { FileTree as PierreFileTree, useFileTree } from '@pierre/trees/react';import {@@ -49,7 +48,6 @@ import { __iconNode as botIcon } from 'lucide-react/dist/esm/icons/bot';import { __iconNode as link2Icon } from 'lucide-react/dist/esm/icons/link-2';import { useTheme } from 'next-themes';import {- type CSSProperties,type DragEvent as ReactDragEvent,type MouseEvent as ReactMouseEvent,type ReactNode,@@ -88,6 +86,12 @@ import {uploadedPathForSidebarDrop,uploadParentDocNameForFolderDrop,} from '@/components/file-tree-adapter';+import {+ createFileTreeStyle,+ FILE_TREE_DENSITY_OPTIONS,+ FILE_TREE_INDENT_GUIDE_CSS,+ FILE_TREE_STICKY_HEADER_CSS,+} from '@/components/file-tree-density';import {applyExtensionBadges,FILE_TREE_EXT_BADGE_CSS,@@ -363,36 +367,7 @@ const FILE_TREE_CREATION_CLEARED_CSS = `}`;-const FILE_TREE_UNSAFE_CSS = `${FILE_TREE_EXT_BADGE_CSS}\n${FILE_TREE_RENAME_CHIP_CSS}\n${FILE_TREE_ROOT_DROP_CSS}\n${FILE_TREE_EXTERNAL_FILE_DROP_CSS}\n${FILE_TREE_CREATION_CLEARED_CSS}`;--function createFileTreeStyle(resolvedTheme: string | undefined): CSSProperties {- return {- ...themeToTreeStyles({- type: resolvedTheme === 'dark' ? 'dark' : 'light',- colors: {- 'sideBar.background': 'var(--sidebar)',- 'sideBar.foreground': 'var(--sidebar-foreground)',- 'sideBar.border': 'var(--sidebar-border)',- 'list.activeSelectionBackground': 'var(--sidebar-accent)',- 'list.activeSelectionForeground': 'var(--sidebar-accent-foreground)',- 'list.hoverBackground': 'var(--sidebar-hover)',- focusBorder: 'var(--color-primary)',- 'input.background': 'var(--input)',- 'input.border': 'var(--border)',- },- }),- '--trees-font-family-override': 'var(--font-sans)',- '--trees-font-size-override': '0.875rem',- '--trees-item-padding-x-override': '0.5rem',- '--trees-padding-inline-override': '0.5rem',- '--trees-border-radius-override': '0.375rem',- '--trees-selected-fg': 'var(--color-primary)',- '--truncate-marker-fade-in-duration': '0s', // render ellipsis without delay- '--trees-file-icon-color-markdown': 'light-dark(var(--color-gray-400), var(--color-gray-500))',- '--trees-file-icon-color-image': 'light-dark(var(--color-gray-400), var(--color-gray-500))',- '--trees-fg-muted': 'light-dark(var(--color-gray-400), var(--color-gray-500))',- } as CSSProperties;-}+const FILE_TREE_UNSAFE_CSS = `${FILE_TREE_EXT_BADGE_CSS}\n${FILE_TREE_RENAME_CHIP_CSS}\n${FILE_TREE_ROOT_DROP_CSS}\n${FILE_TREE_EXTERNAL_FILE_DROP_CSS}\n${FILE_TREE_CREATION_CLEARED_CSS}\n${FILE_TREE_INDENT_GUIDE_CSS}\n${FILE_TREE_STICKY_HEADER_CSS}`;function isAgentTreePath(treePath: string): boolean {const name = treePath.split('/').pop()?.replace(/\.md$/i, '').toLowerCase();@@ -1410,11 +1385,11 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {const { model } = useFileTree({paths: [],- flattenEmptyDirectories: false,initialExpansion: 'closed',fileTreeSearchMode: 'hide-non-matches',initialVisibleRowCount: 18,stickyFolders: true,+ ...FILE_TREE_DENSITY_OPTIONS,icons: {set: 'complete',spriteSheet: FILE_TREE_DECORATION_SPRITE_SHEET,@@ -2003,7 +1978,7 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {// biome-ignore lint/correctness/useExhaustiveDependencies: activeAncestorTreePathsSignature + treePathsSignature are re-run triggers — the row's visible index shifts when ancestors expand or the tree repopulates.useEffect(() => {if (loading || !activeTreePath) return;- revealActiveRow(fileTreeHostRef.current, model);+ revealActiveRow(model);}, [activeTreePath, activeAncestorTreePathsSignature, treePathsSignature, loading, model]);useEffect(() => {diff --git a/packages/app/src/components/file-tree-density.test.ts b/packages/app/src/components/file-tree-density.test.tsnew file mode 100644index 000000000..0e055c14e--- /dev/null+++ b/packages/app/src/components/file-tree-density.test.ts@@ -0,0 +1,118 @@+import { describe, expect, test } from 'bun:test';+import {+ createFileTreeStyle,+ FILE_TREE_DENSITY_OPTIONS,+ FILE_TREE_INDENT_GUIDE_CSS,+ FILE_TREE_STICKY_HEADER_CSS,+} from './file-tree-density';++describe('FileTree density configuration', () => {+ test('uses the Pierre compact density preset', () => {+ expect(FILE_TREE_DENSITY_OPTIONS.density).toBe('compact');+ });++ test('pins compact-folders (flattenEmptyDirectories) OFF — beta.4 defaults it on; deferred pending lazy-load support', () => {+ expect(FILE_TREE_DENSITY_OPTIONS.flattenEmptyDirectories).toBe(false);+ });++ test('overrides per-level and row-height vars in both themes', () => {+ for (const theme of ['light', 'dark'] as const) {+ const style = createFileTreeStyle(theme) as Record<string, string | number>;+ expect(style['--trees-level-gap-override']).toBe('3px');+ expect(style['--trees-item-row-gap-override']).toBe('2px');+ expect(style['--trees-item-height']).toBe('24px');+ }+ });++ test('overrides icon-width below the Pierre 16px default in both themes', () => {+ for (const theme of ['light', 'dark'] as const) {+ const style = createFileTreeStyle(theme) as Record<string, string>;+ const iconWidth = style['--trees-icon-width-override'];+ expect(iconWidth).toBe('14px');+ const px = Number.parseInt(iconWidth.slice(0, -2), 10);+ expect(px).toBeLessThan(16);+ }+ });++ test('row height clamp is at or below 24px to keep VS Code-style compactness', () => {+ const style = createFileTreeStyle('dark') as Record<string, string>;+ const itemHeight = style['--trees-item-height'];+ expect(itemHeight).toMatch(/^(\d+)px$/);+ const px = Number.parseInt(itemHeight.slice(0, -2), 10);+ expect(px).toBeLessThanOrEqual(24);+ });++ test('preserves existing typography + padding overrides alongside density', () => {+ const style = createFileTreeStyle('light') as Record<string, string | number>;+ expect(style['--trees-font-size-override']).toBe('0.875rem');+ expect(style['--trees-item-padding-x-override']).toBe('0.5rem');+ expect(style['--trees-padding-inline-override']).toBe('0.5rem');+ expect(style['--trees-border-radius-override']).toBe('0.375rem');+ });++ test('overrides indent-guide bg to lift its alpha out of Pierre defaults', () => {+ for (const theme of ['light', 'dark'] as const) {+ const style = createFileTreeStyle(theme) as Record<string, string>;+ const guideBg = style['--trees-indent-guide-bg-override'];+ expect(guideBg).toMatch(/color-mix\(in oklab,.*var\(--trees-fg-muted\)/);+ const alphaMatch = guideBg.match(/(\d+)%/);+ expect(alphaMatch).not.toBeNull();+ const alpha = Number.parseInt(alphaMatch?.[1] ?? '0', 10);+ expect(alpha).toBeGreaterThanOrEqual(25);+ expect(alpha).toBeLessThanOrEqual(35);+ }+ });+});++describe('FileTree indent-guide CSS', () => {+ function extractOpacityRules(): Array<{ selector: string; opacity: number }> {+ const matches = FILE_TREE_INDENT_GUIDE_CSS.matchAll(+ /([^{}]+)\{[^}]*opacity:\s*([\d.]+)\s*;?[^}]*\}/g,+ );+ return Array.from(matches, (m) => ({+ selector: m[1].trim(),+ opacity: Number.parseFloat(m[2]),+ }));+ }++ test('targets Pierre indent-guide spacing-item selector', () => {+ expect(FILE_TREE_INDENT_GUIDE_CSS).toContain(`[data-item-section='spacing-item']`);+ });++ test('resting opacity on the spacing-item is greater than zero (visible at rest)', () => {+ const rules = extractOpacityRules();+ const restingRule = rules.find((r) => r.selector === `[data-item-section='spacing-item']`);+ expect(restingRule).toBeDefined();+ expect(restingRule?.opacity).toBeGreaterThan(0);+ });++ test('hover state keeps a stronger contrast than rest', () => {+ const rules = extractOpacityRules();+ const restingRule = rules.find((r) => r.selector === `[data-item-section='spacing-item']`);+ const hoverRule = rules.find((r) => r.selector.includes(':host(:hover)'));+ expect(restingRule?.opacity).toBeDefined();+ expect(hoverRule?.opacity).toBeDefined();+ expect((hoverRule?.opacity ?? 0) > (restingRule?.opacity ?? 0)).toBe(true);+ });+});++describe('FileTree sticky-header CSS', () => {+ test('targets the Pierre sticky overlay-content scope', () => {+ expect(FILE_TREE_STICKY_HEADER_CSS).toContain(`[data-file-tree-sticky-overlay-content='true']`);+ });++ test('redefines --trees-bg inside the sticky scope so pinned rows pick up an elevation tint', () => {+ expect(FILE_TREE_STICKY_HEADER_CSS).toMatch(/--trees-bg:\s*color-mix\(in oklab,/);+ expect(FILE_TREE_STICKY_HEADER_CSS).not.toMatch(/--trees-bg-muted\s*:/);+ expect(FILE_TREE_STICKY_HEADER_CSS).not.toMatch(/--trees-selected-bg\s*:/);+ });++ test('paints a hairline divider via box-shadow keyed to --sidebar-border', () => {+ expect(FILE_TREE_STICKY_HEADER_CSS).toMatch(/box-shadow:[^;]*var\(--sidebar-border\)/);+ });++ test('forced-colors fallback paints a CanvasText border-bottom (box-shadow + color-mix tints both suppressed in HCM)', () => {+ expect(FILE_TREE_STICKY_HEADER_CSS).toMatch(/@media \(forced-colors: active\)/);+ expect(FILE_TREE_STICKY_HEADER_CSS).toMatch(/border-bottom:[^;]*CanvasText/);+ });+});diff --git a/packages/app/src/components/file-tree-density.ts b/packages/app/src/components/file-tree-density.tsnew file mode 100644index 000000000..e3dc951da--- /dev/null+++ b/packages/app/src/components/file-tree-density.ts@@ -0,0 +1,70 @@+import { themeToTreeStyles } from '@pierre/trees';+import type { CSSProperties } from 'react';++export const FILE_TREE_DENSITY_OPTIONS = {+ density: 'compact',+ flattenEmptyDirectories: false,+} as const;++const FILE_TREE_DENSITY_STYLE = {+ '--trees-level-gap-override': '3px',+ '--trees-item-row-gap-override': '2px',+ '--trees-icon-width-override': '14px',+ '--trees-item-height': '24px',+ '--trees-indent-guide-bg-override': 'color-mix(in oklab, var(--trees-fg-muted) 30%, transparent)',+} as const;++export const FILE_TREE_INDENT_GUIDE_CSS = `+ [data-item-section='spacing-item'] {+ opacity: 0.5;+ }+ :host(:hover) [data-item-section='spacing-item'] {+ opacity: 0.85;+ }+`;++export const FILE_TREE_STICKY_HEADER_CSS = `+ [data-file-tree-sticky-overlay-content='true'] {+ --trees-bg: color-mix(in oklab, var(--sidebar) 92%, var(--sidebar-foreground) 8%);+ box-shadow: 0 1px 0 0 var(--sidebar-border);+ }+ /* Forced-colors mode suppresses box-shadow and overrides color-mix tints,+ so the divider above would vanish and the pinned region would read as+ part of scrolling content. Borders survive forced-colors — mirror the+ fallback pattern used by FILE_TREE_ROOT_DROP_CSS. */+ @media (forced-colors: active) {+ [data-file-tree-sticky-overlay-content='true'] {+ border-bottom: 1px solid CanvasText;+ }+ }+`;++export function createFileTreeStyle(resolvedTheme: string | undefined): CSSProperties {+ return {+ ...themeToTreeStyles({+ type: resolvedTheme === 'dark' ? 'dark' : 'light',+ colors: {+ 'sideBar.background': 'var(--sidebar)',+ 'sideBar.foreground': 'var(--sidebar-foreground)',+ 'sideBar.border': 'var(--sidebar-border)',+ 'list.activeSelectionBackground': 'var(--sidebar-accent)',+ 'list.activeSelectionForeground': 'var(--sidebar-accent-foreground)',+ 'list.hoverBackground': 'var(--sidebar-hover)',+ focusBorder: 'var(--color-primary)',+ 'input.background': 'var(--input)',+ 'input.border': 'var(--border)',+ },+ }),+ '--trees-font-family-override': 'var(--font-sans)',+ '--trees-font-size-override': '0.875rem',+ '--trees-item-padding-x-override': '0.5rem',+ '--trees-padding-inline-override': '0.5rem',+ '--trees-border-radius-override': '0.375rem',+ '--trees-selected-fg': 'var(--color-primary)',+ '--truncate-marker-fade-in-duration': '0s', // render ellipsis without delay+ '--trees-file-icon-color-markdown': 'light-dark(var(--color-gray-400), var(--color-gray-500))',+ '--trees-file-icon-color-image': 'light-dark(var(--color-gray-400), var(--color-gray-500))',+ '--trees-fg-muted': 'light-dark(var(--color-gray-400), var(--color-gray-500))',+ ...FILE_TREE_DENSITY_STYLE,+ } as CSSProperties;+}diff --git a/packages/app/src/components/file-tree-extension-badge.dom.test.tsx b/packages/app/src/components/file-tree-extension-badge.dom.test.tsxindex cec507a07..dacb7be51 100644--- a/packages/app/src/components/file-tree-extension-badge.dom.test.tsx+++ b/packages/app/src/components/file-tree-extension-badge.dom.test.tsx@@ -4,6 +4,7 @@ import {applyExtensionBadges,OK_EXT_BADGE_ATTR,OK_EXT_ROW_ATTR,+ OK_FULLNAME_ROW_ATTR,} from './file-tree-extension-badge';interface PierreRowInit {@@ -11,6 +12,7 @@ interface PierreRowInit {filename: string;includeDecoration?: boolean;includeAction?: boolean;+ centerSplit?: [string, string];}function buildPierreRow(init: PierreRowInit): HTMLElement {@@ -26,10 +28,16 @@ function buildPierreRow(init: PierreRowInit): HTMLElement {truncateGroup.setAttribute('data-truncate-group-container', 'middle');contentSection.appendChild(truncateGroup);- const lastDot = init.filename.lastIndexOf('.');- const splitIndex = lastDot >= 0 ? lastDot + 1 : init.filename.length;- const basenameText = init.filename.slice(0, splitIndex);- const extensionText = init.filename.slice(splitIndex);+ let basenameText: string;+ let extensionText: string;+ if (init.centerSplit) {+ [basenameText, extensionText] = init.centerSplit;+ } else {+ const lastDot = init.filename.lastIndexOf('.');+ const splitIndex = lastDot >= 0 ? lastDot + 1 : init.filename.length;+ basenameText = init.filename.slice(0, splitIndex);+ extensionText = init.filename.slice(splitIndex);+ }truncateGroup.appendChild(buildTruncateSegment('1', basenameText, 'truncate'));truncateGroup.appendChild(buildTruncateSegment('1', extensionText, 'fruncate'));@@ -299,4 +307,70 @@ describe('applyExtensionBadges — extension badge injection', () => {const row = root.firstElementChild as HTMLElement;expect(badgeOf(row)?.getAttribute('aria-hidden')).toBe('true');});++ test('folder row: recomposes Pierre center-split into a single end-truncating full name', () => {+ const root = document.createElement('div');+ root.appendChild(+ buildPierreRow({+ path: 'projects/open-knowledge/',+ filename: 'open-knowledge',+ centerSplit: ['open-kn', 'owledge'],+ includeAction: true,+ }),+ );++ applyExtensionBadges(root);++ const row = root.firstElementChild as HTMLElement;+ expect(row.hasAttribute(OK_FULLNAME_ROW_ATTR)).toBe(true);+ expect(row.hasAttribute(OK_EXT_ROW_ATTR)).toBe(false);+ expect(badgeOf(row)).toBeNull();+ expect(basenameTextOf(row)).toBe('open-knowledge');+ });++ test('folder recompose is idempotent (repeat call leaves the same text node)', () => {+ const root = document.createElement('div');+ root.appendChild(+ buildPierreRow({+ path: 'projects/open-knowledge/',+ filename: 'open-knowledge',+ centerSplit: ['open-kn', 'owledge'],+ includeAction: true,+ }),+ );++ applyExtensionBadges(root);+ const first = basenameTextOf(root.firstElementChild as HTMLElement);+ applyExtensionBadges(root);+ const second = basenameTextOf(root.firstElementChild as HTMLElement);++ expect(first).toBe('open-knowledge');+ expect(second).toBe('open-knowledge');+ });++ test('flattened breadcrumb row (no middle truncate group) is left untouched', () => {+ const root = document.createElement('div');+ const row = document.createElement('div');+ row.setAttribute('data-type', 'item');+ row.setAttribute('data-item-path', 'public/open-knowledge/docs/');+ const content = document.createElement('div');+ content.setAttribute('data-item-section', 'content');+ const flattened = document.createElement('div');+ flattened.setAttribute('data-item-flattened-subitems', '');+ for (const seg of ['public', 'open-knowledge', 'docs']) {+ const sub = document.createElement('span');+ sub.setAttribute('data-item-flattened-subitem', seg);+ sub.textContent = seg;+ flattened.appendChild(sub);+ }+ content.appendChild(flattened);+ row.appendChild(content);+ root.appendChild(row);++ applyExtensionBadges(root);++ expect(row.hasAttribute(OK_FULLNAME_ROW_ATTR)).toBe(false);+ expect(row.hasAttribute(OK_EXT_ROW_ATTR)).toBe(false);+ expect(badgeOf(row)).toBeNull();+ });});diff --git a/packages/app/src/components/file-tree-extension-badge.ts b/packages/app/src/components/file-tree-extension-badge.tsindex d45c86ec6..bdf5e3af2 100644--- a/packages/app/src/components/file-tree-extension-badge.ts+++ b/packages/app/src/components/file-tree-extension-badge.ts@@ -2,6 +2,7 @@ import { getFileExtension } from '@/components/file-tree-rename-validation';export const OK_EXT_BADGE_ATTR = 'data-ok-ext-badge';export const OK_EXT_ROW_ATTR = 'data-ok-ext-row';+export const OK_FULLNAME_ROW_ATTR = 'data-ok-fullname-row';export const FILE_TREE_EXT_BADGE_CSS = `[data-item-selected='true'] [data-icon-token='markdown'] {@@ -10,6 +11,9 @@ export const FILE_TREE_EXT_BADGE_CSS = `[data-type='item'][${OK_EXT_ROW_ATTR}] [data-truncate-segment-priority]:last-child {display: none;}+ [data-type='item'][${OK_FULLNAME_ROW_ATTR}] [data-truncate-segment-priority]:last-child {+ display: none;+ }[${OK_EXT_BADGE_ATTR}] {display: inline-block;margin-left: 0.375rem;@@ -28,29 +32,25 @@ export function applyExtensionBadges(root: ParentNode): void {const rows = root.querySelectorAll<HTMLElement>('[data-type="item"][data-item-path]');for (const row of rows) {const treePath = row.dataset.itemPath;- if (!treePath || treePath.endsWith('/')) {+ if (!treePath) {clearExtensionRow(row);continue;}+ if (treePath.endsWith('/')) {+ applyFullNameEndTruncation(row, treePath);+ continue;+ }const ext = getFileExtension(treePath);if (!ext) {clearExtensionRow(row);continue;}- const truncateGroup = row.querySelector<HTMLElement>(- '[data-truncate-group-container="middle"]',- );- if (!truncateGroup) continue;-- const segments = truncateGroup.querySelectorAll<HTMLElement>(- '[data-truncate-segment-priority]',- );- if (segments.length < 2) continue;- const basenameSeg = segments[0];+ const basenameSeg = resolveBasenameSegment(row);if (!basenameSeg) continue;row.setAttribute(OK_EXT_ROW_ATTR, '');+ row.removeAttribute(OK_FULLNAME_ROW_ATTR);trimTrailingDotInBasenameSegment(basenameSeg);const isMarkdown = ext.toLowerCase() === '.md';@@ -69,20 +69,58 @@ function removeStaleBadge(row: HTMLElement): void {function clearExtensionRow(row: HTMLElement): void {row.removeAttribute(OK_EXT_ROW_ATTR);+ row.removeAttribute(OK_FULLNAME_ROW_ATTR);removeStaleBadge(row);}-function trimTrailingDotInBasenameSegment(basenameSeg: HTMLElement): void {- const contentDivs = basenameSeg.querySelectorAll<HTMLElement>('[data-truncate-content]');+function resolveBasenameSegment(row: HTMLElement): HTMLElement | null {+ const truncateGroup = row.querySelector<HTMLElement>('[data-truncate-group-container="middle"]');+ if (!truncateGroup) return null;+ const segments = truncateGroup.querySelectorAll<HTMLElement>('[data-truncate-segment-priority]');+ if (segments.length < 2) return null;+ return segments[0] ?? null;+}++function applyFullNameEndTruncation(row: HTMLElement, treePath: string): void {+ row.removeAttribute(OK_EXT_ROW_ATTR);+ removeStaleBadge(row);++ const basenameSeg = resolveBasenameSegment(row);+ const name = leafName(treePath);+ if (!basenameSeg || !name) {+ row.removeAttribute(OK_FULLNAME_ROW_ATTR);+ return;+ }++ setSegmentText(basenameSeg, name);+ row.setAttribute(OK_FULLNAME_ROW_ATTR, '');+}++function leafName(treePath: string): string {+ const trimmed = treePath.replace(/\/+$/, '');+ const slash = trimmed.lastIndexOf('/');+ return slash >= 0 ? trimmed.slice(slash + 1) : trimmed;+}++function mapSegmentTextNodes(segment: HTMLElement, transform: (current: string) => string): void {+ const contentDivs = segment.querySelectorAll<HTMLElement>('[data-truncate-content]');for (const contentDiv of contentDivs) {const firstChild = contentDiv.firstChild;if (!firstChild || firstChild.nodeType !== Node.TEXT_NODE) continue;const current = firstChild.textContent ?? '';- if (!current.endsWith('.')) continue;- firstChild.textContent = current.replace(/\.+$/, '');+ const next = transform(current);+ if (next !== current) firstChild.textContent = next;}}+function setSegmentText(segment: HTMLElement, text: string): void {+ mapSegmentTextNodes(segment, () => text);+}++function trimTrailingDotInBasenameSegment(basenameSeg: HTMLElement): void {+ mapSegmentTextNodes(basenameSeg, (current) => current.replace(/\.+$/, ''));+}+function upsertBadge(row: HTMLElement, label: string): void {let badge = row.querySelector<HTMLSpanElement>(`[${OK_EXT_BADGE_ATTR}]`);if (!badge) {diff --git a/packages/app/src/components/file-tree-reveal.dom.test.tsx b/packages/app/src/components/file-tree-reveal.dom.test.tsxdeleted file mode 100644index 83f313a56..000000000--- a/packages/app/src/components/file-tree-reveal.dom.test.tsx+++ /dev/null@@ -1,87 +0,0 @@-import { afterEach, describe, expect, mock, test } from 'bun:test';-import { cleanup, render } from '@testing-library/react';-import { useEffect } from 'react';--const FILE_TREE_TAG_NAME = 'file-tree-container';-mock.module('@pierre/trees', () => ({ FILE_TREE_TAG_NAME }));--const { revealActiveRow } = await import('./file-tree-reveal');--afterEach(cleanup);--type RevealModel = { getFocusedIndex: () => number; getItemHeight: () => number };--function RevealHarness({ host, model }: { host: HTMLElement | null; model: RevealModel }) {- useEffect(() => {- revealActiveRow(host, model);- }, [host, model]);- return null;-}--interface FakeHostOptions {- viewportHeight: number;- scrollTop: number;- withScrollEl?: boolean;-}--function buildHost({ viewportHeight, scrollTop, withScrollEl = true }: FakeHostOptions) {- const host = document.createElement('div');- const container = document.createElement(FILE_TREE_TAG_NAME);- const shadow = container.attachShadow({ mode: 'open' });- let scrollEl: HTMLElement | null = null;- if (withScrollEl) {- scrollEl = document.createElement('div');- scrollEl.setAttribute('data-file-tree-virtualized-scroll', 'true');- Object.defineProperty(scrollEl, 'clientHeight', { value: viewportHeight, configurable: true });- let stored = scrollTop;- Object.defineProperty(scrollEl, 'scrollTop', {- get: () => stored,- set: (v: number) => {- stored = v;- },- configurable: true,- });- shadow.appendChild(scrollEl);- }- host.appendChild(container);- return { host, scrollEl };-}--function stubModel(focusedIndex: number, itemHeight = 24) {- return { getFocusedIndex: () => focusedIndex, getItemHeight: () => itemHeight };-}--describe('revealActiveRow (via the reveal effect)', () => {- test('walks the shadow DOM and scrolls a below-fold row into view', () => {- const { host, scrollEl } = buildHost({ viewportHeight: 240, scrollTop: 0 });- render(<RevealHarness host={host} model={stubModel(30)} />);- expect(scrollEl?.scrollTop).toBe(504);- });-- test('no-ops when there is no focused row (index < 0)', () => {- const { host, scrollEl } = buildHost({ viewportHeight: 240, scrollTop: 120 });- render(<RevealHarness host={host} model={stubModel(-1)} />);- expect(scrollEl?.scrollTop).toBe(120);- });-- test('leaves scrollTop unchanged when the row is already visible', () => {- const { host, scrollEl } = buildHost({ viewportHeight: 240, scrollTop: 0 });- render(<RevealHarness host={host} model={stubModel(5)} />); // row 5 spans 120-144- expect(scrollEl?.scrollTop).toBe(0);- });-- test('scrolls up when the row lands under the sticky-folder inset', () => {- const { host, scrollEl } = buildHost({ viewportHeight: 240, scrollTop: 240 });- render(<RevealHarness host={host} model={stubModel(10)} />);- expect(scrollEl?.scrollTop).toBe(216);- });-- test('does not throw when the virtualized scroll element is absent', () => {- const { host } = buildHost({ viewportHeight: 240, scrollTop: 0, withScrollEl: false });- expect(() => render(<RevealHarness host={host} model={stubModel(30)} />)).not.toThrow();- });-- test('no-ops on a null host', () => {- expect(() => render(<RevealHarness host={null} model={stubModel(30)} />)).not.toThrow();- });-});diff --git a/packages/app/src/components/file-tree-reveal.test.ts b/packages/app/src/components/file-tree-reveal.test.tsnew file mode 100644index 000000000..0233df262--- /dev/null+++ b/packages/app/src/components/file-tree-reveal.test.ts@@ -0,0 +1,32 @@+import { describe, expect, mock, test } from 'bun:test';+import type { FileTree } from '@pierre/trees';+import { revealActiveRow } from './file-tree-reveal';++type RevealModel = Pick<FileTree, 'getFocusedPath' | 'scrollToPath'>;++function makeModel(focusedPath: string | null) {+ const scrollToPath = mock(() => {});+ const model = {+ getFocusedPath: () => focusedPath,+ scrollToPath,+ } as unknown as RevealModel;+ return { model, scrollToPath };+}++describe('revealActiveRow', () => {+ test('scrolls the focused path into view without stealing DOM focus', () => {+ const { model, scrollToPath } = makeModel('docs/quickstart');+ revealActiveRow(model);+ expect(scrollToPath).toHaveBeenCalledTimes(1);+ expect(scrollToPath).toHaveBeenCalledWith('docs/quickstart', {+ offset: 'nearest',+ focus: false,+ });+ });++ test('no-ops when there is no focused row', () => {+ const { model, scrollToPath } = makeModel(null);+ revealActiveRow(model);+ expect(scrollToPath).not.toHaveBeenCalled();+ });+});diff --git a/packages/app/src/components/file-tree-reveal.ts b/packages/app/src/components/file-tree-reveal.tsindex 3a3f9ca86..58e6e7848 100644--- a/packages/app/src/components/file-tree-reveal.ts+++ b/packages/app/src/components/file-tree-reveal.ts@@ -1,22 +1,9 @@-import { FILE_TREE_TAG_NAME, type FileTree as PierreFileTreeModel } from '@pierre/trees';-import { computeRevealScrollTop } from '@/components/file-tree-scroll';+import type { FileTree as PierreFileTreeModel } from '@pierre/trees';-type RevealModel = Pick<PierreFileTreeModel, 'getFocusedIndex' | 'getItemHeight'>;+type RevealModel = Pick<PierreFileTreeModel, 'getFocusedPath' | 'scrollToPath'>;-export function revealActiveRow(host: HTMLElement | null, model: RevealModel): void {- const focusedIndex = model.getFocusedIndex();- if (focusedIndex < 0) return;- const scrollEl = host- ?.querySelector(FILE_TREE_TAG_NAME)- ?.shadowRoot?.querySelector<HTMLElement>('[data-file-tree-virtualized-scroll]');- if (!scrollEl) return;- const itemHeight = model.getItemHeight();- const nextScrollTop = computeRevealScrollTop({- focusedIndex,- itemHeight,- viewportHeight: scrollEl.clientHeight,- currentScrollTop: scrollEl.scrollTop,- topInset: itemHeight,- });- if (nextScrollTop !== null) scrollEl.scrollTop = nextScrollTop;+export function revealActiveRow(model: RevealModel): void {+ const focusedPath = model.getFocusedPath();+ if (!focusedPath) return;+ model.scrollToPath(focusedPath, { offset: 'nearest', focus: false });}diff --git a/packages/app/src/components/file-tree-scroll.test.ts b/packages/app/src/components/file-tree-scroll.test.tsdeleted file mode 100644index 30f71d258..000000000--- a/packages/app/src/components/file-tree-scroll.test.ts+++ /dev/null@@ -1,34 +0,0 @@-import { describe, expect, test } from 'bun:test';-import { computeRevealScrollTop } from './file-tree-scroll';--describe('computeRevealScrollTop', () => {- const base = { itemHeight: 24, viewportHeight: 240, currentScrollTop: 240 };-- test('returns null when there is no focused row', () => {- expect(computeRevealScrollTop({ ...base, focusedIndex: -1 })).toBeNull();- });-- test('returns null when the row is already fully visible', () => {- expect(computeRevealScrollTop({ ...base, focusedIndex: 12 })).toBeNull();- });-- test('scrolls up to reveal a row above the viewport', () => {- expect(computeRevealScrollTop({ ...base, focusedIndex: 2 })).toBe(48);- });-- test('scrolls down to reveal a row below the viewport', () => {- expect(computeRevealScrollTop({ ...base, focusedIndex: 30 })).toBe(504);- });-- test('clamps at 0 when topInset would push the target negative', () => {- expect(computeRevealScrollTop({ ...base, focusedIndex: 0, topInset: 24 })).toBe(0);- });-- test('returns null when the computed scrollTop equals the current one', () => {- expect(computeRevealScrollTop({ ...base, focusedIndex: 10 })).toBeNull();- });-- test('treats a row occluded by the sticky inset as above the viewport', () => {- expect(computeRevealScrollTop({ ...base, focusedIndex: 10, topInset: 24 })).toBe(216);- });-});diff --git a/packages/app/src/components/file-tree-scroll.ts b/packages/app/src/components/file-tree-scroll.tsdeleted file mode 100644index 90887d86a..000000000--- a/packages/app/src/components/file-tree-scroll.ts+++ /dev/null@@ -1,25 +0,0 @@-export interface RevealScrollInput {- focusedIndex: number;- itemHeight: number;- viewportHeight: number;- currentScrollTop: number;- topInset?: number;-}--export function computeRevealScrollTop(input: RevealScrollInput): number | null {- const { focusedIndex, itemHeight, viewportHeight, currentScrollTop } = input;- if (focusedIndex < 0) return null;- const topInset = Math.max(0, input.topInset ?? 0);- const itemTop = focusedIndex * itemHeight;- const itemBottom = itemTop + itemHeight;-- if (itemTop < currentScrollTop + topInset) {- const next = Math.max(0, itemTop - topInset);- return next === currentScrollTop ? null : next;- }- if (itemBottom > currentScrollTop + viewportHeight) {- const next = itemBottom - viewportHeight;- return next === currentScrollTop ? null : next;- }- return null;-}diff --git a/patches/@pierre%[email protected] b/patches/@pierre%[email protected]deleted file mode 100644index 420c13364..000000000--- a/patches/@pierre%[email protected]+++ /dev/null@@ -1,56 +0,0 @@-diff --git a/dist/render/FileTree.d.ts b/dist/render/FileTree.d.ts-index 949ab40e12ec7e9d1aa644cf12ee0fd510e6aeb2..0131c67f10dc318fa305f974f77e8243395bd422 100644---- a/dist/render/FileTree.d.ts-+++ b/dist/render/FileTree.d.ts-@@ -11,6 +11,7 @@ declare class FileTree implements FileTreeMutationHandle, FileTreeSearchSessionH- getFileTreeContainer(): HTMLElement | undefined;- getItem(path: string): FileTreeItemHandle | null;- getFocusedItem(): FileTreeItemHandle | null;-+ getFocusedIndex(): number;- getFocusedPath(): string | null;- getSelectedPaths(): readonly string[];- getComposition(): FileTreeCompositionOptions | undefined;-diff --git a/dist/render/FileTree.js b/dist/render/FileTree.js-index 95778fc6e74ef7262a54ffd473e670a6be14786c..d39b43e84a33187ebdec7c67348ca0999a06556f 100644---- a/dist/render/FileTree.js-+++ b/dist/render/FileTree.js-@@ -144,6 +144,9 @@ var FileTree = class {- getFocusedItem() {- return this.#controller.getFocusedItem();- }-+ getFocusedIndex() {-+ return this.#controller.getFocusedIndex();-+ }- getFocusedPath() {- return this.#controller.getFocusedPath();- }-diff --git a/dist/render/FileTreeView.js b/dist/render/FileTreeView.js-index 50a32001d7a7d3612b7f1929ccb11b3f1cbffd4f..260b5b0807ac3c844043c644c8a6760b3c642be2 100644---- a/dist/render/FileTreeView.js-+++ b/dist/render/FileTreeView.js-@@ -128,7 +128,16 @@ function getShadowPointElementByGeometry(rootNode, clientX, clientY) {- }- function resolveDropTargetFromElement(target) {- const rowButton = target?.closest?.("[data-type=\"item\"]");-- if (!(rowButton instanceof HTMLElement)) return null;-+ if (!(rowButton instanceof HTMLElement)) {-+ const scrollArea = target?.closest?.("[data-file-tree-virtualized-scroll]");-+ if (scrollArea instanceof HTMLElement) return {-+ directoryPath: null,-+ flattenedSegmentPath: null,-+ hoveredPath: null,-+ kind: "root"-+ };-+ return null;-+ }- const hoveredPath = rowButton.dataset.itemPath ?? null;- if (hoveredPath == null) return null;- const flattenedSegment = target?.closest?.("[data-item-flattened-subitem]");-@@ -1806,6 +1815,7 @@ function FileTreeView({ composition, controller, gitStatusByPath, ignoredGitDire- "data-file-tree-has-context-menu-action-lane": contextMenuEnabled && contextMenuButtonTriggerEnabled ? "true" : void 0,- "data-file-tree-has-git-lane": gitLaneActive ? "true" : void 0,- "data-file-tree-virtualized-root": "true",-+ "data-file-tree-root-drag-target": dragTarget?.kind === "root" ? "true" : void 0,- onDragLeave: dragAndDropEnabled ? handleTreeDragLeave : void 0,- onDragOver: dragAndDropEnabled ? handleTreeDragOver : void 0,- onDrop: dragAndDropEnabled ? handleTreeDrop : void 0,diff --git a/patches/@pierre%[email protected] b/patches/@pierre%[email protected]new file mode 100644index 000000000..f87998b67--- /dev/null+++ b/patches/@pierre%[email protected]@@ -0,0 +1,30 @@+diff --git a/dist/render/FileTreeView.js b/dist/render/FileTreeView.js+index 648639b4b65c1dd797434e3afe189848426f4d53..e0347f160e582691ee219b96d6e07c9ca9d92114 100644+--- a/dist/render/FileTreeView.js++++ b/dist/render/FileTreeView.js+@@ -98,7 +98,16 @@ function getShadowPointElementByGeometry(rootNode, clientX, clientY) {+ }+ function resolveDropTargetFromElement(target) {+ const rowButton = target?.closest?.("[data-type=\"item\"]");+- if (!(rowButton instanceof HTMLElement)) return null;++ if (!(rowButton instanceof HTMLElement)) {++ const scrollArea = target?.closest?.("[data-file-tree-virtualized-scroll]");++ if (scrollArea instanceof HTMLElement) return {++ directoryPath: null,++ flattenedSegmentPath: null,++ hoveredPath: null,++ kind: "root"++ };++ return null;++ }+ const hoveredPath = rowButton.dataset.itemPath ?? null;+ if (hoveredPath == null) return null;+ const flattenedSegment = target?.closest?.("[data-item-flattened-subitem]");+@@ -1771,6 +1780,7 @@ function FileTreeView({ composition, controller, gitStatusByPath, ignoredGitDire+ "data-file-tree-has-context-menu-action-lane": contextMenuEnabled && contextMenuButtonTriggerEnabled ? "true" : void 0,+ "data-file-tree-has-git-lane": gitLaneActive ? "true" : void 0,+ "data-file-tree-virtualized-root": "true",++ "data-file-tree-root-drag-target": dragTarget?.kind === "root" ? "true" : void 0,+ onDragLeave: dragAndDropEnabled ? handleTreeDragLeave : void 0,+ onDragOver: dragAndDropEnabled ? handleTreeDragOver : void 0,+ onDrop: dragAndDropEnabled ? handleTreeDrop : void 0,