Our primitives team has been working on a new project we're calling "trees".
@fat41K followers
59,699 views
44 Comments
Comments from the original post on X (Twitter)

@mitchellh
What’s a primitives team
40 likes

@fat
We have two teams internally right now… The Code Primitives team is building diffs, trees, etc. These are low level, composable libraries for working with "code primitives". Our bet is wave 1 was forking VSCode - editor first agentic coding… tab, tab, type shit. Wave 2 - tui, cli's, etc. Wave 3 - return desktop, but NOT editor first. We're building for this wave – foundational abstractions, for building dev tools. the next "VSCode"…etc.
53 likes

@mitchellh
Ah I thought you meant like cavemen
42 likes

@fat
well i mean @amadeus IS on the team sooo…
10 likes

@rayhanadev
@mitchellh @amadeus i love the consistency at which amadeus is trolled both on and off slack 😭😭
2 likes

@fat
@mitchellh @amadeus Only bc he’s annoyingly talented
2 likes

@devongovett
Did you guys try React Aria for this? The Tree component supports Virtualizer, handles multi-selection, keyboard navigation, drag and drop, accessibility, etc. I got pretty good perf with this data set when I tried it.
32 likes

@fat
Yup - in we originally implemented our tree view on top of react aria. it was lovely. a couple of different design constraints here for us, but lots of inspo from y'alls work
11 likes

@sintaxi
thinking I might squat on... shadow-dom-drag-and-drop-virtualized-vanilla-js-react-web-component-with-search-filter-niceties-collapsible-repo-paths-themeability-diff-stat-representation-and-more[dot]com ...just in case.
12 likes

@fat
lmaooo WISE

@nk
how do you get the virtualized list to never have blank areas when you scroll super fast?
3 likes

@fat
@amadeus and @SlexAxton have spent an unreasonable amount of time on exactly this. especially in safari, lots of dark arts
8 likes

@nk
@amadeus @SlexAxton I only need to know how to solve this in chromium but I gave up before I could figure it out. Would love to know
2 likes

@fat
@amadeus @SlexAxton @amadeus has a twitter post somewhere on this he can link – but also mb you can just use our tree stuff? (if you're just doing to render layers)…. not sure if that's your usecase tho

@nk
@amadeus @SlexAxton I'm not sure if we can actually use it because we have a lot of extra chrome in our tree and wiring it all up seems like more trouble than just borrowing ideas
3 likes

@fat
@amadeus @SlexAxton we should support this pretty well – but also yah if you just read amadeus's tweet it sorta explains some of the hacks with sticky, etc.

@wwwjim
Yoooooo @caidanwilliams we did some fire trees too check this out
2 likes

@fat
@caidanwilliams wait in your hot ass sacred computer shit??

@mewtyunjay
we built something similar at work, a virtualized grid + gantt timeline in vanilla TS with react bindings! imperative DOM with element pooling (no vdom in scroll path) collapsible tree rows, inline editing, keyboard nav, drag-to-zoom, handles 10k+ rows at 60fps and initial render takes less than 300ms. built with a lot of care and passion for performant sw :)
2 likes

@jidefr
Much needed, there is still no perfect batterie included tree lib out there.
2 likes














