OpenProgram Docs

File tree and file management

The sidebar and the central Files page share one tree on @pierre/trees 1.0.0-beta.6. Pierre owns rows, hierarchy, selection, focus, virtual scrolling, sticky ancestors and keyboard navigation; OpenProgram owns filesystem state. Row height 30 pixels, density 1.

Path OpenProgram › … › scripts › install.sh Copy Tools Search · New file · New folder · Refresh · Sort · Info Search Input, opened on demand Header Name Size Date Modified Kind Rows Remaining width Middle truncation 100 px 200 px 140 px Below 720 px Name Size
  1. PathBreadcrumb; copy button at the right end
  2. ToolsSearch, new file, new folder, refresh, sort, info
  3. SearchInput, opened on demand
  4. HeaderName, Size, Date Modified, Kind
  5. RowsName: remaining width, middle truncationSize 100 px, Date Modified 200 px, Kind 140 pxBelow 720 px: Name and Size only

Columns

AspectBehaviour
WidthA ResizeObserver measures the viewport and sets the Name width and visible columns; it disconnects on unmount. Rows never outgrow the panel and nothing scrolls sideways, as in Codex's tree, so Pierre's selection, focus ring and name editor draw whole without overrides.
HeaderStays visible during vertical scrolling and shares its column boundaries with the rows.
CellsPierre has no sortable columns. Three text parts through renderRowDecoration, styled with unsafeCSS; parts that do not fit are clipped. No table framework, no per-file metadata request.
Date Modifiedmtime in epoch seconds from the directory and search responses, shown in the current language and local timezone. Blank for missing timestamps and synthetic search ancestors.
KindFolder; uppercase extension plus file; File when there is no extension.
SortingDirectory headers toggle the per-project server sort preference, keeping folders-first and the hidden and ignored filters. Search keeps relevance order and its headers do nothing.
Deep foldersIndentation is capped inside Name, leaving room for the icon and filename and keeping columns aligned.
RenameInline rename keeps Pierre's decoration suppression.
Out of scopeColumn reordering, manual resizing, extra metadata fields, filesystem watchers.

Appearance

ElementRule
FoldersThe arrow is remapped through icons.remap to a sprite with the sidebar's Solar folder; expanded state picks closed or open. Folders never rotate.
Rows6 pixels in from both panel edges, 6 pixels of padding inside. No extra vertical padding. Pierre's indent guides are always shown; no fixed indentation or custom connectors.
ScrollbarThe app's overlay thumb takes no width, so rows reach the panel's right edge.
SelectionSelected rows have no border. Keyboard focus stays visible on unselected rows.
Toolbar8-pixel side margins, shared with the path row. No divider between toolbar and list. Existing buttons and rounded menus.

Path row

AspectBehaviour
Componentshadcn Breadcrumb, radix-nova style, the panel's 14-pixel text, one line. Nova's chevrons sit in the list's 6-pixel gap.
ColourAncestors muted, foreground on hover; current item foreground.
OverflowAncestors that do not fit fold into Nova's ellipsis, which opens a menu of them. Spare room shows part of one more ancestor. No tooltips repeating the name.
ClickLocates the path among loaded entries and expands its ancestors, with no re-listing or size recount. Queries only if the target is missing.
Copy buttonCopies the absolute path; a checkmark shows for 1.5 seconds on success.
Context menuRelative path, absolute path or name of the clicked location.

Listing and search

AspectBehaviour
Listingproject_file_tree: lazy per directory, paginated, sorted on the server. Sort by name, type, modification time or size, with folders-first. Framework comparators keep backend order and never revert to alphabetical.
PaginationThe next page loads near the end of a directory's loaded entries, with no pagination button.
SearchBackend permission scope and pagination. Results use Pierre's hierarchy; highlight mode keeps directories.
MatchesThe backend decides fuzzy matches, shown by match markers and the native current-item selection. Literal queries use framework text highlighting.
RevealControllers expand and scroll; nothing depends on handwritten row DOM.

File and folder sizes

CaseShown
FileByte count.
Visible folderOne project_folder_size request per folder (measure): the saved sample, or else one walk of at most a second that the server saves, finished or not. Asked again only after Refresh or a Files change, never chunk by chunk. A shared queue runs two at once. States: cached, scanning, complete, partial, canceled, error. Search-excluded folders such as .cache and node_modules still have metadata and sizes.
In the listThe number alone, without ≈ or ≥.
Still countingThe existing number keeps updating and slowly varies in grey brightness; normal again when counting stops. No added text or icons.
No value yetBlank, no dash.
DetailsEstimates, lower bounds, timestamp and completeness. Recalculate and Continue are the only chunked counts.

Saved samples

