18fa9979ee
Memory management: - Vendor mimalloc v2.1.9 as global allocator (MI_OVERRIDE=1 in prod) - New mem.h/mem.c: RSS-based budget tracking via mi_process_info() - Remove vmem.c/vmem.h (mmap-based budget tracking) - Remove slab tier2 bump allocator (~300 LOC); >64B goes to mimalloc - Slab tier1 pages from malloc (= mimalloc) instead of vmem - Arena blocks from malloc instead of vmem - Budget raised from 35% to 50% RAM (no more untracked C++ heap) Extraction-phase prescan (eliminates disk re-reads): - HTTP call sites: keyword check + URL extraction during extraction - HTTP routes: decorator + source-based extraction during extraction - Config file refs: regex scan during extraction - httplinks: 41.8s → 13ms on Linux kernel (3,212x faster) - configlink: 41.4s → 0.8s on Linux kernel (54x faster) - Linux kernel fast-mode total: 2m38s → 1m18s Bug fixes: - __init__.py Module QN no longer collides with Folder QN - index.ts same fix for JS/TS packages - 13 regression tests for QN collision at FQN + extraction layers - search_graph/search_code default limit raised from 10 to 500k - Resolve all clang-tidy, cppcheck, and clang-format warnings Repo cleanup: - tree-sitter-form, tree-sitter-magma moved to tools/ - .gitignore: build/, node_modules/, graph-ui/dist/, TEST_PLAN.md
57 lines
1.6 KiB
TypeScript
57 lines
1.6 KiB
TypeScript
import * as React from "react"
|
|
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui"
|
|
|
|
import { cn } from "@/lib/utils"
|
|
|
|
function ScrollArea({
|
|
className,
|
|
children,
|
|
...props
|
|
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
|
|
return (
|
|
<ScrollAreaPrimitive.Root
|
|
data-slot="scroll-area"
|
|
className={cn("relative", className)}
|
|
{...props}
|
|
>
|
|
<ScrollAreaPrimitive.Viewport
|
|
data-slot="scroll-area-viewport"
|
|
className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
|
|
>
|
|
{children}
|
|
</ScrollAreaPrimitive.Viewport>
|
|
<ScrollBar />
|
|
<ScrollAreaPrimitive.Corner />
|
|
</ScrollAreaPrimitive.Root>
|
|
)
|
|
}
|
|
|
|
function ScrollBar({
|
|
className,
|
|
orientation = "vertical",
|
|
...props
|
|
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
|
|
return (
|
|
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
data-slot="scroll-area-scrollbar"
|
|
orientation={orientation}
|
|
className={cn(
|
|
"flex touch-none p-px transition-colors select-none",
|
|
orientation === "vertical" &&
|
|
"h-full w-2.5 border-l border-l-transparent",
|
|
orientation === "horizontal" &&
|
|
"h-2.5 flex-col border-t border-t-transparent",
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
<ScrollAreaPrimitive.ScrollAreaThumb
|
|
data-slot="scroll-area-thumb"
|
|
className="relative flex-1 rounded-full bg-border"
|
|
/>
|
|
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
)
|
|
}
|
|
|
|
export { ScrollArea, ScrollBar }
|