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

A directory's `?all=1` lists at most 5,000 entries and says how many it left out (from branch scout/6196-…) #16737

Merged opened this

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

Merged

A directory's ?all=1 page now lists at most 5,000 entries, directories first, and says how many it left out. This is #6211's work (the #6196 branch) rebased onto current main. bun x tsc --noEmit and test/tree-window.test.ts (8 tests) pass.

Notes

opened this

A directory's ?all=1 page now lists at most 5,000 entries, directories first, and says how many it left out. This is #6211's work (the #6196 branch) rebased onto current main. bun x tsc --noEmit and test/tree-window.test.ts (8 tests) pass. I did not run the rest of the suite. scripts/fast.ts named 3,602 test files for this change, so the forge's check will run the full suite on this push.

What changed

  • TREE_ALL_WINDOW = 5000 in src/web/pages/explorer.ts. treeListing in src/web/pages/repo.ts uses it when all is set.
  • The default 300-entry window is unchanged.
  • On ?all=1:
    • Rows drop the icon and the token estimate, and a directory name gets a trailing /. Their indentation is stripped from the HTML too. That keeps 5,000 rows under 2 MB.
    • If entries remain, the last row reads "N more not listed". It links to the JSON contents API and tells the reader to git clone for every file.
    • The footer reads "Showing 5,000 of N entries".
  • docs/TOUR.md's "Big directories" section names the ceiling. The README had been split into docs since #6196, so the ceiling went there rather than in README.md.
  • test/tree-window.test.ts:
    • 12,000 entries list 5,000, directories first, with "7,000 more not listed".
    • The default window is unchanged.
    • A request-level ?all=1 check.

Left out

  • The row() speed rewrite from #6196. row() has changed a lot since, and its conflict resolution would have undone main's tree, facts and fold support. The page stays under the 2 MB size bound without it. The 50 ms wall-clock assertion is also gone, because test/helpers/budget.ts no longer exists after #7852. I did not measure the 5,000-row render time.
  • The old README text, the shelf-speed.html fixture and the web-browse test tweak from that branch, which main's changes had made unnecessary.
  • The terminal explorer is unchanged, since it already lists every entry. The commit message carries a "No door" line saying so.
  • I did not check whether #6145 is still open.

To try it Open any directory with more than 5,000 entries at /<owner>/<repo>/tree/<ref>/<dir>?all=1 and read the last row and the footer. Run bun test test/tree-window.test.ts.

[{"go":"/trevato/forge/tree/main/test?all=1","look":"the listing and its footer","expect":"every entry listed with no icons, directories first; if the directory has over 5,000 entries, a last row says how many are not listed and links to the JSON"}]

🤖 Generated with Claude Code

Closes #6439

commented

A directory's ?all=1 page now lists at most 5,000 entries, directories first, and says how many it left out. This is #6211's work (the #6196 branch) rebased onto current main. bun x tsc --noEmit and test/tree-window.test.ts (8 tests) pass. I did not run the rest of the suite. scripts/fast.ts named 3,602 test files for this change, so the forge's check will run the full suite on this push.

What changed

  • TREE_ALL_WINDOW = 5000 in src/web/pages/explorer.ts. treeListing in src/web/pages/repo.ts uses it when all is set.
  • The default 300-entry window is unchanged.
  • On ?all=1:
    • Rows drop the icon and the token estimate, and a directory name gets a trailing /. Their indentation is stripped from the HTML too. That keeps 5,000 rows under 2 MB.
    • If entries remain, the last row reads "N more not listed". It links to the JSON contents API and tells the reader to git clone for every file.
    • The footer reads "Showing 5,000 of N entries".
  • docs/TOUR.md's "Big directories" section names the ceiling. The README had been split into docs since #6196, so the ceiling went there rather than in README.md.
  • test/tree-window.test.ts:
    • 12,000 entries list 5,000, directories first, with "7,000 more not listed".
    • The default window is unchanged.
    • A request-level ?all=1 check.

Left out

  • The row() speed rewrite from #6196. row() has changed a lot since, and its conflict resolution would have undone main's tree, facts and fold support. The page stays under the 2 MB size bound without it. The 50 ms wall-clock assertion is also gone, because test/helpers/budget.ts no longer exists after #7852. I did not measure the 5,000-row render time.
  • The old README text, the shelf-speed.html fixture and the web-browse test tweak from that branch, which main's changes had made unnecessary.
  • The terminal explorer is unchanged, since it already lists every entry. The commit message carries a "No door" line saying so.
  • I did not check whether #6145 is still open.

To try it Open any directory with more than 5,000 entries at /<owner>/<repo>/tree/<ref>/<dir>?all=1 and read the last row and the footer. Run bun test test/tree-window.test.ts.

[{"go":"/trevato/forge/tree/main/test?all=1","look":"the listing and its footer","expect":"every entry listed with no icons, directories first; if the directory has over 5,000 entries, a last row says how many are not listed and links to the JSON"}]

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs