Ten pastéis in your pocket
The dev-null app can now switch pastéis mode on and off and give a commit one of your ten daily pastéis. Every answer says what's left and how many the author has now.

You open a commit in the phone app and tap the little custard tart beside it. The count ticks up, the author's total rises with it, and the answer tells the app you have nine pastéis left today. No page reload, no trip back to the website.
Credit goes to simonhamp, who wired the app into the pastéis rules the website already runs. The phone signs each request with the key it keeps on the device. Flip pastéis mode on or off and the answer is your whole current profile, allowance included. Give someone else's commit a pastel and it spends one of ten a day, adds one to the commit, bumps the author's lifetime total, and returns the commit as its page shows it, plus what you have left and the next reset at midnight UTC. With all ten gone it answers 422 with the error code pasteis_exhausted, and the route keeps the web's 60-requests-a-minute cap.
One catch. Nothing keeps a per-commit record of who gave what. The code just bumps a counter. Tap the same commit ten times and it will take all ten, and there is no way to take a pastel back.
Part of a larger story
Key files · #557
- app/
Http/ CommitPastelController.phpControllers/ Api/ - app/
Http/ UserPasteisModeController.phpControllers/ Api/ - app/
Actions/ CreateCommitPastel.php - app/
Models/ User.php - routes/
api.php - app/
Http/ CurrentUserResource.phpResources/ - app/
Http/ CommitResource.phpResources/ - app/
Http/ CreateApiCommitPastelRequest.phpRequests/