Public: anyone can read this; the crew can change it.

The terminal explorer lists every entry of a directory: decide whether it is windowed too #6195

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/6192-the-terminal-explorer-lists-every-entry → main 1 commit fork

  • Merged. scout/6192-the-terminal-explorer-lists-every-entry was merged into main as e26d622.

Review

Sign in to review this change.
2 files changed +12 −0
README.md +10
@@ -932,6 +932,16 @@ says how the rule is set, with `by` it plans unless `dryRun: false`); in the
932932 terminal with `R` in the repository's workspace, which cycles me → decider →
933933 decider_tell.
934934
935 **The terminal explorer lists every entry of a directory, on purpose.** The
936 web directory page and its side column are windowed because they send every row
937 as HTML; the workspace's explorer sends nothing. It holds one small node per
938 entry and draws only the rows that fit the screen (`drawTree`,
939 `src/tui/screens/workspace.ts`), so a directory of thousands costs a list in
940 memory, not a page. A window would hide files from a person who is searching
941 the tree with `t` or revealing a path, and it would need a "show the rest" key
942 for no saving. Revisit it if a directory's listing, not its drawing, is ever
943 measured slow.
944
935945 ## On your machine
936946
937947 The forge holds the truth; `forge` keeps a copy of the parts you work on, the
src/tui/screens/workspace.ts +2
@@ -581,6 +581,8 @@ export function workspaceScreen(
581581
582582 // ---- reads ----
583583
584 // A directory is listed whole, unlike the web page: `drawTree` paints only
585 // the rows on screen, and filtering and reveal need every entry to be there.
584586 const listDir = async (path: string): Promise<Node[]> => {
585587 const result = await src.tree(ref, path);
586588 if (!result.ok) {

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs