Repository navigation
feat: a private stars tab on your own profile - #389
AmanuelLegese wants to merge 2 commits into
Conversation
Your own profile gets a Stars tab next to Commits and Replies, listing the commits and replies you starred that you can still see, newest star first. It is private like Saved: on anyone else's profile, or as a guest, ?tab=stars is a 404. Refs dev-null-sh#388
|
Just curious, why should it be private? 🤨 |
|
Could you provide some screenshots or a video? I'm just trying to figure out how similar this is to this: #278 🖖🏽 |
|
Good question! Mainly so it doesn't change what's already visible: everyone's existing stars were given without the expectation that others could browse them, and today the only people who see who starred a commit are its author (via notifications, and #365 keeps that author-only too). Making the list public would quietly publish all of that. Private is also the smaller step: it's easy to open it up later if the maintainers want public stars (that's really the question in #249), but hard to take back once it's public. Happy to switch it to public if that's the preferred direction. |
|
@silviooosilva #278 shows how many stars someone received (a public count in the stats row); this one lists the commits you starred (private, only on your own profile), so they don't overlap. |
|
@AmanuelLegese Thanks for your explanation. Nice feature btw. 🚀 |
|
@nunomaduro This PR touches authentication / permissions. Could you take a look? |
Hovering the profile's activity graph highlights feed commits from that period, which only makes sense for the user's own commits and replies. The Stars tab lists other people's commits, so it no longer highlights.
|
#811 added a private Starred page, so this looks obsolete. |
|
Closing this as already implemented. |

Closes #388
What
Your own profile gets a Stars tab next to Commits and Replies: the commits and replies you starred, newest star first. Today there's no way to find a commit you starred again unless you also saved it.
It's private, like Saved:
?tab=starson anyone else's profile, or as a guest, is a 404 (Response::denyAsNotFound()), so it looks like it doesn't exist.This keeps stars as private as they are today (and as #365 keeps the "Starred by" list), so it doesn't depend on #249.
How
ShowUserRequestacceptsstarsas a tab and authorizes it for the profile owner only.StarredCommitsQuery, modelled onSavedCommitsQuery: joinsstars, filtered withvisibleTo, with the same card data and parent context. Stars have no id, so it orders bystars.created_atwith the commit id as the tie-breaker, which keeps cursor pagination stable for stars given in the same second.UserController@showuses it for the Stars tab, with no pinned commit.user/show.tsxadds the tab for the owner, with its own empty state and end-of-feed message.PRODUCT.mddescribes the tab and that the list of what you starred is private.Starred commits you can no longer see drop out of the tab: pending, rejected, deleted, and commits from people who blocked you or whom you blocked.
Tests
UserStarsTest: order and cursor pagination across pages (including the tie-breaker), parent context on starred replies, hidden commits left out, the full page render, and a 404 for other users and guests. Each test fails if its part of the code is removed.UserControllerTest,UserRepliesTest,PinnedProfileCommitTest,BookmarkControllerTestandArchTestpass.bun run test:lint,bun run test:types,bun run test:unitandbun run buildpass.