AspectBehaviour
ReuseFinished samples survive view remounts and worker restarts and display without recursive I/O. At most 256, in the default profile state. Size sorting keeps the recent-complete-sample rule.
New scanOnly the first view of a folder without a sample, Refresh, a Files change and Recalculate.
InvalidationA successful Files change removes affected ancestor and subtree samples from memory and disk and cancels affected active scans, including overlapping project roots.
KeyValidated absolute path. Device and inode must also match, so a rebound project or replaced directory cannot reuse another directory's bytes.
Incomplete scansStay incomplete and keep their skipped-entry record. A walk cut off by the time limit is saved as a lower bound, so the next view shows it without walking. Active scan tokens are never saved.
Stale samplesNested edits can outdate a sample; Details shows its time and completeness. No watcher, recursive freshness check, content read or new profile.
StorageThe existing atomic JSON writer: private temporary file, atomic replace. A corrupt or unavailable cache falls back to scanning.
Why not another store
OptionResult
Python sqlite3Durable transactions and concurrent connections, not needed for a bounded cache owned by one worker. No schema or dependency added.
Pierre tree, React queueKept for virtualization and the two visible-folder jobs. Neither supplies durable server-side samples.

Creating, renaming and menus

ActionBehaviour
New entryNamed in the tree: its folder gains a placeholder row with an empty name editor and the default name as a dim hint.
CommitEnter or leaving the editor creates it under the typed name. Escape, or leaving with nothing typed, drops the row. Existing forms validate before submitting.
Context menuDetails, reveal in system, new file, new folder, copy path, cut, copy, paste, Move to, rename, delete with confirmation.
Several rowsCut, copy, move and delete act on all of them and the menu names the count; rename needs one row.
SelectionCmd/Ctrl-click toggles a row, Shift-click selects a range. Opening a tab or revealing a file elsewhere replaces the selection with that row.
KeyAction
Cmd/Ctrl+C, Cmd/Ctrl+XCopy, cut
Cmd/Ctrl+VPaste into the selected folder, or the selected file's folder
Cmd+Backspace, DeleteDelete, after confirmation
F2Rename
Cmd/Ctrl+Shift+MMove to

Moving

AspectBehaviour
DragPierre's drag and drop onto a folder or the root; a hovered folder opens after 600 ms.
Carried out byThe tree shows the move at once; the same server rename as Cut and Paste does it, with draft protection and open-tab retargeting. A refused move re-lists the tree.
UndoEvery move shows a toast with Undo, which moves the entries back.
SkippedA move onto the same parent or into the moved folder itself.

Move to

A shadcn Command dialog that reads its input as a path. Goes through the same server rename and Undo toast; the chosen folder opens in the tree.

InputListed
NothingProject root, the five folders moved to most recently in this project, top-level folders.
folder/nameSubfolders of the part before the last slash, from project_file_tree, filtered by the rest, names starting with it first. Folders list first, so reading stops at the first file. One listing per level, so any project size works. Tab steps into the highlighted folder.
nameAlso project_file_search with type: "dir" for hits elsewhere; none past the search's snapshot limit.
A path naming no folderOffers to create it, missing parents included, and move into it.

The current folder and the moved folders are disabled.

Files from the desktop

AspectBehaviour
DestinationThe folder under the pointer, the folder of the file under it, or the project root. The tree outlines itself and a chip names the destination.
TransferThe browser reads the dropped files and streams each to POST /api/files/upload with a project-relative path. No local path is sent; nothing outside the project is opened.
FoldersArrive as their files, with missing parents created.
Existing nameNever replaced: the upload refuses it and a toast counts what was left unchanged.
Limit1 GiB per file.
ComposerThe drop stays in the tree and does not reach the attachment drop.

Refresh and errors

SituationBehaviour
Window regains focusRe-lists open folders, at most every three seconds, without recounting sizes.
Any refreshKeeps the selected path, expanded directories and loaded pages; old rows stay while it is pending.
Collapsed parentStays closed even if descendants were expanded; reopening restores them.
Directory or page failsAutomatic retries stop. The path and an explicit Retry show, never fictitious entries.
Project folder unavailableThe reason and the repair replace the listing: confirm the folder at the recorded place, or Locate. See project location.
Contracts keptWorkspace scope, cancellation, stale-response isolation, draft protection, server-side idempotent changes, metadata and size-cache permissions. The framework never touches file contents or decides permissions.
Implementation status
AreaChecked
ColumnsReal FileTree and PierreFileTree in Chromium: default Name and Size, four-column alignment, wide view, sticky ancestors, ten-level indentation at narrow widths, date and kind values, sort requests, preference preservation, search relevance, vertical viewport restoration.
Saved sizesThrough project_folder_size: a finished sample survives a fresh load with no recursive walk; corrupt storage leaves metadata queries usable; incomplete samples stay incomplete; replaced directories do not reuse samples. Through Files: reopening both views and Details starts no scan for a cached sample; Refresh and Recalculate still update bytes through the shared queue; changes invalidate saved ancestors and root scans.
App, dark themeExpand and collapse, virtual scrolling, sizes, file tabs, native context menus, sort menus, path preservation after refresh, nested-parent collapse, automatic pagination. Component regression tests cover refresh after a parent collapse.
Not checkedSeparate manual pass in light mode.

File-type icons: icon design. File contents, drafts and recovery: file operations. Pierre's Apache 2.0 and icon MIT licenses ship with the product.

Last updated · 2026-11-25