Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust the decay formula #7535

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Adjust the decay formula #7535

merged 1 commit into from
Jan 22, 2025

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Jan 22, 2025

This hasn't landed into an @atproto/api release yet but it's a one-liner so I figure we can @ts-ignore and fix later. The actual backend change is already deployed.

This tweaks the ranking formula for Hotness so that replies liked by the thread author (OP) decay a bit slower. In practice, this means that they'll stay closer to the top (but fresh comments will still get their fair chance).

I've considered solutions like bumping the like count by a fixed number, but this doesn't work well for threads of different size. Slowing down the decay exponent ensures that fresh posts still get good visibility, the effect compounds over time, it works for any like counts, and that the boost stays meaningful but not overwhelming.

I also considered strictly prioritizing them above other posts but this disadvantages recent posts too much, leaving no space for them above the fold. Part of the motivation of having hotness was to avoid this.

Overall, the motivation is to give the OP a modicum of curatorial power over the sorting order of the replies below while doing our best to avoid overcorrection due to courtesy likes, missed fresh replies, and inertia.

Test Plan

Jay's post with swords makes for a good example.

In this visualization, red are posts liked by Jay.

Before:

before1.mov

After:

after1.mov

As you can see, recent stuff still squeezes in between them, but OP likes hover higher and are more clumped.

@arcalinea arcalinea temporarily deployed to bump-op-like - social-app PR #7535 January 22, 2025 00:13 — with Render Destroyed
Copy link

Old size New size Diff
6.96 MB 6.96 MB 127 B (0.00%)

@@ -53,8 +53,9 @@ export type ThreadPost = {
uri: string
post: AppBskyFeedDefs.PostView
record: AppBskyFeedPost.Record
parent?: ThreadNode
Copy link
Collaborator Author

@gaearon gaearon Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we shouldn't use ?: unless there's a good reason for missing key. sometimes missing keys make object shape unstable which makes it harder for JS engines to optimize code

@gaearon gaearon merged commit 1403570 into main Jan 22, 2025
7 checks passed
@gaearon gaearon deleted the bump-op-like branch January 22, 2025 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants