All blocks
File Explorer
Cloud workspace file manager with a collapsible folder tree, breadcrumb trail, live search, list / grid / Miller-column view switcher, row actions menu, and a synchronized metadata inspector.
Built withAvatarBadgeBreadcrumbButtonCenterData ListEmpty StateGridIcon ButtonInputMenuProgressSegment GroupSeparatorSplitterStackTableTextToastToolbarTree View
Kestrel Drive
5 items
| Name | Owner | Modified | Size | |
|---|---|---|---|---|
ComponentsComponents | EVElena Vance | Yesterday, 4:08 PM | 3 items | |
TokensTokens | DPDevon Park | Today, 10:42 AM | 4 items | |
accessibility-checklist.pdfWCAG | DPDevon Park | Nov 27, 2026 | 1.9 MB | |
icon-grid-template.svgIcons | SLSoren Lindqvist | Nov 22, 2026 | 312 KB | |
kestrel-ui-v4.figDesign | EVElena Vance | Today, 10:15 AM | 18.4 MB |
Install
1npx stylexblocks add file-explorerSource
components/blocks/ui-sdk/file-explorer.tsx
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735import * as stylex from "@stylexjs/stylex";import { Fragment, useCallback, useMemo, useState } from "react";import { Avatar } from "#components/ui/ui-sdk/avatar.tsx";import { Badge } from "#components/ui/ui-sdk/badge.tsx";import { Breadcrumb } from "#components/ui/ui-sdk/breadcrumb.tsx";import { Button } from "#components/ui/ui-sdk/button.tsx";import { Center, Square } from "#components/ui/ui-sdk/center.tsx";import { DataList } from "#components/ui/ui-sdk/data-list.tsx";import { EmptyState } from "#components/ui/ui-sdk/empty-state.tsx";import { Grid } from "#components/ui/ui-sdk/grid.tsx";import { IconButton } from "#components/ui/ui-sdk/icon-button.tsx";import { Input } from "#components/ui/ui-sdk/input.tsx";import { Menu } from "#components/ui/ui-sdk/menu.tsx";import { Progress } from "#components/ui/ui-sdk/progress.tsx";import { SegmentGroup } from "#components/ui/ui-sdk/segment-group.tsx";import { Separator } from "#components/ui/ui-sdk/separator.tsx";import { Splitter } from "#components/ui/ui-sdk/splitter.tsx";import { HStack, VStack } from "#components/ui/ui-sdk/stack.tsx";import { Table } from "#components/ui/ui-sdk/table.tsx";import { Text } from "#components/ui/ui-sdk/text.tsx";import { Toast, Toaster } from "#components/ui/ui-sdk/toast.tsx";import { Toolbar } from "#components/ui/ui-sdk/toolbar.tsx";import { TreeView } from "#components/ui/ui-sdk/tree-view.tsx";import { semanticColors } from "@stylexblocks/ui/semantic-tokens/colors.stylex.ts";import { semanticRadii } from "@stylexblocks/ui/semantic-tokens/radii.stylex.ts";import { semanticShadows } from "@stylexblocks/ui/semantic-tokens/shadows.stylex.ts";import { accentPalette, amberPalette, bluePalette, emeraldPalette, purplePalette, redPalette, tealPalette,} from "@stylexblocks/ui/themes/palettes.ts";import { durations } from "@stylexblocks/ui/tokens/durations.stylex.ts";import { fontSizes } from "@stylexblocks/ui/tokens/font-sizes.stylex.ts";import { fontWeights } from "@stylexblocks/ui/tokens/font-weights.stylex.ts";import { fonts } from "@stylexblocks/ui/tokens/fonts.stylex.ts";import { lineHeights } from "@stylexblocks/ui/tokens/line-heights.stylex.ts";import { radii } from "@stylexblocks/ui/tokens/radii.stylex.ts";import { spacing } from "@stylexblocks/ui/tokens/spacing.stylex.ts";import type { StyleOverrideProps } from "#lib/recipe-props.ts";
const NARROW_INSPECTOR = "@container file-explorer (max-width: 900px)";const NARROW_RAIL = "@container file-explorer (max-width: 640px)";const COMPACT_HEADER = "@container file-explorer (max-width: 720px)";const HIDE_TABLE_META = "@container file-explorer-main (max-width: 520px)";
type ViewMode = "list" | "grid" | "columns";type SmartFilter = "all" | "starred" | "shared" | "recent";type SortField = "name" | "modified" | "size" | "kind";type SortDir = "asc" | "desc";type FileCategory = "folder" | "design" | "code" | "doc" | "sheet" | "media" | "deck";
interface OwnerInfo { name: string; initials: string; role: string; paletteKey: "accent" | "blue" | "emerald" | "purple" | "amber" | "teal";}
interface DriveNode { id: string; parentId: string | null; name: string; type: "folder" | "file"; category: FileCategory; kindLabel: string; extension?: string; sizeBytes: number; sizeLabel: string; owner: OwnerInfo; createdAt: string; modifiedAt: string; modifiedOrder: number; starred: boolean; shared: boolean; recent: boolean; access: string; tags: string[]; summary: string; versionNote: string; collaborators: OwnerInfo[];}
const OWNERS = { elena: { name: "Elena Vance", initials: "EV", role: "Staff Designer", paletteKey: "purple" }, marcus: { name: "Marcus Chen", initials: "MC", role: "Principal Engineer", paletteKey: "blue" }, priya: { name: "Priya Nair", initials: "PN", role: "Product Lead", paletteKey: "emerald" }, soren: { name: "Soren Lindqvist", initials: "SL", role: "Brand Director", paletteKey: "amber" }, nadia: { name: "Nadia Okafor", initials: "NO", role: "Systems Architect", paletteKey: "teal" }, devon: { name: "Devon Park", initials: "DP", role: "Design Technologist", paletteKey: "accent" },} as const satisfies Record<string, OwnerInfo>;
const OWNER_PALETTES = { accent: accentPalette, blue: bluePalette, emerald: emeraldPalette, purple: purplePalette, amber: amberPalette, teal: tealPalette,} as const;
const CATEGORY_PALETTES = { folder: accentPalette, design: purplePalette, code: bluePalette, doc: tealPalette, sheet: emeraldPalette, media: amberPalette, deck: redPalette,} as const;
const INITIAL_NODES: DriveNode[] = [ // Top-level folders { id: "design-systems", parentId: null, name: "Design Systems", type: "folder", category: "folder", kindLabel: "Workspace Folder", sizeBytes: 42_600_000, sizeLabel: "42.6 MB", owner: OWNERS.elena, createdAt: "Sep 14, 2026", modifiedAt: "Today, 10:42 AM", modifiedOrder: 100, starred: true, shared: true, recent: true, access: "Workspace editors", tags: ["Design", "v4"], summary: "Core foundations, semantic tokens, and component libraries for Kestrel Cloud.", versionNote: "Updated elevation scale and token exports for v4.2", collaborators: [OWNERS.elena, OWNERS.devon, OWNERS.marcus], }, { id: "engineering", parentId: null, name: "Engineering", type: "folder", category: "folder", kindLabel: "Workspace Folder", sizeBytes: 18_400_000, sizeLabel: "18.4 MB", owner: OWNERS.marcus, createdAt: "Aug 03, 2026", modifiedAt: "Today, 9:18 AM", modifiedOrder: 98, starred: false, shared: true, recent: true, access: "Engineering & Platform", tags: ["Platform", "RFC"], summary: "Architecture proposals, schema specs, deployment runbooks, and release telemetry.", versionNote: "Added RFC-045 realtime sync draft", collaborators: [OWNERS.marcus, OWNERS.nadia, OWNERS.devon], }, { id: "launch-q4", parentId: null, name: "Launch Q4", type: "folder", category: "folder", kindLabel: "Workspace Folder", sizeBytes: 164_200_000, sizeLabel: "164.2 MB", owner: OWNERS.priya, createdAt: "Oct 02, 2026", modifiedAt: "Yesterday, 6:15 PM", modifiedOrder: 93, starred: true, shared: true, recent: true, access: "Launch Core Team", tags: ["Q4", "Launch"], summary: "Keynote decks, press kit imagery, release timeline, and pricing models.", versionNote: "Finalized demo walkthrough cut 3", collaborators: [OWNERS.priya, OWNERS.soren, OWNERS.elena], }, { id: "brand-assets", parentId: null, name: "Brand Assets", type: "folder", category: "folder", kindLabel: "Workspace Folder", sizeBytes: 91_800_000, sizeLabel: "91.8 MB", owner: OWNERS.soren, createdAt: "Jul 19, 2026", modifiedAt: "Nov 26, 2026", modifiedOrder: 76, starred: false, shared: true, recent: false, access: "Everyone in Kestrel", tags: ["Brand", "Approved"], summary: "Official logomarks, typography licenses, print collateral, and color swatches.", versionNote: "Refreshed monochrome SVG wordmarks", collaborators: [OWNERS.soren, OWNERS.elena], }, { id: "shared", parentId: null, name: "Shared", type: "folder", category: "folder", kindLabel: "Shared Folder", sizeBytes: 24_900_000, sizeLabel: "24.9 MB", owner: OWNERS.priya, createdAt: "Oct 12, 2026", modifiedAt: "Nov 29, 2026", modifiedOrder: 84, starred: false, shared: true, recent: false, access: "External partners + Editors", tags: ["External", "Partner"], summary: "Cross-org memos, partner pilot documents, and customer advisory notes.", versionNote: "Shared Northstar Pilot SOW for signature", collaborators: [OWNERS.priya, OWNERS.nadia, OWNERS.marcus], }, // Top-level files { id: "workspace-welcome", parentId: null, name: "Workspace-Welcome-Guide.pdf", type: "file", category: "doc", kindLabel: "PDF Document", extension: "PDF", sizeBytes: 2_480_000, sizeLabel: "2.4 MB", owner: OWNERS.priya, createdAt: "Aug 01, 2026", modifiedAt: "Nov 18, 2026", modifiedOrder: 62, starred: false, shared: true, recent: false, access: "Everyone in Kestrel", tags: ["Handbook"], summary: "Onboarding guide for Kestrel Cloud workspace permissions, folder naming, and retention.", versionNote: "v2.1 · Added archive policy section", collaborators: [OWNERS.priya, OWNERS.elena], }, { id: "q4-okr-tracker", parentId: null, name: "Q4-OKR-Tracker.xlsx", type: "file", category: "sheet", kindLabel: "Spreadsheet", extension: "XLSX", sizeBytes: 840_000, sizeLabel: "840 KB", owner: OWNERS.priya, createdAt: "Oct 01, 2026", modifiedAt: "Today, 8:50 AM", modifiedOrder: 96, starred: true, shared: true, recent: true, access: "Workspace editors", tags: ["Q4", "Metrics"], summary: "Weekly checkpoint scores across design, platform reliability, and enterprise adoption.", versionNote: "v14 · Updated week 9 velocity metrics", collaborators: [OWNERS.priya, OWNERS.marcus, OWNERS.elena], }, { id: "readme-policy", parentId: null, name: "README-Drive-Policy.md", type: "file", category: "doc", kindLabel: "Markdown Note", extension: "MD", sizeBytes: 18_400, sizeLabel: "18 KB", owner: OWNERS.nadia, createdAt: "Jul 22, 2026", modifiedAt: "Nov 11, 2026", modifiedOrder: 54, starred: false, shared: false, recent: false, access: "Workspace editors", tags: ["Governance"], summary: "Security classification rules and external sharing expiry defaults for workspace folders.", versionNote: "v1.3 · Clarified 30-day link expiration", collaborators: [OWNERS.nadia], },
// Design Systems children { id: "ds-tokens", parentId: "design-systems", name: "Tokens", type: "folder", category: "folder", kindLabel: "Workspace Folder", sizeBytes: 4_850_000, sizeLabel: "4.8 MB", owner: OWNERS.devon, createdAt: "Sep 14, 2026", modifiedAt: "Today, 10:42 AM", modifiedOrder: 99, starred: true, shared: true, recent: true, access: "Workspace editors", tags: ["Tokens", "Production"], summary: "OKLCH color ramps, spacing scale definitions, and elevation geometry specs.", versionNote: "Synced semantic surface tokens with Figma", collaborators: [OWNERS.devon, OWNERS.elena], }, { id: "ds-components", parentId: "design-systems", name: "Components", type: "folder", category: "folder", kindLabel: "Workspace Folder", sizeBytes: 16_200_000, sizeLabel: "16.2 MB", owner: OWNERS.elena, createdAt: "Sep 15, 2026", modifiedAt: "Yesterday, 4:08 PM", modifiedOrder: 91, starred: false, shared: true, recent: true, access: "Workspace editors", tags: ["Components"], summary: "Interactive component specifications, motion curves, and accessibility reviews.", versionNote: "Added resizable split-pane keyboard spec", collaborators: [OWNERS.elena, OWNERS.devon, OWNERS.marcus], }, { id: "kestrel-ui-v4", parentId: "design-systems", name: "kestrel-ui-v4.fig", type: "file", category: "design", kindLabel: "Figma Library", extension: "FIG", sizeBytes: 18_420_000, sizeLabel: "18.4 MB", owner: OWNERS.elena, createdAt: "Sep 18, 2026", modifiedAt: "Today, 10:15 AM", modifiedOrder: 97, starred: true, shared: true, recent: true, access: "Workspace editors", tags: ["Design", "Approved", "v4"], summary: "Master Figma component kit with dark/light variable modes, icon library, and app shells.", versionNote: "v4.2 · Published table density and inspector layouts", collaborators: [OWNERS.elena, OWNERS.devon, OWNERS.soren], }, { id: "a11y-checklist", parentId: "design-systems", name: "accessibility-checklist.pdf", type: "file", category: "doc", kindLabel: "PDF Document", extension: "PDF", sizeBytes: 1_920_000, sizeLabel: "1.9 MB", owner: OWNERS.devon, createdAt: "Oct 05, 2026", modifiedAt: "Nov 27, 2026", modifiedOrder: 80, starred: false, shared: true, recent: false, access: "Everyone in Kestrel", tags: ["WCAG", "Approved"], summary: "WCAG 2.2 AA contrast, focus ring, and screen-reader sign-off checklist for all blocks.", versionNote: "v2.0 · Added roving tabindex audit notes", collaborators: [OWNERS.devon, OWNERS.elena], }, { id: "icon-grid-template", parentId: "design-systems", name: "icon-grid-template.svg", type: "file", category: "design", kindLabel: "SVG Vector", extension: "SVG", sizeBytes: 312_000, sizeLabel: "312 KB", owner: OWNERS.soren, createdAt: "Sep 29, 2026", modifiedAt: "Nov 22, 2026", modifiedOrder: 70, starred: false, shared: true, recent: false, access: "Workspace editors", tags: ["Icons"], summary: "16px and 20px optical keyline templates with 1.5px stroke alignment guides.", versionNote: "v1.4 · Refined diagonal optical margin", collaborators: [OWNERS.soren, OWNERS.elena], },
// Design Systems -> Tokens children { id: "color-primitives", parentId: "ds-tokens", name: "color-primitives.json", type: "file", category: "code", kindLabel: "JSON Token Set", extension: "JSON", sizeBytes: 94_000, sizeLabel: "94 KB", owner: OWNERS.devon, createdAt: "Sep 20, 2026", modifiedAt: "Today, 10:42 AM", modifiedOrder: 99, starred: true, shared: true, recent: true, access: "Workspace editors", tags: ["Tokens", "Production"], summary: "W3C Design Tokens format source for OKLCH neutral, accent, and status color ramps.", versionNote: "v3.4 · Adjusted dark mode muted border luminance", collaborators: [OWNERS.devon, OWNERS.elena, OWNERS.marcus], }, { id: "spacing-scale", parentId: "ds-tokens", name: "spacing-scale.stylex.ts", type: "file", category: "code", kindLabel: "TypeScript Module", extension: "TS", sizeBytes: 14_200, sizeLabel: "14 KB", owner: OWNERS.devon, createdAt: "Sep 21, 2026", modifiedAt: "Nov 28, 2026", modifiedOrder: 82, starred: false, shared: true, recent: false, access: "Workspace editors", tags: ["StyleX", "Tokens"], summary: "Compiled StyleX variable sheet scaling rem increments with dynamic density factor.", versionNote: "v1.8 · Added 0.5 and 1.5 sub-grid steps", collaborators: [OWNERS.devon, OWNERS.marcus], }, { id: "elevation-spec", parentId: "ds-tokens", name: "elevation-spec.pdf", type: "file", category: "doc", kindLabel: "PDF Document", extension: "PDF", sizeBytes: 3_150_000, sizeLabel: "3.1 MB", owner: OWNERS.elena, createdAt: "Oct 08, 2026", modifiedAt: "Nov 25, 2026", modifiedOrder: 74, starred: false, shared: true, recent: false, access: "Workspace editors", tags: ["Design"], summary: "Layered shadow and surface hierarchy guidelines across modals, popovers, and panels.", versionNote: "v2.0 · Updated dark mode rim highlight spec", collaborators: [OWNERS.elena], }, { id: "typography-audit", parentId: "ds-tokens", name: "typography-audit.md", type: "file", category: "doc", kindLabel: "Markdown Note", extension: "MD", sizeBytes: 28_600, sizeLabel: "29 KB", owner: OWNERS.elena, createdAt: "Oct 16, 2026", modifiedAt: "Nov 20, 2026", modifiedOrder: 66, starred: false, shared: false, recent: false, access: "Workspace editors", tags: ["Audit"], summary: "Line-height, tabular numeral alignment, and tracking benchmarks across all UI surfaces.", versionNote: "v1.2 · Verified CJK fallback line metrics", collaborators: [OWNERS.elena, OWNERS.devon], },
// Design Systems -> Components children { id: "nav-shell-fig", parentId: "ds-components", name: "navigation-shell.fig", type: "file", category: "design", kindLabel: "Figma File", extension: "FIG", sizeBytes: 11_400_000, sizeLabel: "11.4 MB", owner: OWNERS.elena, createdAt: "Oct 19, 2026", modifiedAt: "Yesterday, 4:08 PM", modifiedOrder: 91, starred: false, shared: true, recent: true, access: "Workspace editors", tags: ["Components", "Draft"], summary: "Responsive three-pane workspace layouts, collapsible rails, and toolbar overflow specs.", versionNote: "v2.3 · Added compact tablet breakpoints", collaborators: [OWNERS.elena, OWNERS.devon], }, { id: "data-table-spec", parentId: "ds-components", name: "data-table-spec.md", type: "file", category: "doc", kindLabel: "Markdown Note", extension: "MD", sizeBytes: 42_100, sizeLabel: "42 KB", owner: OWNERS.devon, createdAt: "Oct 22, 2026", modifiedAt: "Nov 24, 2026", modifiedOrder: 73, starred: false, shared: true, recent: false, access: "Workspace editors", tags: ["Components"], summary: "Row selection, column sorting, inline menus, and virtual scroll thresholds.", versionNote: "v1.5 · Added sticky header elevation rule", collaborators: [OWNERS.devon, OWNERS.marcus], }, { id: "motion-curves", parentId: "ds-components", name: "motion-curves.json", type: "file", category: "code", kindLabel: "JSON Config", extension: "JSON", sizeBytes: 19_500, sizeLabel: "20 KB", owner: OWNERS.devon, createdAt: "Nov 02, 2026", modifiedAt: "Nov 21, 2026", modifiedOrder: 68, starred: false, shared: false, recent: false, access: "Workspace editors", tags: ["Motion"], summary: "Standard cubic-bezier easing curves and reduced-motion fallbacks for overlays.", versionNote: "v1.1 · Tuned popover enter duration to 140ms", collaborators: [OWNERS.devon], },
// Engineering children { id: "eng-rfcs", parentId: "engineering", name: "Architecture RFCs", type: "folder", category: "folder", kindLabel: "Workspace Folder", sizeBytes: 5_100_000, sizeLabel: "5.1 MB", owner: OWNERS.nadia, createdAt: "Aug 10, 2026", modifiedAt: "Today, 9:18 AM", modifiedOrder: 98, starred: false, shared: true, recent: true, access: "Engineering & Platform", tags: ["RFC"], summary: "Technical design proposals under active architecture review.", versionNote: "Nadia posted comments on RFC-045", collaborators: [OWNERS.nadia, OWNERS.marcus], }, { id: "eng-releases", parentId: "engineering", name: "Releases", type: "folder", category: "folder", kindLabel: "Workspace Folder", sizeBytes: 6_400_000, sizeLabel: "6.4 MB", owner: OWNERS.marcus, createdAt: "Sep 01, 2026", modifiedAt: "Nov 29, 2026", modifiedOrder: 86, starred: false, shared: true, recent: false, access: "Engineering & Platform", tags: ["Production"], summary: "Signed release notes, bundle budget snapshots, and post-deploy metrics.", versionNote: "Published v4.12 release bundle report", collaborators: [OWNERS.marcus, OWNERS.nadia], }, { id: "workspace-schema", parentId: "engineering", name: "workspace-schema.sql", type: "file", category: "code", kindLabel: "SQL Schema", extension: "SQL", sizeBytes: 68_400, sizeLabel: "68 KB", owner: OWNERS.nadia, createdAt: "Aug 18, 2026", modifiedAt: "Yesterday, 11:30 AM", modifiedOrder: 89, starred: true, shared: false, recent: true, access: "Engineering & Platform", tags: ["Database", "Production"], summary: "Relational schema for drive nodes, ACL grants, audit trails, and version pointers.", versionNote: "v5.2 · Added composite index on parent_id + name", collaborators: [OWNERS.nadia, OWNERS.marcus], }, { id: "api-rate-limits", parentId: "engineering", name: "api-rate-limits.yaml", type: "file", category: "code", kindLabel: "YAML Config", extension: "YAML", sizeBytes: 12_800, sizeLabel: "13 KB", owner: OWNERS.marcus, createdAt: "Sep 11, 2026", modifiedAt: "Nov 26, 2026", modifiedOrder: 77, starred: false, shared: false, recent: false, access: "Engineering & Platform", tags: ["API"], summary: "Edge gateway token-bucket quotas for sync, search, and presigned upload endpoints.", versionNote: "v2.4 · Raised enterprise burst ceiling", collaborators: [OWNERS.marcus], }, { id: "deploy-runbook", parentId: "engineering", name: "deploy-runbook.md", type: "file", category: "doc", kindLabel: "Markdown Note", extension: "MD", sizeBytes: 31_200, sizeLabel: "31 KB", owner: OWNERS.marcus, createdAt: "Aug 25, 2026", modifiedAt: "Nov 23, 2026", modifiedOrder: 72, starred: false, shared: true, recent: false, access: "Engineering & Platform", tags: ["Ops", "Approved"], summary: "Zero-downtime rollout checklist, canary rollback commands, and pager escalation.", versionNote: "v3.1 · Updated EU-central failover step", collaborators: [OWNERS.marcus, OWNERS.nadia], },
// Engineering -> RFCs children { id: "rfc-042", parentId: "eng-rfcs", name: "rfc-042-edge-cache.md", type: "file", category: "doc", kindLabel: "Markdown Note", extension: "MD", sizeBytes: 54_000, sizeLabel: "54 KB", owner: OWNERS.nadia, createdAt: "Oct 14, 2026", modifiedAt: "Nov 28, 2026", modifiedOrder: 83, starred: false, shared: true, recent: false, access: "Engineering & Platform", tags: ["RFC", "Approved"], summary: "Regional read-through metadata cache cutting cold folder listings below 45ms p95.", versionNote: "Accepted · Ready for Q4 milestone 2", collaborators: [OWNERS.nadia, OWNERS.marcus], }, { id: "rfc-045", parentId: "eng-rfcs", name: "rfc-045-realtime-sync.md", type: "file", category: "doc", kindLabel: "Markdown Note", extension: "MD", sizeBytes: 63_200, sizeLabel: "63 KB", owner: OWNERS.marcus, createdAt: "Nov 20, 2026", modifiedAt: "Today, 9:18 AM", modifiedOrder: 98, starred: true, shared: true, recent: true, access: "Engineering & Platform", tags: ["RFC", "Draft"], summary: "Delta-stream fanout protocol for live folder updates and collaborative presence cursors.", versionNote: "v0.9 · Open for architecture review", collaborators: [OWNERS.marcus, OWNERS.nadia, OWNERS.devon], }, { id: "sharding-diagram", parentId: "eng-rfcs", name: "storage-sharding-diagram.svg", type: "file", category: "design", kindLabel: "SVG Vector", extension: "SVG", sizeBytes: 420_000, sizeLabel: "420 KB", owner: OWNERS.nadia, createdAt: "Nov 15, 2026", modifiedAt: "Nov 27, 2026", modifiedOrder: 79, starred: false, shared: true, recent: false, access: "Engineering & Platform", tags: ["Architecture"], summary: "Consistent hash ring topology for multi-region blob replication and cold tiering.", versionNote: "v1.2 · Added disaster-recovery replica zone", collaborators: [OWNERS.nadia], },
// Engineering -> Releases children { id: "v412-changelog", parentId: "eng-releases", name: "v4.12-changelog.md", type: "file", category: "doc", kindLabel: "Markdown Note", extension: "MD", sizeBytes: 24_100, sizeLabel: "24 KB", owner: OWNERS.marcus, createdAt: "Nov 28, 2026", modifiedAt: "Nov 29, 2026", modifiedOrder: 86, starred: false, shared: true, recent: false, access: "Everyone in Kestrel", tags: ["Release"], summary: "Production changelog covering faster thumbnail streaming and keyboard tree focus.", versionNote: "Signed off for production cut", collaborators: [OWNERS.marcus, OWNERS.priya], }, { id: "bundle-budget", parentId: "eng-releases", name: "bundle-budget-report.csv", type: "file", category: "sheet", kindLabel: "CSV Dataset", extension: "CSV", sizeBytes: 186_000, sizeLabel: "186 KB", owner: OWNERS.devon, createdAt: "Nov 29, 2026", modifiedAt: "Nov 29, 2026", modifiedOrder: 85, starred: false, shared: false, recent: false, access: "Engineering & Platform", tags: ["Performance"], summary: "Gzipped route bundle sizes across desktop shell, mobile reader, and embedded previews.", versionNote: "All chunks within 120 KB budget", collaborators: [OWNERS.devon, OWNERS.marcus], }, { id: "telemetry-snapshot", parentId: "eng-releases", name: "telemetry-snapshot.json", type: "file", category: "code", kindLabel: "JSON Snapshot", extension: "JSON", sizeBytes: 1_240_000, sizeLabel: "1.2 MB", owner: OWNERS.nadia, createdAt: "Nov 29, 2026", modifiedAt: "Nov 29, 2026", modifiedOrder: 84, starred: false, shared: false, recent: false, access: "Engineering & Platform", tags: ["Metrics"], summary: "Anonymized p50/p95/p99 latency percentiles from the November canary rollout.", versionNote: "Zero error-budget regression", collaborators: [OWNERS.nadia], },
// Launch Q4 children { id: "q4-press", parentId: "launch-q4", name: "Press Kit", type: "folder", category: "folder", kindLabel: "Workspace Folder", sizeBytes: 48_200_000, sizeLabel: "48.2 MB", owner: OWNERS.soren, createdAt: "Oct 10, 2026", modifiedAt: "Yesterday, 2:10 PM", modifiedOrder: 90, starred: false, shared: true, recent: true, access: "Public link (view only)", tags: ["Press", "Approved"], summary: "High-resolution product stills, executive portraits, and embargoed fact sheets.", versionNote: "Replaced hero still with final dark-mode crop", collaborators: [OWNERS.soren, OWNERS.priya], }, { id: "q4-deck", parentId: "launch-q4", name: "Deck & Copy", type: "folder", category: "folder", kindLabel: "Workspace Folder", sizeBytes: 32_600_000, sizeLabel: "32.6 MB", owner: OWNERS.priya, createdAt: "Oct 12, 2026", modifiedAt: "Yesterday, 5:45 PM", modifiedOrder: 92, starred: false, shared: true, recent: true, access: "Launch Core Team", tags: ["Q4", "Copy"], summary: "Keynote narrative slides, announcement blog post, and social channel copy.", versionNote: "Final legal review completed", collaborators: [OWNERS.priya, OWNERS.soren, OWNERS.elena], }, { id: "launch-timeline", parentId: "launch-q4", name: "launch-timeline-q4.xlsx", type: "file", category: "sheet", kindLabel: "Spreadsheet", extension: "XLSX", sizeBytes: 620_000, sizeLabel: "620 KB", owner: OWNERS.priya, createdAt: "Oct 02, 2026", modifiedAt: "Yesterday, 6:15 PM", modifiedOrder: 93, starred: true, shared: true, recent: true, access: "Launch Core Team", tags: ["Q4", "Schedule"], summary: "Hour-by-hour launch day run of show, owner sign-offs, and fallback triggers.", versionNote: "v9 · Locked T-minus 48h freeze window", collaborators: [OWNERS.priya, OWNERS.marcus, OWNERS.soren], }, { id: "demo-walkthrough", parentId: "launch-q4", name: "demo-walkthrough-cut3.mov", type: "file", category: "media", kindLabel: "QuickTime Video", extension: "MOV", sizeBytes: 82_400_000, sizeLabel: "82.4 MB", owner: OWNERS.soren, createdAt: "Nov 24, 2026", modifiedAt: "Yesterday, 3:20 PM", modifiedOrder: 90, starred: false, shared: true, recent: true, access: "Launch Core Team", tags: ["Video", "Q4"], summary: "60fps 4K product sizzle reel showcasing workspace search, inspector, and live sync.", versionNote: "Cut 3 · Audio mastered to -14 LUFS", collaborators: [OWNERS.soren, OWNERS.elena, OWNERS.priya], }, { id: "pricing-model", parentId: "launch-q4", name: "pricing-tier-model.csv", type: "file", category: "sheet", kindLabel: "CSV Dataset", extension: "CSV", sizeBytes: 148_000, sizeLabel: "148 KB", owner: OWNERS.priya, createdAt: "Oct 20, 2026", modifiedAt: "Nov 25, 2026", modifiedOrder: 75, starred: false, shared: false, recent: false, access: "Leadership only", tags: ["Finance", "Confidential"], summary: "Seat and storage tier scenarios modeling Team, Scale, and Enterprise gross margins.", versionNote: "v4 · Approved by finance", collaborators: [OWNERS.priya], },
// Launch Q4 -> Press Kit children { id: "hero-keynote-still", parentId: "q4-press", name: "hero-keynote-still.png", type: "file", category: "media", kindLabel: "PNG Image", extension: "PNG", sizeBytes: 6_840_000, sizeLabel: "6.8 MB", owner: OWNERS.soren, createdAt: "Nov 18, 2026", modifiedAt: "Yesterday, 2:10 PM", modifiedOrder: 90, starred: true, shared: true, recent: true, access: "Public link (view only)", tags: ["Press", "Approved"], summary: "3840x2160 crisp desktop showcase render prepared for editorial press coverage.", versionNote: "Final export with Display P3 profile", collaborators: [OWNERS.soren, OWNERS.elena], }, { id: "founder-portrait", parentId: "q4-press", name: "founder-portrait.jpg", type: "file", category: "media", kindLabel: "JPEG Image", extension: "JPG", sizeBytes: 4_120_000, sizeLabel: "4.1 MB", owner: OWNERS.soren, createdAt: "Oct 28, 2026", modifiedAt: "Nov 14, 2026", modifiedOrder: 58, starred: false, shared: true, recent: false, access: "Public link (view only)", tags: ["Press"], summary: "Studio editorial portrait cropped for conference bios and media kits.", versionNote: "Color-graded print & web master", collaborators: [OWNERS.soren], }, { id: "product-fact-sheet", parentId: "q4-press", name: "product-fact-sheet.pdf", type: "file", category: "doc", kindLabel: "PDF Document", extension: "PDF", sizeBytes: 1_450_000, sizeLabel: "1.4 MB", owner: OWNERS.priya, createdAt: "Nov 05, 2026", modifiedAt: "Nov 26, 2026", modifiedOrder: 78, starred: false, shared: true, recent: false, access: "Public link (view only)", tags: ["Press", "Approved"], summary: "Two-page overview of Kestrel Cloud architecture, security certifications, and metrics.", versionNote: "v2.2 · Added SOC 2 Type II confirmation", collaborators: [OWNERS.priya, OWNERS.soren], },
// Launch Q4 -> Deck & Copy children { id: "q4-launch-deck", parentId: "q4-deck", name: "kestrel-q4-launch-deck.key", type: "file", category: "deck", kindLabel: "Keynote Presentation", extension: "KEY", sizeBytes: 28_900_000, sizeLabel: "28.9 MB", owner: OWNERS.priya, createdAt: "Oct 15, 2026", modifiedAt: "Yesterday, 5:45 PM", modifiedOrder: 92, starred: true, shared: true, recent: true, access: "Launch Core Team", tags: ["Keynote", "Q4"], summary: "42-slide keynote presentation with embedded product animations and speaker notes.", versionNote: "v11 · Rehearsed timing at 18 minutes", collaborators: [OWNERS.priya, OWNERS.soren, OWNERS.elena], }, { id: "announcement-blog", parentId: "q4-deck", name: "announcement-blog-draft.md", type: "file", category: "doc", kindLabel: "Markdown Note", extension: "MD", sizeBytes: 22_400, sizeLabel: "22 KB", owner: OWNERS.priya, createdAt: "Nov 10, 2026", modifiedAt: "Nov 29, 2026", modifiedOrder: 87, starred: false, shared: true, recent: false, access: "Launch Core Team", tags: ["Copy", "Approved"], summary: "Launch day engineering and design story explaining Kestrel Workspace Drive v4.", versionNote: "Copy-edited and queued for CMS publish", collaborators: [OWNERS.priya, OWNERS.marcus], },
// Brand Assets children { id: "brand-logos", parentId: "brand-assets", name: "Logomarks", type: "folder", category: "folder", kindLabel: "Workspace Folder", sizeBytes: 1_240_000, sizeLabel: "1.2 MB", owner: OWNERS.soren, createdAt: "Jul 19, 2026", modifiedAt: "Nov 26, 2026", modifiedOrder: 76, starred: false, shared: true, recent: false, access: "Everyone in Kestrel", tags: ["Brand", "Approved"], summary: "Production vector marks for dark, light, and monochrome applications.", versionNote: "Standardized viewBox padding across marks", collaborators: [OWNERS.soren, OWNERS.elena], }, { id: "brand-guidelines", parentId: "brand-assets", name: "brand-guidelines-2026.pdf", type: "file", category: "doc", kindLabel: "PDF Document", extension: "PDF", sizeBytes: 14_600_000, sizeLabel: "14.6 MB", owner: OWNERS.soren, createdAt: "Jul 20, 2026", modifiedAt: "Nov 15, 2026", modifiedOrder: 60, starred: false, shared: true, recent: false, access: "Everyone in Kestrel", tags: ["Brand", "Approved"], summary: "Complete visual identity handbook: grids, type pairings, photography, and voice.", versionNote: "v3.0 · Added motion identity chapter", collaborators: [OWNERS.soren, OWNERS.elena], }, { id: "palette-swatches", parentId: "brand-assets", name: "editorial-palette-swatches.ase", type: "file", category: "design", kindLabel: "Color Swatch Library", extension: "ASE", sizeBytes: 64_000, sizeLabel: "64 KB", owner: OWNERS.soren, createdAt: "Aug 12, 2026", modifiedAt: "Nov 12, 2026", modifiedOrder: 56, starred: false, shared: true, recent: false, access: "Everyone in Kestrel", tags: ["Brand"], summary: "Print CMYK and Pantone equivalents matched to digital OKLCH accent hues.", versionNote: "v1.2 · Verified coated stock proofs", collaborators: [OWNERS.soren], },
// Brand Assets -> Logomarks children { id: "logo-dark", parentId: "brand-logos", name: "kestrel-wordmark-dark.svg", type: "file", category: "design", kindLabel: "SVG Vector", extension: "SVG", sizeBytes: 16_400, sizeLabel: "16 KB", owner: OWNERS.soren, createdAt: "Jul 19, 2026", modifiedAt: "Nov 26, 2026", modifiedOrder: 76, starred: false, shared: true, recent: false, access: "Everyone in Kestrel", tags: ["Brand"], summary: "Primary horizontal wordmark for light surfaces with outlined curves.", versionNote: "Optimized SVG paths", collaborators: [OWNERS.soren], }, { id: "logo-light", parentId: "brand-logos", name: "kestrel-wordmark-light.svg", type: "file", category: "design", kindLabel: "SVG Vector", extension: "SVG", sizeBytes: 16_200, sizeLabel: "16 KB", owner: OWNERS.soren, createdAt: "Jul 19, 2026", modifiedAt: "Nov 26, 2026", modifiedOrder: 75, starred: false, shared: true, recent: false, access: "Everyone in Kestrel", tags: ["Brand"], summary: "Inverted white wordmark for dark mode surfaces and photography overlays.", versionNote: "Optimized SVG paths", collaborators: [OWNERS.soren], }, { id: "logo-monogram", parentId: "brand-logos", name: "kestrel-monogram.svg", type: "file", category: "design", kindLabel: "SVG Vector", extension: "SVG", sizeBytes: 9_800, sizeLabel: "10 KB", owner: OWNERS.soren, createdAt: "Jul 19, 2026", modifiedAt: "Nov 26, 2026", modifiedOrder: 74, starred: false, shared: true, recent: false, access: "Everyone in Kestrel", tags: ["Brand"], summary: "Square app-icon mark balanced for favicons and mobile launch screens.", versionNote: "v2.0 · Optical corner balance update", collaborators: [OWNERS.soren], },
// Shared children { id: "shared-partners", parentId: "shared", name: "Partner Reviews", type: "folder", category: "folder", kindLabel: "Shared Folder", sizeBytes: 8_400_000, sizeLabel: "8.4 MB", owner: OWNERS.nadia, createdAt: "Oct 24, 2026", modifiedAt: "Nov 29, 2026", modifiedOrder: 84, starred: false, shared: true, recent: false, access: "External partners + Editors", tags: ["Partner"], summary: "Security questionnaires and pilot statements of work with enterprise design partners.", versionNote: "Uploaded Northstar signed appendix", collaborators: [OWNERS.nadia, OWNERS.priya], }, { id: "board-memo", parentId: "shared", name: "quarterly-board-memo.pdf", type: "file", category: "doc", kindLabel: "PDF Document", extension: "PDF", sizeBytes: 3_620_000, sizeLabel: "3.6 MB", owner: OWNERS.priya, createdAt: "Nov 21, 2026", modifiedAt: "Nov 28, 2026", modifiedOrder: 81, starred: false, shared: true, recent: false, access: "Board & Leadership", tags: ["Q4", "Approved"], summary: "Executive summary of Q3 retention, Q4 launch readiness, and 2027 roadmap priorities.", versionNote: "Final packet distributed", collaborators: [OWNERS.priya, OWNERS.marcus], }, { id: "advisory-notes", parentId: "shared", name: "customer-advisory-notes.md", type: "file", category: "doc", kindLabel: "Markdown Note", extension: "MD", sizeBytes: 36_400, sizeLabel: "36 KB", owner: OWNERS.elena, createdAt: "Nov 14, 2026", modifiedAt: "Nov 27, 2026", modifiedOrder: 79, starred: false, shared: true, recent: false, access: "Workspace editors", tags: ["Research"], summary: "Synthesized interviews from 12 enterprise workspace admins on file search and tagging.", versionNote: "Added top 5 feature requests summary", collaborators: [OWNERS.elena, OWNERS.priya], },
// Shared -> Partner Reviews children { id: "acme-security", parentId: "shared-partners", name: "acme-security-questionnaire.xlsx", type: "file", category: "sheet", kindLabel: "Spreadsheet", extension: "XLSX", sizeBytes: 512_000, sizeLabel: "512 KB", owner: OWNERS.nadia, createdAt: "Nov 12, 2026", modifiedAt: "Nov 29, 2026", modifiedOrder: 84, starred: false, shared: true, recent: false, access: "External partners + Editors", tags: ["Security", "Partner"], summary: "Completed 180-question enterprise security and encryption-at-rest assessment.", versionNote: "Signed off by Security Lead", collaborators: [OWNERS.nadia], }, { id: "northstar-sow", parentId: "shared-partners", name: "northstar-pilot-sow.pdf", type: "file", category: "doc", kindLabel: "PDF Document", extension: "PDF", sizeBytes: 2_180_000, sizeLabel: "2.2 MB", owner: OWNERS.priya, createdAt: "Nov 19, 2026", modifiedAt: "Nov 28, 2026", modifiedOrder: 82, starred: false, shared: true, recent: false, access: "External partners + Editors", tags: ["Partner", "Approved"], summary: "90-day pilot scope, success criteria, and dedicated migration support terms.", versionNote: "Countersigned copy", collaborators: [OWNERS.priya, OWNERS.nadia], },];
const SUGGESTED_TAGS = ["Reviewed", "Archive", "Priority", "Internal", "Shareable"];
/* -------------------------------------------------------------------------- *//* Crisp inline SVG icons (zero external icon packages) *//* -------------------------------------------------------------------------- */
function ChevronLeftIcon() { return ( <svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <path d="M10 3.5 5.5 8l4.5 4.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" /> </svg> );}
function ChevronRightIcon({ size = 16 }: { size?: number }) { return ( <svg width={size} height={size} viewBox="0 0 16 16" fill="none" aria-hidden="true"> <path d="M6 3.5 10.5 8 6 12.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" /> </svg> );}
function SidebarIcon() { return ( <svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <rect x="2" y="2.5" width="12" height="11" rx="2" stroke="currentColor" strokeWidth="1.4" /> <path d="M6 2.5v11" stroke="currentColor" strokeWidth="1.4" /> </svg> );}
function InspectorIcon() { return ( <svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <rect x="2" y="2.5" width="12" height="11" rx="2" stroke="currentColor" strokeWidth="1.4" /> <path d="M10 2.5v11" stroke="currentColor" strokeWidth="1.4" /> </svg> );}
function SearchIcon() { return ( <svg width="15" height="15" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <circle cx="7.25" cy="7.25" r="4.75" stroke="currentColor" strokeWidth="1.4" /> <path d="m10.75 10.75 3 3" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" /> </svg> );}
function CloseIcon({ size = 14 }: { size?: number }) { return ( <svg width={size} height={size} viewBox="0 0 16 16" fill="none" aria-hidden="true"> <path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" /> </svg> );}
function ListViewIcon() { return ( <svg width="15" height="15" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <path d="M2.5 4h11M2.5 8h11M2.5 12h11" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" /> </svg> );}
function GridViewIcon() { return ( <svg width="15" height="15" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <rect x="2.25" y="2.25" width="4.5" height="4.5" rx="1" stroke="currentColor" strokeWidth="1.4" /> <rect x="9.25" y="2.25" width="4.5" height="4.5" rx="1" stroke="currentColor" strokeWidth="1.4" /> <rect x="2.25" y="9.25" width="4.5" height="4.5" rx="1" stroke="currentColor" strokeWidth="1.4" /> <rect x="9.25" y="9.25" width="4.5" height="4.5" rx="1" stroke="currentColor" strokeWidth="1.4" /> </svg> );}
function ColumnsViewIcon() { return ( <svg width="15" height="15" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <rect x="2" y="2.5" width="12" height="11" rx="1.5" stroke="currentColor" strokeWidth="1.4" /> <path d="M6 2.5v11M10 2.5v11" stroke="currentColor" strokeWidth="1.4" /> </svg> );}
function SortIcon() { return ( <svg width="15" height="15" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <path d="M3 4.5h10M5 8h6M7 11.5h2" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" /> </svg> );}
function PlusIcon() { return ( <svg width="15" height="15" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <path d="M8 3.25v9.5M3.25 8h9.5" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" /> </svg> );}
function MoreIcon() { return ( <svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <circle cx="3.5" cy="8" r="1.2" fill="currentColor" /> <circle cx="8" cy="8" r="1.2" fill="currentColor" /> <circle cx="12.5" cy="8" r="1.2" fill="currentColor" /> </svg> );}
function StarIcon({ filled }: { filled: boolean }) { return ( <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <path d="M8 2.25 9.75 5.8l3.9.56-2.83 2.76.67 3.88L8 11.16 4.51 13l.67-3.88L2.35 6.36l3.9-.56L8 2.25Z" fill={filled ? "currentColor" : "none"} stroke="currentColor" strokeWidth="1.35" strokeLinejoin="round" /> </svg> );}
function ShareIcon() { return ( <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <path d="M8 2.5v7.25M5.25 5.25 8 2.5l2.75 2.75M3.5 9.25v3a1.25 1.25 0 0 0 1.25 1.25h6.5a1.25 1.25 0 0 0 1.25-1.25v-3" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" strokeLinejoin="round" /> </svg> );}
function DownloadIcon() { return ( <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <path d="M8 2.5v7.25M5.25 7.25 8 10l2.75-2.75M3.5 11.5v1a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-1" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" strokeLinejoin="round" /> </svg> );}
function DriveIcon() { return ( <svg width="15" height="15" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <path d="M2.5 5.25 8 2.25l5.5 3v5.5L8 13.75l-5.5-3v-5.5Z" stroke="currentColor" strokeWidth="1.4" strokeLinejoin="round" /> <path d="M2.5 5.25 8 8.25l5.5-3M8 8.25v5.5" stroke="currentColor" strokeWidth="1.4" /> </svg> );}
function UsersIcon() { return ( <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <circle cx="6" cy="5.5" r="2.25" stroke="currentColor" strokeWidth="1.35" /> <path d="M2.25 13c.45-2.1 2-3.25 3.75-3.25S9.3 10.9 9.75 13" stroke="currentColor" strokeWidth="1.35" strokeLinecap="round" /> <circle cx="11.25" cy="6.25" r="1.75" stroke="currentColor" strokeWidth="1.35" /> <path d="M10.75 10.1c1.35.25 2.45 1.15 2.85 2.9" stroke="currentColor" strokeWidth="1.35" strokeLinecap="round" /> </svg> );}
function ClockIcon() { return ( <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true"> <circle cx="8" cy="8" r="5.75" stroke="currentColor" strokeWidth="1.35" /> <path d="M8 4.75V8l2.25 1.5" stroke="currentColor" strokeWidth="1.35" strokeLinecap="round" strokeLinejoin="round" /> </svg> );}
function FolderGlyph({ size = 16, filled = false }: { size?: number; filled?: boolean }) { return ( <svg width={size} height={size} viewBox="0 0 16 16" fill="none" aria-hidden="true"> <path d="M1.75 4.25c0-.69.56-1.25 1.25-1.25h3.1c.33 0 .65.13.88.37l.92.93h5.1c.69 0 1.25.56 1.25 1.25v6.2c0 .69-.56 1.25-1.25 1.25H3c-.69 0-1.25-.56-1.25-1.25v-7.5Z" fill={filled ? "currentColor" : "none"} fillOpacity={filled ? 0.18 : 0} stroke="currentColor" strokeWidth="1.35" strokeLinejoin="round" /> </svg> );}
function NodeGlyph({ category, size = 16 }: { category: FileCategory; size?: number }) { if (category === "folder") { return <FolderGlyph size={size} filled />; } if (category === "design") { return ( <svg width={size} height={size} viewBox="0 0 16 16" fill="none" aria-hidden="true"> <rect x="2.5" y="2.5" width="11" height="11" rx="2.25" stroke="currentColor" strokeWidth="1.35" /> <circle cx="6.25" cy="6.25" r="1.5" stroke="currentColor" strokeWidth="1.3" /> <path d="M5.5 11.5 9.25 7.75 12 10.5" stroke="currentColor" strokeWidth="1.35" strokeLinecap="round" strokeLinejoin="round" /> </svg> ); } if (category === "code") { return ( <svg width={size} height={size} viewBox="0 0 16 16" fill="none" aria-hidden="true"> <path d="M5.5 5 2.5 8l3 3M10.5 5l3 3-3 3M8.75 3.5l-1.5 9" stroke="currentColor" strokeWidth="1.35" strokeLinecap="round" strokeLinejoin="round" /> </svg> ); } if (category === "sheet") { return ( <svg width={size} height={size} viewBox="0 0 16 16" fill="none" aria-hidden="true"> <rect x="2.5" y="2.5" width="11" height="11" rx="1.75" stroke="currentColor" strokeWidth="1.35" /> <path d="M2.5 6.25h11M2.5 9.75h11M6.5 2.5v11" stroke="currentColor" strokeWidth="1.25" /> </svg> ); } if (category === "media") { return ( <svg width={size} height={size} viewBox="0 0 16 16" fill="none" aria-hidden="true"> <rect x="2.25" y="3" width="11.5" height="10" rx="2" stroke="currentColor" strokeWidth="1.35" /> <path d="m6.75 6.25 3.5 1.75-3.5 1.75v-3.5Z" fill="currentColor" /> </svg> ); } if (category === "deck") { return ( <svg width={size} height={size} viewBox="0 0 16 16" fill="none" aria-hidden="true"> <rect x="2.25" y="3" width="11.5" height="8" rx="1.5" stroke="currentColor" strokeWidth="1.35" /> <path d="M8 11v2.5M5.5 13.5h5M5 6.5h6M5 8.5h3.5" stroke="currentColor" strokeWidth="1.3" strokeLinecap="round" /> </svg> ); } return ( <svg width={size} height={size} viewBox="0 0 16 16" fill="none" aria-hidden="true"> <path d="M4 2.25h5.25L12.5 5.5v8.25H4V2.25Z" stroke="currentColor" strokeWidth="1.35" strokeLinejoin="round" /> <path d="M9 2.25V5.75h3.5M6 8.25h4M6 10.75h3" stroke="currentColor" strokeWidth="1.25" strokeLinecap="round" strokeLinejoin="round" /> </svg> );}
/* -------------------------------------------------------------------------- *//* Helpers *//* -------------------------------------------------------------------------- */
function getAncestorChain(nodes: DriveNode[], folderId: string | null): DriveNode[] { const byId = new Map(nodes.map((n) => [n.id, n])); const chain: DriveNode[] = []; let cursor = folderId; while (cursor) { const node = byId.get(cursor); if (!node) break; chain.unshift(node); cursor = node.parentId; } return chain;}
function getLocationPath(nodes: DriveNode[], node: DriveNode, workspaceName: string): string { const ancestors = getAncestorChain(nodes, node.parentId); return [workspaceName, ...ancestors.map((a) => a.name)].join(" / ");}
function sortNodes(items: DriveNode[], field: SortField, dir: SortDir): DriveNode[] { const factor = dir === "asc" ? 1 : -1; return [...items].sort((a, b) => { if (a.type !== b.type) { return a.type === "folder" ? -1 : 1; } if (field === "name") { return a.name.localeCompare(b.name) * factor; } if (field === "modified") { return (a.modifiedOrder - b.modifiedOrder) * factor; } if (field === "size") { return (a.sizeBytes - b.sizeBytes) * factor; } return a.kindLabel.localeCompare(b.kindLabel) * factor; });}
/* -------------------------------------------------------------------------- *//* Styles *//* -------------------------------------------------------------------------- */
const styles = stylex.create({ root: { backgroundColor: semanticColors.bg, color: semanticColors.fg, containerName: "file-explorer", containerType: "inline-size", fontFamily: fonts.body, height: "100%", minHeight: "38rem", overflow: "hidden", width: "100%", }, header: { backgroundColor: semanticColors.bgSurface, borderBottomColor: semanticColors.border, borderBottomStyle: "solid", borderBottomWidth: "1px", flexShrink: 0, paddingBlock: spacing._2, paddingInline: spacing._3, }, brandMark: { backgroundColor: semanticColors.accentSubtle, borderRadius: semanticRadii.control, color: semanticColors.accentFg, height: "1.75rem", width: "1.75rem", }, brandTitle: { letterSpacing: "-0.01em", whiteSpace: "nowrap", }, msAuto: { marginInlineStart: "auto", }, searchWrap: { position: "relative", width: { default: "15rem", [COMPACT_HEADER]: "11rem", }, }, searchIcon: { color: semanticColors.fgMuted, display: "inline-flex", insetInlineStart: spacing._2_5, pointerEvents: "none", position: "absolute", zIndex: 1, }, searchInput: { paddingInlineEnd: spacing._7, paddingInlineStart: spacing._8, }, searchClear: { alignItems: "center", backgroundColor: { default: "transparent", ":hover": semanticColors.bgSubtle, }, borderRadius: radii.full, borderWidth: 0, color: semanticColors.fgMuted, cursor: "pointer", display: "inline-flex", height: "1.25rem", insetInlineEnd: spacing._1_5, justifyContent: "center", paddingBlock: 0, paddingInline: 0, position: "absolute", width: "1.25rem", }, segmentLabel: { display: { default: "inline", [COMPACT_HEADER]: "none", }, }, segmentItem: { gap: spacing._1_5, paddingInline: spacing._2_5, }, workspace: { flexGrow: 1, minHeight: 0, width: "100%", }, railSplitterPanel: { display: { default: "flex", [NARROW_RAIL]: "none", }, flexDirection: "column", minHeight: 0, minWidth: 0, }, centerSplitterPanel: { containerName: "file-explorer-main", containerType: "inline-size", display: "flex", flexDirection: "column", minHeight: 0, minWidth: 0, }, inspectorSplitterPanel: { display: { default: "flex", [NARROW_INSPECTOR]: "none", }, flexDirection: "column", minHeight: 0, minWidth: 0, }, railHandle: { display: { default: "grid", [NARROW_RAIL]: "none", }, }, inspectorHandle: { display: { default: "grid", [NARROW_INSPECTOR]: "none", }, }, sidebar: { backgroundColor: semanticColors.bgSurface, flexGrow: 1, minHeight: 0, overflowY: "auto", paddingBlock: spacing._3, paddingInline: spacing._2_5, }, sidebarSectionLabel: { paddingInline: spacing._2, }, quickNavBtn: { alignItems: "center", backgroundColor: { default: "transparent", ":hover": semanticColors.bgMuted, }, borderRadius: semanticRadii.control, borderWidth: 0, color: semanticColors.fgMuted, cursor: "pointer", display: "flex", fontFamily: "inherit", fontSize: fontSizes.sm, fontWeight: fontWeights.medium, gap: spacing._2, justifyContent: "space-between", lineHeight: lineHeights.sm, paddingBlock: spacing._1_5, paddingInline: spacing._2, textAlign: "start", transitionDuration: durations.fast, transitionProperty: "background-color, color", width: "100%", }, quickNavBtnActive: { backgroundColor: { default: semanticColors.accentSubtle, ":hover": semanticColors.accentSubtle, }, color: semanticColors.accentFg, }, treeWrap: { flexGrow: 1, minHeight: 0, }, treeIconAccent: { color: semanticColors.accentFg, display: "inline-flex", flexShrink: 0, }, treeTextTruncate: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", }, storageCard: { backgroundColor: semanticColors.bgMuted, borderColor: semanticColors.borderSubtle, borderRadius: semanticRadii.panel, borderStyle: "solid", borderWidth: "1px", marginTop: "auto", paddingBlock: spacing._2_5, paddingInline: spacing._3, }, mainPane: { backgroundColor: semanticColors.bg, flexGrow: 1, minHeight: 0, }, pathBar: { backgroundColor: semanticColors.bg, borderBottomColor: semanticColors.borderSubtle, borderBottomStyle: "solid", borderBottomWidth: "1px", flexShrink: 0, minHeight: "2.625rem", paddingBlock: spacing._1_5, paddingInline: spacing._4, }, breadcrumbBtn: { backgroundColor: "transparent", borderWidth: 0, cursor: "pointer", fontFamily: "inherit", fontSize: "inherit", paddingBlock: spacing._0_5, paddingInline: spacing._1, }, browserViewport: { flexGrow: 1, minHeight: 0, overflowY: "auto", }, tableWrap: { overflowX: "auto", width: "100%", }, tableHeaderRow: { backgroundColor: semanticColors.bgSurface, }, tableTh: { borderBottomColor: semanticColors.border, borderBottomStyle: "solid", borderBottomWidth: "1px", color: semanticColors.fgMuted, fontSize: fontSizes.xs, fontWeight: fontWeights.medium, paddingBlock: spacing._2, paddingInline: spacing._3, whiteSpace: "nowrap", }, tableThResponsive: { display: { default: "table-cell", [HIDE_TABLE_META]: "none", }, }, tableThAlignEnd: { textAlign: "end", }, tableRow: { backgroundColor: { default: "transparent", ":hover": semanticColors.bgSubtle, }, cursor: "pointer", transitionDuration: durations.fast, transitionProperty: "background-color", }, tableRowSelected: { backgroundColor: { default: semanticColors.accentSubtle, ":hover": semanticColors.accentSubtle, }, }, tableCell: { borderBottomColor: semanticColors.borderSubtle, borderBottomStyle: "solid", borderBottomWidth: "1px", paddingBlock: spacing._2, paddingInline: spacing._3, verticalAlign: "middle", }, tableCellResponsive: { display: { default: "table-cell", [HIDE_TABLE_META]: "none", }, }, tableCellMuted: { color: semanticColors.fgMuted, fontSize: fontSizes.xs, whiteSpace: "nowrap", }, tableCellSize: { color: semanticColors.fgMuted, fontSize: fontSizes.xs, fontVariantNumeric: "tabular-nums", textAlign: "end", whiteSpace: "nowrap", }, tableCellActions: { textAlign: "end", width: "2.5rem", }, itemIconBadge: { borderRadius: semanticRadii.control, height: "1.875rem", width: "1.875rem", }, starMark: { color: semanticColors.warningFg, display: "inline-flex", flexShrink: 0, }, ownerCell: { display: "inline-flex", whiteSpace: "nowrap", }, gridContainer: { gridTemplateColumns: "repeat(auto-fill, minmax(11.5rem, 1fr))", paddingBlock: spacing._4, paddingInline: spacing._4, }, gridCard: { backgroundColor: semanticColors.bgSurface, borderColor: { default: semanticColors.border, ":hover": semanticColors.borderEmphasized, }, borderRadius: semanticRadii.panel, borderStyle: "solid", borderWidth: "1px", cursor: "pointer", overflow: "hidden", transitionDuration: durations.fast, transitionProperty: "border-color, box-shadow, background-color", }, gridCardSelected: { backgroundColor: semanticColors.accentMuted, borderColor: semanticColors.accentBorder, boxShadow: semanticShadows.xs, }, gridThumb: { backgroundColor: semanticColors.bgMuted, borderBottomColor: semanticColors.borderSubtle, borderBottomStyle: "solid", borderBottomWidth: "1px", height: "6.5rem", position: "relative", }, gridThumbCornerStart: { insetInlineStart: spacing._2, position: "absolute", top: spacing._2, }, gridThumbCornerEnd: { insetInlineEnd: spacing._1_5, position: "absolute", top: spacing._1_5, }, gridBody: { paddingBlock: spacing._2_5, paddingInline: spacing._3, }, columnsViewport: { height: "100%", minHeight: 0, overflowX: "auto", overflowY: "hidden", }, millerColumn: { borderInlineEndColor: semanticColors.borderSubtle, borderInlineEndStyle: "solid", borderInlineEndWidth: "1px", flexShrink: 0, height: "100%", minHeight: 0, overflowY: "auto", paddingBlock: spacing._2, paddingInline: spacing._2, width: "14.5rem", }, millerColumnHeader: { paddingBlock: spacing._1, paddingInline: spacing._2, }, millerRow: { alignItems: "center", backgroundColor: { default: "transparent", ":hover": semanticColors.bgMuted, }, borderRadius: semanticRadii.control, borderWidth: 0, color: semanticColors.fg, cursor: "pointer", display: "flex", fontFamily: "inherit", fontSize: fontSizes.sm, gap: spacing._2, justifyContent: "space-between", lineHeight: lineHeights.sm, paddingBlock: spacing._1_5, paddingInline: spacing._2, textAlign: "start", width: "100%", }, millerRowSelected: { backgroundColor: { default: semanticColors.accentSubtle, ":hover": semanticColors.accentSubtle, }, color: semanticColors.accentFg, fontWeight: fontWeights.medium, }, inheritColor: { color: "inherit", }, millerChevron: { color: semanticColors.fgSubtle, display: "inline-flex", flexShrink: 0, }, inspector: { backgroundColor: semanticColors.bgSurface, flexGrow: 1, minHeight: 0, overflowY: "auto", }, inspectorHeader: { borderBottomColor: semanticColors.borderSubtle, borderBottomStyle: "solid", borderBottomWidth: "1px", flexShrink: 0, minHeight: "2.625rem", paddingBlock: spacing._1_5, paddingInline: spacing._3_5, }, inspectorBody: { paddingBlock: spacing._4, paddingInline: spacing._4, }, previewHero: { backgroundColor: semanticColors.bgMuted, borderColor: semanticColors.borderSubtle, borderRadius: semanticRadii.panel, borderStyle: "solid", borderWidth: "1px", paddingBlock: spacing._5, paddingInline: spacing._4, textAlign: "center", }, previewGlyphWrap: { borderRadius: semanticRadii.panel, height: "3.75rem", width: "3.75rem", }, breakWord: { wordBreak: "break-word", }, inspectorActionBtn: { flexBasis: 0, flexGrow: 1, }, dataListCompact: { "--label-width": "5.25rem", }, versionCard: { backgroundColor: semanticColors.bgMuted, borderRadius: semanticRadii.control, paddingBlock: spacing._2, paddingInline: spacing._2_5, }, iconToneFolder: { backgroundColor: semanticColors.accentSubtle, color: semanticColors.accentFg, }, iconToneDesign: { backgroundColor: semanticColors.purpleSubtle, color: semanticColors.purpleFg, }, iconToneCode: { backgroundColor: semanticColors.blueSubtle, color: semanticColors.blueFg, }, iconToneDoc: { backgroundColor: semanticColors.tealSubtle, color: semanticColors.tealFg, }, iconToneSheet: { backgroundColor: semanticColors.emeraldSubtle, color: semanticColors.emeraldFg, }, iconToneMedia: { backgroundColor: semanticColors.amberSubtle, color: semanticColors.amberFg, }, iconToneDeck: { backgroundColor: semanticColors.redSubtle, color: semanticColors.redFg, }, starIconBtn: { color: semanticColors.fgMuted, }, starIconBtnActive: { color: semanticColors.warningFg, },});
const ICON_TONE_BY_CATEGORY = { folder: styles.iconToneFolder, design: styles.iconToneDesign, code: styles.iconToneCode, doc: styles.iconToneDoc, sheet: styles.iconToneSheet, media: styles.iconToneMedia, deck: styles.iconToneDeck,} as const;
export interface FileExplorerProps extends StyleOverrideProps { /** Workspace title displayed in the header and root breadcrumb. */ workspaceName?: string; /** Initial view layout mode. */ defaultView?: ViewMode; /** Initial folder ID opened on mount (`null` opens the drive root). */ defaultFolderId?: string | null;}
/** * FileExplorer — cloud workspace file manager combining a collapsible folder * tree sidebar, breadcrumb navigation, live search, list / grid / Miller-column * views, row actions menu, and a synchronized detail inspector panel. */export function FileExplorer({ workspaceName = "Kestrel Drive", defaultView = "list", defaultFolderId = "design-systems", palette, style,}: FileExplorerProps) { const queue = useMemo(() => Toast.createToaster(), []);
const [nodes, setNodes] = useState<DriveNode[]>(INITIAL_NODES); const [viewMode, setViewMode] = useState<ViewMode>(defaultView); const [smartFilter, setSmartFilter] = useState<SmartFilter>("all"); const [searchQuery, setSearchQuery] = useState(""); const [sortField, setSortField] = useState<SortField>("name"); const [sortDir, setSortDir] = useState<SortDir>("asc");
// Navigation history stack (each entry is a folderId or null for root) const [history, setHistory] = useState<Array<string | null>>([defaultFolderId]); const [historyIndex, setHistoryIndex] = useState(0);
const [selectedId, setSelectedId] = useState<string | null>("kestrel-ui-v4"); const [expandedFolders, setExpandedFolders] = useState<string[]>([ "design-systems", "engineering", "launch-q4", ]); const [showSidebar, setShowSidebar] = useState(true); const [showInspector, setShowInspector] = useState(true); const [createdCounter, setCreatedCounter] = useState(1);
const currentFolderId = history[historyIndex] ?? null;
const nodesById = useMemo(() => new Map(nodes.map((n) => [n.id, n])), [nodes]);
const navigateToFolder = useCallback( (folderId: string | null, nextSelectedId?: string | null) => { setSmartFilter("all"); setSearchQuery(""); setHistory((prev) => { const sliced = prev.slice(0, historyIndex + 1); if (sliced[sliced.length - 1] === folderId) { return sliced; } return [...sliced, folderId]; }); setHistoryIndex((prev) => { const current = history[prev]; return current === folderId ? prev : prev + 1; }); if (folderId) { const chain = getAncestorChain(nodes, folderId).map((n) => n.id); setExpandedFolders((prev) => Array.from(new Set([...prev, ...chain]))); } if (nextSelectedId !== undefined) { setSelectedId(nextSelectedId); } else { setSelectedId(folderId); } }, [history, historyIndex, nodes], );
const canGoBack = historyIndex > 0; const canGoForward = historyIndex < history.length - 1;
const goBack = useCallback(() => { if (!canGoBack) return; const nextIdx = historyIndex - 1; setSmartFilter("all"); setHistoryIndex(nextIdx); setSelectedId(history[nextIdx] ?? null); }, [canGoBack, history, historyIndex]);
const goForward = useCallback(() => { if (!canGoForward) return; const nextIdx = historyIndex + 1; setSmartFilter("all"); setHistoryIndex(nextIdx); setSelectedId(history[nextIdx] ?? null); }, [canGoForward, history, historyIndex]);
const breadcrumbs = useMemo( () => getAncestorChain(nodes, currentFolderId), [nodes, currentFolderId], );
const folderChildrenMap = useMemo(() => { const map = new Map<string | null, DriveNode[]>(); for (const node of nodes) { if (node.type !== "folder") continue; const list = map.get(node.parentId) ?? []; list.push(node); map.set(node.parentId, list); } for (const [key, list] of map.entries()) { map.set( key, [...list].sort((a, b) => a.name.localeCompare(b.name)), ); } return map; }, [nodes]);
const childCountByFolder = useMemo(() => { const counts = new Map<string, number>(); for (const node of nodes) { if (node.parentId) { counts.set(node.parentId, (counts.get(node.parentId) ?? 0) + 1); } } return counts; }, [nodes]);
const starredCount = useMemo(() => nodes.filter((n) => n.starred).length, [nodes]); const sharedCount = useMemo(() => nodes.filter((n) => n.shared).length, [nodes]); const recentCount = useMemo(() => nodes.filter((n) => n.recent).length, [nodes]);
const trimmedQuery = searchQuery.trim().toLowerCase();
const displayedItems = useMemo(() => { let list: DriveNode[]; if (trimmedQuery.length > 0) { list = nodes.filter( (n) => n.name.toLowerCase().includes(trimmedQuery) || n.kindLabel.toLowerCase().includes(trimmedQuery) || n.owner.name.toLowerCase().includes(trimmedQuery) || n.tags.some((t) => t.toLowerCase().includes(trimmedQuery)), ); } else if (smartFilter === "starred") { list = nodes.filter((n) => n.starred); } else if (smartFilter === "shared") { list = nodes.filter((n) => n.shared); } else if (smartFilter === "recent") { list = nodes.filter((n) => n.recent); } else { list = nodes.filter((n) => n.parentId === currentFolderId); } return sortNodes(list, sortField, sortDir); }, [nodes, trimmedQuery, smartFilter, currentFolderId, sortField, sortDir]);
// Miller columns path derived from currentFolderId + selectedId const millerColumns = useMemo(() => { const cols: Array<{ title: string; parentId: string | null; items: DriveNode[]; activeId: string | null }> = []; const selectedNode = selectedId ? nodesById.get(selectedId) ?? null : null; const activeChainIds: string[] = [];
if (selectedNode) { const chain = getAncestorChain(nodes, selectedNode.id); for (const item of chain) { activeChainIds.push(item.id); } } else if (currentFolderId) { const chain = getAncestorChain(nodes, currentFolderId); for (const item of chain) { activeChainIds.push(item.id); } }
const rootItems = sortNodes( nodes.filter((n) => n.parentId === null), sortField, sortDir, ); cols.push({ title: workspaceName, parentId: null, items: rootItems, activeId: activeChainIds[0] ?? null, });
for (let i = 0; i < activeChainIds.length; i++) { const id = activeChainIds[i]; const node = nodesById.get(id); if (!node || node.type !== "folder") break; const children = sortNodes( nodes.filter((n) => n.parentId === node.id), sortField, sortDir, ); cols.push({ title: node.name, parentId: node.id, items: children, activeId: activeChainIds[i + 1] ?? null, }); }
return cols; }, [nodes, nodesById, selectedId, currentFolderId, sortField, sortDir, workspaceName]);
const inspectedNode = useMemo(() => { if (selectedId) { const found = nodesById.get(selectedId); if (found) return found; } if (currentFolderId) { const folder = nodesById.get(currentFolderId); if (folder) return folder; } return displayedItems[0] ?? nodes[0] ?? null; }, [selectedId, nodesById, currentFolderId, displayedItems, nodes]);
/* ------------------------------ Mutations ------------------------------ */
const handleToggleStar = useCallback( (node: DriveNode) => { const nextStarred = !node.starred; setNodes((prev) => prev.map((item) => (item.id === node.id ? { ...item, starred: nextStarred } : item)), ); queue.info(nextStarred ? `Starred ${node.name}` : `Removed ${node.name} from Starred`); }, [queue], );
const handleShare = useCallback( (node: DriveNode) => { queue.success(`Share link copied for ${node.name}`, { description: `Access: ${node.access}`, }); }, [queue], );
const handleDownload = useCallback( (node: DriveNode) => { queue.info(`Preparing download for ${node.name}`, { description: node.type === "folder" ? "Archiving folder as .zip" : `${node.sizeLabel} · ${node.kindLabel}`, }); }, [queue], );
const handleDuplicate = useCallback( (node: DriveNode) => { const dot = node.name.lastIndexOf("."); const copyName = node.type === "file" && dot > 0 ? `${node.name.slice(0, dot)} copy${node.name.slice(dot)}` : `${node.name} Copy`; const newId = `${node.id}-copy-${Date.now()}`; const copy: DriveNode = { ...node, id: newId, name: copyName, modifiedAt: "Just now", modifiedOrder: 101 + createdCounter, recent: true, starred: false, }; setNodes((prev) => [copy, ...prev]); setSelectedId(newId); setCreatedCounter((c) => c + 1); queue.success(`Duplicated ${node.name}`, { description: `Created ${copyName}` }); }, [createdCounter, queue], );
const handleDelete = useCallback( (node: DriveNode) => { const idsToRemove = new Set<string>([node.id]); let added = true; while (added) { added = false; for (const item of nodes) { if (item.parentId && idsToRemove.has(item.parentId) && !idsToRemove.has(item.id)) { idsToRemove.add(item.id); added = true; } } } const removed = nodes.filter((item) => idsToRemove.has(item.id)); setNodes((prev) => prev.filter((item) => !idsToRemove.has(item.id))); if (selectedId && idsToRemove.has(selectedId)) { setSelectedId(node.parentId); } queue.warning(`Moved ${node.name} to Trash`, { description: removed.length > 1 ? `${removed.length} items removed from folder.` : undefined, action: { label: "Undo", onAction: () => { setNodes((prev) => [...removed, ...prev]); setSelectedId(node.id); }, }, }); }, [nodes, selectedId, queue], );
const handleCreateFolder = useCallback(() => { const n = createdCounter; const newId = `new-folder-${Date.now()}`; const folderName = n === 1 ? "Sprint Archive" : `Sprint Archive ${n}`; const newNode: DriveNode = { id: newId, parentId: smartFilter === "all" ? currentFolderId : null, name: folderName, type: "folder", category: "folder", kindLabel: "Workspace Folder", sizeBytes: 0, sizeLabel: "0 KB", owner: OWNERS.elena, createdAt: "Just now", modifiedAt: "Just now", modifiedOrder: 105 + n, starred: false, shared: false, recent: true, access: "Workspace editors", tags: ["New"], summary: "Newly created workspace folder ready for project assets.", versionNote: "Created just now", collaborators: [OWNERS.elena], }; setNodes((prev) => [newNode, ...prev]); setCreatedCounter((c) => c + 1); setSelectedId(newId); if (smartFilter !== "all") { setSmartFilter("all"); } queue.success(`Created folder "${folderName}"`); }, [createdCounter, currentFolderId, smartFilter, queue]);
const handleCreateDoc = useCallback(() => { const n = createdCounter; const newId = `new-doc-${Date.now()}`; const docName = n === 1 ? "meeting-notes.md" : `meeting-notes-${n}.md`; const newNode: DriveNode = { id: newId, parentId: smartFilter === "all" ? currentFolderId : null, name: docName, type: "file", category: "doc", kindLabel: "Markdown Note", extension: "MD", sizeBytes: 4_200, sizeLabel: "4 KB", owner: OWNERS.elena, createdAt: "Just now", modifiedAt: "Just now", modifiedOrder: 105 + n, starred: false, shared: false, recent: true, access: "Workspace editors", tags: ["Draft"], summary: "Collaborative workspace note created inside Kestrel Drive.", versionNote: "v0.1 · Draft initialized", collaborators: [OWNERS.elena], }; setNodes((prev) => [newNode, ...prev]); setCreatedCounter((c) => c + 1); setSelectedId(newId); if (smartFilter !== "all") { setSmartFilter("all"); } queue.success(`Created note "${docName}"`); }, [createdCounter, currentFolderId, smartFilter, queue]);
const handleAddTag = useCallback( (node: DriveNode) => { const nextTag = SUGGESTED_TAGS.find((t) => !node.tags.includes(t)); if (!nextTag) { queue.info(`All suggested tags are already on ${node.name}`); return; } setNodes((prev) => prev.map((item) => (item.id === node.id ? { ...item, tags: [...item.tags, nextTag] } : item)), ); queue.success(`Added "${nextTag}" tag to ${node.name}`); }, [queue], );
const handleOpenItem = useCallback( (node: DriveNode) => { if (node.type === "folder") { navigateToFolder(node.id, node.id); } else { setSelectedId(node.id); setShowInspector(true); queue.info(`Opening ${node.name}`, { description: `${node.kindLabel} · ${node.sizeLabel}`, }); } }, [navigateToFolder, queue], );
/* ------------------------------ Sub-renders ---------------------------- */
const renderItemActionsMenu = (node: DriveNode) => ( <Menu.Root size="sm"> <Menu.Trigger render={ <IconButton variant="ghost" size="xs" aria-label={`Actions for ${node.name}`} onClick={(e) => e.stopPropagation()} /> } > <MoreIcon /> </Menu.Trigger> <Menu.Content align="end"> <Menu.Item onSelect={() => handleOpenItem(node)}> <Menu.ItemText>{node.type === "folder" ? "Open folder" : "Quick preview"}</Menu.ItemText> <Menu.ItemCommand>↵</Menu.ItemCommand> </Menu.Item> <Menu.Item onSelect={() => handleShare(node)}> <Menu.ItemText>Copy share link</Menu.ItemText> <Menu.ItemCommand>⌘L</Menu.ItemCommand> </Menu.Item> <Menu.Item onSelect={() => handleToggleStar(node)}> <Menu.ItemText>{node.starred ? "Remove star" : "Add star"}</Menu.ItemText> </Menu.Item> <Menu.Item onSelect={() => handleDuplicate(node)}> <Menu.ItemText>Duplicate</Menu.ItemText> <Menu.ItemCommand>⌘D</Menu.ItemCommand> </Menu.Item> <Menu.Item onSelect={() => handleDownload(node)}> <Menu.ItemText>Download</Menu.ItemText> </Menu.Item> <Menu.Separator /> <Menu.Item data-destructive="" onSelect={() => handleDelete(node)}> <Menu.ItemText>Move to trash</Menu.ItemText> <Menu.ItemCommand>⌫</Menu.ItemCommand> </Menu.Item> </Menu.Content> </Menu.Root> );
const renderFolderTreeBranch = (folder: DriveNode) => { const subFolders = folderChildrenMap.get(folder.id) ?? []; const isActive = smartFilter === "all" && currentFolderId === folder.id;
if (subFolders.length > 0) { return ( <TreeView.Branch key={folder.id} value={folder.id}> <TreeView.BranchControl data-selected={isActive ? "true" : undefined} onClick={() => navigateToFolder(folder.id)} > <TreeView.BranchIndicator> <TreeView.Icon viewBox="0 0 16 16" fill="none"> <path d="M6 3.5 10.5 8 6 12.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" /> </TreeView.Icon> </TreeView.BranchIndicator> <span {...stylex.props(styles.treeIconAccent)}> <FolderGlyph size={14} filled={isActive} /> </span> <TreeView.BranchText style={styles.treeTextTruncate}>{folder.name}</TreeView.BranchText> </TreeView.BranchControl> <TreeView.BranchContent> <TreeView.BranchIndentGuide /> {subFolders.map(renderFolderTreeBranch)} </TreeView.BranchContent> </TreeView.Branch> ); }
return ( <TreeView.Item key={folder.id} value={folder.id} data-selected={isActive ? "true" : undefined} onClick={() => navigateToFolder(folder.id)} > <span {...stylex.props(styles.treeIconAccent)}> <FolderGlyph size={14} filled={isActive} /> </span> <TreeView.ItemText style={styles.treeTextTruncate}>{folder.name}</TreeView.ItemText> </TreeView.Item> ); };
const defaultSplitLayout = showSidebar && showInspector ? [22, 52, 26] : showSidebar ? [24, 76] : showInspector ? [72, 28] : [100];
const smartFilterLabel = smartFilter === "starred" ? "Starred" : smartFilter === "shared" ? "Shared with me" : smartFilter === "recent" ? "Recent activity" : null;
return ( <VStack gap="0" palette={palette} style={[styles.root, style]}> {/* Top Toolbar */} <HStack render={<header />} gap="2" justify="between" wrap="wrap" style={styles.header}> <HStack gap="1.5"> <Toolbar.Root variant="plain" size="sm" aria-label="Workspace navigation"> <Toolbar.Group> <Toolbar.Button aria-label={showSidebar ? "Hide sidebar" : "Show sidebar"} aria-pressed={showSidebar} onClick={() => setShowSidebar((v) => !v)} > <SidebarIcon /> </Toolbar.Button> <Toolbar.Button aria-label="Go back" disabled={!canGoBack} onClick={goBack} > <ChevronLeftIcon /> </Toolbar.Button> <Toolbar.Button aria-label="Go forward" disabled={!canGoForward} onClick={goForward} > <ChevronRightIcon /> </Toolbar.Button> </Toolbar.Group> <Toolbar.Separator /> </Toolbar.Root>
<Square render={<span />} style={styles.brandMark}> <DriveIcon /> </Square> <Text render={<h1 />} size="sm" weight="semibold" style={styles.brandTitle}> {workspaceName} </Text> </HStack>
<HStack gap="2" wrap="wrap" style={styles.msAuto}> <HStack gap="0" style={styles.searchWrap}> <span {...stylex.props(styles.searchIcon)}> <SearchIcon /> </span> <Input size="sm" variant="subtle" value={searchQuery} onChange={(e) => setSearchQuery(e.target.value)} placeholder="Search files, owners, tags…" aria-label="Search workspace files" style={styles.searchInput} /> {searchQuery.length > 0 ? ( <button type="button" aria-label="Clear search" onClick={() => setSearchQuery("")} {...stylex.props(styles.searchClear)} > <CloseIcon size={12} /> </button> ) : null} </HStack>
<SegmentGroup.Root size="xs" value={viewMode} onValueChange={(next) => { if (next === "list" || next === "grid" || next === "columns") { setViewMode(next); } }} aria-label="View layout" > <SegmentGroup.Item value="list" style={styles.segmentItem}> <ListViewIcon /> <span {...stylex.props(styles.segmentLabel)}>List</span> </SegmentGroup.Item> <SegmentGroup.Item value="grid" style={styles.segmentItem}> <GridViewIcon /> <span {...stylex.props(styles.segmentLabel)}>Grid</span> </SegmentGroup.Item> <SegmentGroup.Item value="columns" style={styles.segmentItem}> <ColumnsViewIcon /> <span {...stylex.props(styles.segmentLabel)}>Columns</span> </SegmentGroup.Item> </SegmentGroup.Root>
<Menu.Root size="sm"> <Menu.Trigger render={<Button variant="surface" size="sm" aria-label="Sort files" />}> <SortIcon /> <span {...stylex.props(styles.segmentLabel)}>Sort</span> </Menu.Trigger> <Menu.Content align="end"> <Menu.Group> <Menu.GroupLabel>Sort by</Menu.GroupLabel> <Menu.RadioGroup value={sortField} onValueChange={(val) => { if (val === "name" || val === "modified" || val === "size" || val === "kind") { setSortField(val); } }} > <Menu.RadioItem value="name"> <Menu.ItemIndicator /> <Menu.ItemText>Name</Menu.ItemText> </Menu.RadioItem> <Menu.RadioItem value="modified"> <Menu.ItemIndicator /> <Menu.ItemText>Last modified</Menu.ItemText> </Menu.RadioItem> <Menu.RadioItem value="size"> <Menu.ItemIndicator /> <Menu.ItemText>File size</Menu.ItemText> </Menu.RadioItem> <Menu.RadioItem value="kind"> <Menu.ItemIndicator /> <Menu.ItemText>File kind</Menu.ItemText> </Menu.RadioItem> </Menu.RadioGroup> </Menu.Group> <Menu.Separator /> <Menu.Group> <Menu.GroupLabel>Order</Menu.GroupLabel> <Menu.RadioGroup value={sortDir} onValueChange={(val) => { if (val === "asc" || val === "desc") { setSortDir(val); } }} > <Menu.RadioItem value="asc"> <Menu.ItemIndicator /> <Menu.ItemText>Ascending</Menu.ItemText> </Menu.RadioItem> <Menu.RadioItem value="desc"> <Menu.ItemIndicator /> <Menu.ItemText>Descending</Menu.ItemText> </Menu.RadioItem> </Menu.RadioGroup> </Menu.Group> </Menu.Content> </Menu.Root>
<Menu.Root size="sm"> <Menu.Trigger render={<Button variant="solid" size="sm" palette={accentPalette} />} > <PlusIcon /> New </Menu.Trigger> <Menu.Content align="end"> <Menu.Item onSelect={handleCreateFolder}> <Menu.ItemText>New folder</Menu.ItemText> <Menu.ItemCommand>⇧⌘N</Menu.ItemCommand> </Menu.Item> <Menu.Item onSelect={handleCreateDoc}> <Menu.ItemText>New Markdown note</Menu.ItemText> </Menu.Item> <Menu.Separator /> <Menu.Item onSelect={() => queue.info("Upload picker ready", { description: "Drop files anywhere into Kestrel Drive to sync.", }) } > <Menu.ItemText>Upload files…</Menu.ItemText> <Menu.ItemCommand>⌘U</Menu.ItemCommand> </Menu.Item> </Menu.Content> </Menu.Root>
<IconButton variant={showInspector ? "subtle" : "ghost"} size="sm" palette={showInspector ? accentPalette : undefined} aria-label={showInspector ? "Hide details inspector" : "Show details inspector"} aria-pressed={showInspector} onClick={() => setShowInspector((v) => !v)} > <InspectorIcon /> </IconButton> </HStack> </HStack>
{/* Resizable 3-Pane Workspace */} <HStack gap="0" style={styles.workspace}> <Splitter.Root key={`${showSidebar}-${showInspector}`} defaultSize={defaultSplitLayout} minSize={15} style={styles.workspace} > {showSidebar ? ( <> <Splitter.Panel style={styles.railSplitterPanel}> <VStack render={<aside />} gap="3" aria-label="Workspace navigation" style={styles.sidebar} > <VStack render={<nav />} gap="0.5" aria-label="Quick views"> <button type="button" onClick={() => { setSmartFilter("all"); setSearchQuery(""); navigateToFolder(null, null); }} {...stylex.props( styles.quickNavBtn, smartFilter === "all" && currentFolderId === null && styles.quickNavBtnActive, )} > <HStack render={<span />} gap="2"> <DriveIcon /> All files </HStack> <Text render={<span />} size="xs" tone="subtle" tabular="true"> {nodes.length} </Text> </button>
<button type="button" onClick={() => { setSmartFilter("starred"); setSearchQuery(""); }} {...stylex.props( styles.quickNavBtn, smartFilter === "starred" && styles.quickNavBtnActive, )} > <HStack render={<span />} gap="2"> <StarIcon filled={smartFilter === "starred"} /> Starred </HStack> <Text render={<span />} size="xs" tone="subtle" tabular="true"> {starredCount} </Text> </button>
<button type="button" onClick={() => { setSmartFilter("shared"); setSearchQuery(""); }} {...stylex.props( styles.quickNavBtn, smartFilter === "shared" && styles.quickNavBtnActive, )} > <HStack render={<span />} gap="2"> <UsersIcon /> Shared </HStack> <Text render={<span />} size="xs" tone="subtle" tabular="true"> {sharedCount} </Text> </button>
<button type="button" onClick={() => { setSmartFilter("recent"); setSearchQuery(""); }} {...stylex.props( styles.quickNavBtn, smartFilter === "recent" && styles.quickNavBtnActive, )} > <HStack render={<span />} gap="2"> <ClockIcon /> Recent </HStack> <Text render={<span />} size="xs" tone="subtle" tabular="true"> {recentCount} </Text> </button> </VStack>
<Separator decorative />
<VStack gap="1.5" style={styles.treeWrap}> <Text render={<h2 />} variant="overline" tone="subtle" style={styles.sidebarSectionLabel} > Folders </Text> <TreeView.Root size="xs" variant="subtle" palette={accentPalette} expandedValue={expandedFolders} onExpandedChange={(details) => setExpandedFolders(details.expandedValue)} > <TreeView.Tree aria-label="Workspace folders"> {(folderChildrenMap.get(null) ?? []).map(renderFolderTreeBranch)} </TreeView.Tree> </TreeView.Root> </VStack>
<VStack gap="2" style={styles.storageCard}> <HStack gap="2" justify="between"> <Text render={<span />} size="xs" weight="medium"> Workspace Storage </Text> <Text render={<span />} size="xs" tone="muted" tabular="true"> 42.8 / 100 GB </Text> </HStack> <Progress.Root value={42.8} max={100} size="xs" shape="full" palette={accentPalette} aria-label="Workspace storage used" > <Progress.Track> <Progress.Range /> </Progress.Track> </Progress.Root> <Text size="xs" tone="subtle"> Design 18.2 GB · Media 14.1 GB · Docs 10.5 GB </Text> </VStack> </VStack> </Splitter.Panel>
<Splitter.ResizeTrigger aria-label="Resize folder sidebar" style={styles.railHandle} /> </> ) : null}
{/* Center Main Browser */} <Splitter.Panel style={styles.centerSplitterPanel}> <VStack render={<main />} gap="0" aria-label="File browser" style={styles.mainPane}> <HStack gap="2" justify="between" wrap="wrap" style={styles.pathBar}> <HStack gap="2"> {trimmedQuery.length > 0 ? ( <Breadcrumb.Root size="sm" variant="plain" aria-label="Search scope"> <Breadcrumb.List> <Breadcrumb.Item> <Breadcrumb.Link render={<button type="button" />} onClick={() => setSearchQuery("")} style={styles.breadcrumbBtn} > {workspaceName} </Breadcrumb.Link> </Breadcrumb.Item> <Breadcrumb.Separator aria-hidden="true"> <ChevronRightIcon size={12} /> </Breadcrumb.Separator> <Breadcrumb.Item> <Breadcrumb.CurrentLink aria-current="page"> Search: “{searchQuery.trim()}” </Breadcrumb.CurrentLink> </Breadcrumb.Item> </Breadcrumb.List> </Breadcrumb.Root> ) : smartFilterLabel ? ( <Breadcrumb.Root size="sm" variant="plain" aria-label="Filtered view"> <Breadcrumb.List> <Breadcrumb.Item> <Breadcrumb.Link render={<button type="button" />} onClick={() => setSmartFilter("all")} style={styles.breadcrumbBtn} > {workspaceName} </Breadcrumb.Link> </Breadcrumb.Item> <Breadcrumb.Separator aria-hidden="true"> <ChevronRightIcon size={12} /> </Breadcrumb.Separator> <Breadcrumb.Item> <Breadcrumb.CurrentLink aria-current="page"> {smartFilterLabel} </Breadcrumb.CurrentLink> </Breadcrumb.Item> </Breadcrumb.List> </Breadcrumb.Root> ) : ( <Breadcrumb.Root size="sm" variant="plain" aria-label="Folder path"> <Breadcrumb.List> <Breadcrumb.Item> {breadcrumbs.length === 0 ? ( <Breadcrumb.CurrentLink aria-current="page"> {workspaceName} </Breadcrumb.CurrentLink> ) : ( <Breadcrumb.Link render={<button type="button" />} onClick={() => navigateToFolder(null, null)} style={styles.breadcrumbBtn} > {workspaceName} </Breadcrumb.Link> )} </Breadcrumb.Item> {breadcrumbs.map((crumb, idx) => { const isLast = idx === breadcrumbs.length - 1; return ( <Fragment key={crumb.id}> <Breadcrumb.Separator aria-hidden="true"> <ChevronRightIcon size={12} /> </Breadcrumb.Separator> <Breadcrumb.Item> {isLast ? ( <Breadcrumb.CurrentLink aria-current="page"> {crumb.name} </Breadcrumb.CurrentLink> ) : ( <Breadcrumb.Link render={<button type="button" />} onClick={() => navigateToFolder(crumb.id)} style={styles.breadcrumbBtn} > {crumb.name} </Breadcrumb.Link> )} </Breadcrumb.Item> </Fragment> ); })} </Breadcrumb.List> </Breadcrumb.Root> )} </HStack>
<HStack gap="2"> <Badge variant="subtle" size="sm"> {displayedItems.length} {displayedItems.length === 1 ? "item" : "items"} </Badge> {trimmedQuery.length > 0 || smartFilter !== "all" ? ( <Button variant="ghost" size="xs" onClick={() => { setSearchQuery(""); setSmartFilter("all"); }} > Clear filter </Button> ) : null} </HStack> </HStack>
<div {...stylex.props(styles.browserViewport)}> {viewMode === "columns" && trimmedQuery.length === 0 && smartFilter === "all" ? ( <HStack gap="0" align="stretch" role="region" aria-label="Column browser" style={styles.columnsViewport} > {millerColumns.map((col, colIdx) => ( <VStack key={`${col.parentId ?? "root"}-${colIdx}`} render={<section />} gap="0" aria-label={col.title} style={styles.millerColumn} > <Text render={<h3 />} variant="overline" tone="subtle" style={styles.millerColumnHeader} > {col.title} </Text> {col.items.length === 0 ? ( <EmptyState.Root size="sm"> <EmptyState.Content> <EmptyState.Title>Empty folder</EmptyState.Title> <EmptyState.Description>No files in this folder.</EmptyState.Description> </EmptyState.Content> </EmptyState.Root> ) : ( col.items.map((item) => { const isActive = col.activeId === item.id; return ( <button key={item.id} type="button" onClick={() => { setSelectedId(item.id); if (item.type === "folder") { navigateToFolder(item.id, item.id); } }} onDoubleClick={() => handleOpenItem(item)} {...stylex.props( styles.millerRow, isActive && styles.millerRowSelected, )} > <HStack render={<span />} gap="2"> <Square render={<span />} style={[ styles.itemIconBadge, ICON_TONE_BY_CATEGORY[item.category], ]} > <NodeGlyph category={item.category} size={14} /> </Square> <Text render={<span />} size="sm" weight={isActive ? "medium" : "normal"} truncate="true" style={styles.inheritColor} > {item.name} </Text> </HStack> {item.type === "folder" ? ( <span {...stylex.props(styles.millerChevron)}> <ChevronRightIcon size={13} /> </span> ) : null} </button> ); }) )} </VStack> ))} </HStack> ) : displayedItems.length === 0 ? ( <EmptyState.Root size="md"> <EmptyState.Content> <EmptyState.Indicator palette={accentPalette}> <EmptyState.Icon viewBox="0 0 24 24" fill="none"> <path d="M3 7.5A2.5 2.5 0 0 1 5.5 5h4l2 2h7A2.5 2.5 0 0 1 21 9.5v7A2.5 2.5 0 0 1 18.5 19h-13A2.5 2.5 0 0 1 3 16.5v-9Z" stroke="currentColor" strokeWidth="1.6" strokeLinejoin="round" /> </EmptyState.Icon> </EmptyState.Indicator> <EmptyState.Title> {trimmedQuery.length > 0 ? "No matching files" : "This folder is empty"} </EmptyState.Title> <EmptyState.Description> {trimmedQuery.length > 0 ? `Nothing in ${workspaceName} matched "${searchQuery.trim()}". Try another keyword or clear your search.` : "Create a folder or add a new document to start organizing assets here."} </EmptyState.Description> <EmptyState.Actions> {trimmedQuery.length > 0 || smartFilter !== "all" ? ( <Button variant="surface" size="sm" onClick={() => { setSearchQuery(""); setSmartFilter("all"); }} > Reset view </Button> ) : ( <Button variant="solid" size="sm" palette={accentPalette} onClick={handleCreateFolder} > <PlusIcon /> New folder </Button> )} </EmptyState.Actions> </EmptyState.Content> </EmptyState.Root> ) : viewMode === "grid" ? ( <Grid gap="3" role="list" aria-label="Files grid" style={styles.gridContainer}> {displayedItems.map((item) => { const isSelected = inspectedNode?.id === item.id; const childCount = childCountByFolder.get(item.id) ?? 0; return ( <VStack key={item.id} gap="0" role="listitem" tabIndex={0} onClick={() => setSelectedId(item.id)} onDoubleClick={() => handleOpenItem(item)} onKeyDown={(e) => { if (e.key === "Enter") { handleOpenItem(item); } else if (e.key === " ") { e.preventDefault(); setSelectedId(item.id); } }} style={[ styles.gridCard, isSelected && styles.gridCardSelected, ]} > <Center style={styles.gridThumb}> {item.extension ? ( <span {...stylex.props(styles.gridThumbCornerStart)}> <Badge variant="subtle" size="xs" palette={CATEGORY_PALETTES[item.category]} > {item.extension} </Badge> </span> ) : null}
<HStack gap="0.5" style={styles.gridThumbCornerEnd}> <IconButton variant="ghost" size="xs" aria-label={item.starred ? `Unstar ${item.name}` : `Star ${item.name}`} style={[ styles.starIconBtn, item.starred && styles.starIconBtnActive, ]} onClick={(e) => { e.stopPropagation(); handleToggleStar(item); }} > <StarIcon filled={item.starred} /> </IconButton> {renderItemActionsMenu(item)} </HStack>
<Square render={<span />} style={[ styles.previewGlyphWrap, ICON_TONE_BY_CATEGORY[item.category], ]} > <NodeGlyph category={item.category} size={26} /> </Square> </Center>
<VStack gap="1.5" style={styles.gridBody}> <Text render={<span />} size="sm" weight="medium" truncate="true" title={item.name}> {item.name} </Text> <HStack gap="2" justify="between"> <Text render={<span />} size="xs" tone="muted" tabular="true"> {item.type === "folder" ? `${childCount} ${childCount === 1 ? "item" : "items"}` : item.sizeLabel} </Text> <Avatar.Root size="2xs" variant="subtle" palette={OWNER_PALETTES[item.owner.paletteKey]} > <Avatar.Fallback>{item.owner.initials}</Avatar.Fallback> </Avatar.Root> </HStack> </VStack> </VStack> ); })} </Grid> ) : ( <div {...stylex.props(styles.tableWrap)}> <Table.Root size="sm" variant="line"> <Table.Header> <Table.Row style={styles.tableHeaderRow}> <Table.ColumnHeader style={styles.tableTh}>Name</Table.ColumnHeader> <Table.ColumnHeader style={[styles.tableTh, styles.tableThResponsive]} > Owner </Table.ColumnHeader> <Table.ColumnHeader style={[styles.tableTh, styles.tableThResponsive]} > Modified </Table.ColumnHeader> <Table.ColumnHeader style={[styles.tableTh, styles.tableThAlignEnd]} > Size </Table.ColumnHeader> <Table.ColumnHeader style={[styles.tableTh, styles.tableThAlignEnd]} aria-label="Actions" /> </Table.Row> </Table.Header> <Table.Body> {displayedItems.map((item) => { const isSelected = inspectedNode?.id === item.id; const childCount = childCountByFolder.get(item.id) ?? 0; const showLocationHint = trimmedQuery.length > 0 || smartFilter !== "all"; return ( <Table.Row key={item.id} aria-selected={isSelected} onClick={() => setSelectedId(item.id)} onDoubleClick={() => handleOpenItem(item)} style={[ styles.tableRow, isSelected && styles.tableRowSelected, ]} > <Table.Cell style={styles.tableCell}> <HStack gap="2.5"> <Square render={<span />} style={[ styles.itemIconBadge, ICON_TONE_BY_CATEGORY[item.category], ]} > <NodeGlyph category={item.category} size={15} /> </Square> <VStack gap="0"> <HStack gap="1.5"> <Text render={<span />} size="sm" weight="medium" truncate="true"> {item.name} </Text> {item.starred ? ( <span {...stylex.props(styles.starMark)} aria-label="Starred" > <StarIcon filled /> </span> ) : null} {item.tags[0] ? ( <Badge variant="subtle" size="xs"> {item.tags[0]} </Badge> ) : null} </HStack> {showLocationHint ? ( <Text render={<span />} size="xs" tone="subtle" truncate="true"> {getLocationPath(nodes, item, workspaceName)} </Text> ) : null} </VStack> </HStack> </Table.Cell>
<Table.Cell style={[ styles.tableCell, styles.tableCellResponsive, styles.tableCellMuted, ]} > <HStack render={<span />} gap="2" style={styles.ownerCell}> <Avatar.Root size="2xs" variant="subtle" palette={OWNER_PALETTES[item.owner.paletteKey]} > <Avatar.Fallback>{item.owner.initials}</Avatar.Fallback> </Avatar.Root> <span>{item.owner.name}</span> </HStack> </Table.Cell>
<Table.Cell style={[ styles.tableCell, styles.tableCellResponsive, styles.tableCellMuted, ]} > {item.modifiedAt} </Table.Cell>
<Table.Cell style={[styles.tableCell, styles.tableCellSize]}> {item.type === "folder" ? `${childCount} ${childCount === 1 ? "item" : "items"}` : item.sizeLabel} </Table.Cell>
<Table.Cell style={[styles.tableCell, styles.tableCellActions]}> {renderItemActionsMenu(item)} </Table.Cell> </Table.Row> ); })} </Table.Body> </Table.Root> </div> )} </div> </VStack> </Splitter.Panel>
{/* Right Detail Inspector */} {showInspector ? ( <> <Splitter.ResizeTrigger aria-label="Resize detail inspector" style={styles.inspectorHandle} />
<Splitter.Panel style={styles.inspectorSplitterPanel}> <VStack render={<aside />} gap="0" aria-label="Item details" style={styles.inspector}> <HStack gap="2" justify="between" style={styles.inspectorHeader}> <Text render={<h2 />} size="sm" weight="semibold"> Details </Text> <IconButton variant="ghost" size="xs" aria-label="Close inspector" onClick={() => setShowInspector(false)} > <CloseIcon size={14} /> </IconButton> </HStack>
{inspectedNode ? ( <VStack gap="4" style={styles.inspectorBody}> <VStack gap="2.5" align="center" justify="center" style={styles.previewHero}> <Square render={<span />} style={[ styles.previewGlyphWrap, ICON_TONE_BY_CATEGORY[inspectedNode.category], ]} > <NodeGlyph category={inspectedNode.category} size={28} /> </Square> <Text render={<h3 />} size="sm" weight="semibold" style={styles.breakWord}> {inspectedNode.name} </Text> <HStack gap="1.5" justify="center" wrap="wrap"> <Badge variant="subtle" size="sm" palette={CATEGORY_PALETTES[inspectedNode.category]} > {inspectedNode.extension ?? "Folder"} </Badge> <Badge variant="outline" size="sm"> {inspectedNode.kindLabel} </Badge> </HStack> <Text size="xs" tone="muted" align="center"> {inspectedNode.summary} </Text> </VStack>
<HStack gap="2"> <Button variant="surface" size="xs" style={styles.inspectorActionBtn} onClick={() => handleShare(inspectedNode)} > <ShareIcon /> Share </Button> <Button variant="surface" size="xs" style={styles.inspectorActionBtn} onClick={() => handleDownload(inspectedNode)} > <DownloadIcon /> Download </Button> <IconButton variant="ghost" size="xs" aria-label={ inspectedNode.starred ? `Remove star from ${inspectedNode.name}` : `Star ${inspectedNode.name}` } style={[ styles.starIconBtn, inspectedNode.starred && styles.starIconBtnActive, ]} onClick={() => handleToggleStar(inspectedNode)} > <StarIcon filled={inspectedNode.starred} /> </IconButton> </HStack>
<Separator decorative />
<VStack render={<section />} gap="2.5"> <Text render={<h3 />} variant="overline" tone="subtle"> Information </Text> <DataList.Root size="sm" orientation="horizontal" variant="subtle" style={styles.dataListCompact} > <DataList.Item> <DataList.ItemLabel>Size</DataList.ItemLabel> <DataList.ItemValue> <Text render={<span />} size="xs" style={styles.breakWord}> {inspectedNode.type === "folder" ? `${childCountByFolder.get(inspectedNode.id) ?? 0} items · ${inspectedNode.sizeLabel}` : inspectedNode.sizeLabel} </Text> </DataList.ItemValue> </DataList.Item> <DataList.Item> <DataList.ItemLabel>Location</DataList.ItemLabel> <DataList.ItemValue> <Text render={<span />} size="xs" style={styles.breakWord}> {getLocationPath(nodes, inspectedNode, workspaceName)} </Text> </DataList.ItemValue> </DataList.Item> <DataList.Item> <DataList.ItemLabel>Modified</DataList.ItemLabel> <DataList.ItemValue> <Text render={<span />} size="xs" style={styles.breakWord}> {inspectedNode.modifiedAt} </Text> </DataList.ItemValue> </DataList.Item> <DataList.Item> <DataList.ItemLabel>Created</DataList.ItemLabel> <DataList.ItemValue> <Text render={<span />} size="xs" style={styles.breakWord}> {inspectedNode.createdAt} </Text> </DataList.ItemValue> </DataList.Item> <DataList.Item> <DataList.ItemLabel>Access</DataList.ItemLabel> <DataList.ItemValue> <Text render={<span />} size="xs" style={styles.breakWord}> {inspectedNode.access} </Text> </DataList.ItemValue> </DataList.Item> </DataList.Root> </VStack>
<Separator decorative />
<VStack render={<section />} gap="2.5"> <Text render={<h3 />} variant="overline" tone="subtle"> Tags </Text> <HStack gap="1.5" wrap="wrap"> {inspectedNode.tags.map((tag) => ( <Badge key={tag} variant="subtle" size="sm"> {tag} </Badge> ))} <Button variant="ghost" size="xs" onClick={() => handleAddTag(inspectedNode)} > + Add tag </Button> </HStack> </VStack>
<Separator decorative />
<VStack render={<section />} gap="2.5"> <Text render={<h3 />} variant="overline" tone="subtle"> Collaborators </Text> <VStack gap="2"> {inspectedNode.collaborators.map((person, index) => ( <HStack key={person.name} gap="2" justify="between"> <HStack gap="2"> <Avatar.Root size="xs" variant="subtle" palette={OWNER_PALETTES[person.paletteKey]} > <Avatar.Fallback>{person.initials}</Avatar.Fallback> </Avatar.Root> <VStack gap="0"> <Text size="xs" weight="medium"> {person.name} </Text> <Text size="xs" tone="subtle"> {person.role} </Text> </VStack> </HStack> <Badge variant="outline" size="xs"> {index === 0 ? "Owner" : "Editor"} </Badge> </HStack> ))} </VStack> </VStack>
<VStack render={<section />} gap="2.5"> <Text render={<h3 />} variant="overline" tone="subtle"> Latest activity </Text> <Text variant="mono" size="xs" tone="muted" style={styles.versionCard}> {inspectedNode.versionNote} </Text> </VStack> </VStack> ) : ( <EmptyState.Root size="sm"> <EmptyState.Content> <EmptyState.Title>No selection</EmptyState.Title> <EmptyState.Description> Select a file or folder to inspect its metadata and permissions. </EmptyState.Description> </EmptyState.Content> </EmptyState.Root> )} </VStack> </Splitter.Panel> </> ) : null} </Splitter.Root> </HStack>
<Toaster toaster={queue} /> </VStack> );}
Inspired by the File Explorer template from Astryx (MIT License · Copyright (c) 2026 Meta Platforms, Inc.).