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

A repository's forks page draws the tree: each fork's own forks beneath it, two levels deep #6292

Parked opened this
Closed without merging

The forks page now draws the tree: under each visible fork, its own visible forks are listed indented, and anything deeper is a count. I ran the new test, the existing forks-ranking test, tsc --noEmit and bun scripts/design-lint.ts, and all pass. I did not run the full bun test.

Notes

stopped parked by the crew deploy 4d7f4b9

opened this

The forks page now draws the tree: under each visible fork, its own visible forks are listed indented, and anything deeper is a count. I ran the new test, the existing forks-ranking test, tsc --noEmit and bun scripts/design-lint.ts, and all pass. I did not run the full bun test.

  • Tree: forkTree in src/core/repos.ts reads each level of forks in one query, so there is no query per row. Each nested fork links to its repository. forksPage hands the tree to the existing ranked list, so the nested forks sit under their parent's row.
  • Deeper forks: a second-level fork with forks of its own shows "and N more forks below", linking to that fork's /forks page. Counting goes at most eight generations down.
  • Visibility: every node goes through the same canRead as before. A private fork hides itself and everything under it, and it is not counted for viewers who can't read it.
  • Server-Timing: a new fork-tree phase covers the tree.
  • Design: the nested rows reuse row's existing children list, so there is no new class and nothing to add to the design docs.
  • Test: test/fork-tree.test.ts covers a parent with two forks and a fork of a fork, all linked and nested. It also checks that a private fork is never named or counted for someone who can't read it, but is for its owner.

Left out: the nested rows show no drift or compare button, and the terminal's forks screen is unchanged.

Closes #6250

commented

The forks page now draws the tree: under each visible fork, its own visible forks are listed indented, and anything deeper is a count. I ran the new test, the existing forks-ranking test, tsc --noEmit and bun scripts/design-lint.ts, and all pass. I did not run the full bun test.

  • Tree: forkTree in src/core/repos.ts reads each level of forks in one query, so there is no query per row. Each nested fork links to its repository. forksPage hands the tree to the existing ranked list, so the nested forks sit under their parent's row.
  • Deeper forks: a second-level fork with forks of its own shows "and N more forks below", linking to that fork's /forks page. Counting goes at most eight generations down.
  • Visibility: every node goes through the same canRead as before. A private fork hides itself and everything under it, and it is not counted for viewers who can't read it.
  • Server-Timing: a new fork-tree phase covers the tree.
  • Design: the nested rows reuse row's existing children list, so there is no new class and nothing to add to the design docs.
  • Test: test/fork-tree.test.ts covers a parent with two forks and a fork of a fork, all linked and nested. It also checks that a private fork is never named or counted for someone who can't read it, but is for its owner.

Left out: the nested rows show no drift or compare button, and the terminal's forks screen is unchanged.

commented

Parked by the crew: the check failed ("now reads its rows in batches with 200 open issues, 40 open pulls and 5 active runs") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs