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

Feed ranking ignores archived repositories when it works out what the viewer cares about #3485

Merged opened this

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

Merged

Feed ranking now ignores archived repositories when it works out what the viewer cares about. Waking a repository brings it back with no other step.

shipped production is serving it deploy 119f4d2

opened this

Feed ranking now ignores archived repositories when it works out what the viewer cares about. Waking a repository brings it back with no other step.

The type check did not run: bun x tsc --noEmit failed in this sandbox with "unable to write files to tempdir". I ran the new test and the feed tests (feed, feed-choose, home-feed) instead, and they pass.

What changed

  • src/feed/affinity.ts: affinityFor reads the viewer's repositories with withoutArchived: true. An archived repository's owner or "works on" seed, its crew and its shipped decisions no longer raise a post's rank.
  • src/feed/items.ts is untouched.
  • test/feed-affinity-archived.test.ts archives one of two repositories and checks its score drops to 0 while the other's stays positive. It then wakes the repository and checks the score returns.
  • The same test checks the archived repository's page (/alice/old) still answers 200. I confirmed the test fails with the affinity.ts change reverted.

What I left out

  • The viewer's past interactions and pins on an archived repository still count toward its score, because the issue named only the repositories read.

To try it: bun test test/feed-affinity-archived.test.ts

🤖 Generated with Claude Code

Closes #3478

commented

Feed ranking now ignores archived repositories when it works out what the viewer cares about. Waking a repository brings it back with no other step.

The type check did not run: bun x tsc --noEmit failed in this sandbox with "unable to write files to tempdir". I ran the new test and the feed tests (feed, feed-choose, home-feed) instead, and they pass.

What changed

  • src/feed/affinity.ts: affinityFor reads the viewer's repositories with withoutArchived: true. An archived repository's owner or "works on" seed, its crew and its shipped decisions no longer raise a post's rank.
  • src/feed/items.ts is untouched.
  • test/feed-affinity-archived.test.ts archives one of two repositories and checks its score drops to 0 while the other's stays positive. It then wakes the repository and checks the score returns.
  • The same test checks the archived repository's page (/alice/old) still answers 200. I confirmed the test fails with the affinity.ts change reverted.

What I left out

  • The viewer's past interactions and pins on an archived repository still count toward its score, because the issue named only the repositories read.

To try it: bun test test/feed-affinity-archived.test.ts

🤖 Generated with Claude Code

Approved

The change is one option on the existing read, withoutArchived: true, which listReposWritableTo already supports. It also reaches the crew seed and the shipped-decisions list, since both are built from mine. The test covers archive, then wake, and checks the other repository is unaffected. I could not reach the preview from my sandbox (outbound to the host was denied), so this review is from the source and tests alone. There is no UI surface here, so I found no accessibility, phone or no-JS concern, and no new input, write or dependency.

Two things I would do next:

  1. Decide deliberately what pins, past interactions and your own merged/opened acts on an archived repository should do. They still raise its score, so the test's title and header comment ("drops a repository from the score") overclaim. They only hold because the fixture has no pins or acts. Either skip archived repository ids in those three sources too, or add a test that pins the current behaviour and say so in the comment.
  2. Rename the test to say it covers only the repositories read (owner/works-on, crew, shipped decisions).
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs