Skip to content

Suggest who to follow in the Log, as the web does on smaller screens - #74

Draft
Taldres wants to merge 2 commits into
NativePHP:mainfrom
Taldres:feat/who-to-follow
Draft

Taldres wants to merge 2 commits into
NativePHP:mainfrom
Taldres:feat/who-to-follow

Conversation

@Taldres

@Taldres Taldres commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Closes #72, the roadmap's "Who to follow". The Log gets the web's who to follow, as the web shows it in the log on smaller screens.

It needs the API PR dev-null-sh/dev-null.sh#990, which isn't merged yet: GET /api/v1/me/suggested-users and POST /api/v1/users/{username}/dismiss. Against production as it is, the suggestions answer 404 and the block simply doesn't show.

What changed

  • Who to follow sits under the fifth commit of the log you're on, or under the last of a shorter one: $ who --should-i-follow with three people. Each has their avatar, name, handle after a dot in their lane, the first line of their bio as a # comment, and why they're suggested in the web's words ("Followed by 2 you follow", "1.2k followers"). The rail stops above it, so the commit below starts a run of its own, as under a day marker.
  • Follow is an icon, as on the web: it follows straight away and goes back if devnull says no. For someone who follows you it says Follow back.
  • Not interested (the X) marks them for good, as the web does. devnull sends three spares with the three to show, so the first spare takes the slot at once, and the round is asked again to top the spares up. Who's showing stays where they are, followed or not, as the web merges its top-up by id. "fatal: no one left to suggest" only shows when devnull has nobody left.
  • Refresh moves to the next page of the day's picks, as the web's button does with its who_to_follow_round cookie. The round is kept per user and day, and only moves on once the next people land.
  • Don't show again (the eye) leaves > /dev/null with an Undo, and the block is gone from then on. A Who to follow switch in settings, next to Pastéis mode and Remotes, brings it back.
  • Tapping someone opens their profile.

Worth checking

  • Suggestions are only kept while the Log is open, as the web keeps them for the visit (Inertia::defer(...)->once()), and coming back to the Log asks again. They aren't in the response cache: devnull picks afresh each day and the screen asks again anyway, so a kept page saved no request and could show yesterday's picks first. The first commit cached them; the second takes that out again, so ResponseCache is untouched.
  • Answers can cross: one for a round you've moved on from is left alone, and one sent before a follow or dismissal here is asked again rather than taken, so it can't bring someone back.
  • The row is a new TimelineRow kind, so RowWindow places and keys it like the markers. Only the log you're on gets it.
  • LogCacheTest now expects three background refreshes on open instead of two: the log, you, and who to follow.
  • The eye-off icon is Lucide's, added next to the others.

CI

Rebased onto main, which no longer pins nativephp/mobile-camera to the deleted fix/present-over-sheets branch, so the install goes through again and the tests job passes.

Testing

All 1220 tests pass and Pint is clean. New tests cover where the row goes and how it breaks the rail, the reasons, follow and unfollow and putting them back, dismissing with spares and top-ups, the emptied state, rounds, answers that cross, hiding with Undo, the settings switch, and asking again when you come back to the Log.

I also ran it on an iOS simulator against a local devnull on the #990 branch: signing in, following and unfollowing, dismissing with the spares moving up, refresh, opening a profile, hiding, and bringing it back from settings, in Following and Latest.

Three people you might want to follow sit under the fifth commit, each
with why they're suggested, Follow and Not interested. Devnull sends
three spares, so one dismissed gives their place to the next, and the
round is asked again to top the spares up. The refresh moves to the next
page of the day's picks. Don't show again hides it with an Undo, and a
switch in settings brings it back.

Needs GET /api/v1/me/suggested-users and POST /api/v1/users/{username}/dismiss
from dev-null-sh/dev-null.sh#990.
…r the visit

devnull picks afresh each day and the screen asks again anyway, so a kept
page saved no request and could show yesterday's picks, or an answer that
crossed a follow or a dismissal, on the next visit. Coming back to the Log
asks again instead, and the response cache is as it was.
@Taldres
Taldres force-pushed the feat/who-to-follow branch from b649515 to 8cdd041 Compare October 24, 2026 05:24
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.

Who to follow

1 participant