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
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/6192-the-terminal-explorer-lists-every-entry → main 1 commit fork
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 | ||
| 932 | 932 | terminal with `R` in the repository's workspace, which cycles me → decider → |
| 933 | 933 | decider_tell. |
| 934 | 934 | |
| 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 | ||
| 935 | 945 | ## On your machine |
| 936 | 946 | |
| 937 | 947 | 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( | ||
| 581 | 581 | |
| 582 | 582 | // ---- reads ---- |
| 583 | 583 | |
| 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. | |
| 584 | 586 | const listDir = async (path: string): Promise<Node[]> => { |
| 585 | 587 | const result = await src.tree(ref, path); |
| 586 | 588 | if (!result.ok) { |
new above
offline