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

A test pins the terminal's file finder: every file in the revision, one read, and the query narrows it #6981

shipped production is serving it opened this has it
opened this

src/tui/screens/finder.ts (t or ctrl+p) lists every file in a revision from one RepoSource.paths(ref) read. No test opens it.

Done:

  • [ ] A new test makes a repository with nested files, opens the finder and sees them all. Typing a query narrows the list to the matches, best match first, and Enter opens the file.
  • [ ] Switching ref lists that ref's files.
  • [ ] Typing more letters does not read paths again: count the calls to paths.
  • [ ] A private repository's files are refused to a viewer who cannot read it.

Files: test/tui-finder.test.ts

If the test finds the behaviour wrong, fix the module it names in the same pull and say so. If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.

Before pushing: bun x tsc --noEmit and the new test.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs