Log inGet started
What it does

files

Files tab — VFS browser embedded in the System Tools panel. Single recursive folder/file tree on top, file preview below. Lazy: vfs.list runs only when a folder is first expanded; results cache on state.files.dirCache[path] and are refreshed when the visibility-gated scheduler ticks (1 s while the tab is active and the panel is visible — cost zero when hidden).

Built from the Z.fs.* composites so the same building blocks back the standalone FileManager window. Clicking "Open in standalone window" mounts the legacy FileManager at the current path for users who want a dedicated viewport.

Exports

  • M.label: string — "Files".
  • M.refresh: number — 1.0 (1 Hz).
  • M.onMount(state) — seed state.files (currentPath, expanded map, dirCache, preview slots).
  • M.refresh_data(state) — refresh hook; invalidates dirCache for the visible subtree.
  • M.build(state) -> any — build the Files widget tree.
  • M.onCallback(callbackId: string, data: any, state) -> boolean — handle tree toggle, file select, breadcrumb nav, manual refresh, copy path, open-standalone.

Types:

  • FilesState = any — shell-owned tab state; carries files = { currentPath, expanded, dirCache, selectedPath, previewText, previewNote }.

Usage

-- Registered by system_tools/init.luau:
local Files = require("@builtin::modules.engine.editor.system_tools.tabs.files")
TABS.files = Files

Notes

  • Preview is byte-limited (PREVIEW_BYTE_LIMIT = 256 * 1024) and refuses binary payloads — anything with a non-text extension or a NUL byte renders as "Binary file: <size> bytes".
  • The directory cache key is the absolute VFS path, so invalidateCache(state, "/zero/source/") drops every entry at or below /zero/source/ in O(n) over cached paths.
  • "Open in standalone window" calls into @builtin::modules.engine.ui.file_manager; the pcall lets the tab survive when that module isn't present (legacy builds without the FileManager window).

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

This asset doesn't declare a schema or structured payload.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

0items
This part has no composite children. See the Files segment for its leaf payloads.
This part has no leaf payloads.

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.