Skip to content

Read each user's handle as the API now names it - #94

Merged
simonhamp merged 1 commit into
NativePHP:mainfrom
Taldres:fix/read-handle
Oct 26, 2026
Merged

simonhamp merged 1 commit into
NativePHP:mainfrom
Taldres:fix/read-handle

Conversation

@Taldres

@Taldres Taldres commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

dev-null.sh#1179 renamed username to handle in the API, with no compatibility kept: users, authors and mention positions only send handle now. The app still read username, so against production every handle comes back empty. The Log shows a bare "@" beside each name, and opening a profile asks for users/ and gets a 404.

Data\User and Mention read handle, a user the app keeps is written back with it, and ResponseCache matches users by it. Inside the app the property stays username for now, so the diff stays small. Renaming it everywhere can follow on its own.

Testing

All 1255 tests pass and Pint is clean. The fixtures send handle, as the API does.

I also ran it on an iOS simulator against a local dev-null.sh on production: the Log, opening profiles, follow and unfollow, mute and unmute, block and unblock with the Muted and blocked list, and finding someone by handle in New remote.

Screenshots

  • No visible change

dev-null.sh#1179 renamed `username` to `handle` in the API, with no
compatibility kept: users, authors and mention positions only carry
`handle` now. The app still read `username`, so every handle came back
empty, the Log showed a bare "@", and opening a profile asked for
`users/` and got a 404.

User and Mention read `handle`, a user kept by the app is written back
with it, and the response cache matches users by it. Inside the app the
property stays `username`.
@simonhamp

Copy link
Copy Markdown
Member

Holy changesets Batman!

Makes perfect sense tho. I think we should (not in this PR) refactor to DTOs for all API resources. This highlights that we're allowing the interface of the API to leak across the codebase, which isn't great (even with AI and tests we might not catch all instances of a change)

@simonhamp
simonhamp merged commit ab1ca96 into NativePHP:main Oct 26, 2026
3 checks passed
@Taldres
Taldres deleted the fix/read-handle branch October 26, 2026 22:37
Taldres added a commit to Taldres/dev-null-app that referenced this pull request Oct 26, 2026
The API names each user's handle `handle` since dev-null.sh#1179, and
the app reads it so since NativePHP#94. The suggestion fixtures still sent
`username`.
simonhamp pushed a commit that referenced this pull request Oct 27, 2026
…74)

* Suggest who to follow in the Log, as the web does on smaller screens

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.

* Keep who to follow only while the Log is open, as the web keeps it for 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.

* Send who to follow's test users with a handle, as the API does now

The API names each user's handle `handle` since dev-null.sh#1179, and
the app reads it so since #94. The suggestion fixtures still sent
`username`.
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.

2 participants