~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

The iOS app has a settings screen

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:ios/settings

What changes

A Settings screen, behind a gear on your own profile. It replaces the profile's … menu, and opens from the Profile tab and from the avatar on Home. It has Appearance, Notifications and Blocked accounts, then links out to feedback, help, the terms, the privacy policy and the guidelines, then your account with Sign out and Delete your knotless data, then Clear cache with its size and the app's version. A row that stays in the app has a chevron, and one that leaves it has the external link mark.

Appearance is Automatic, Light or Dark, kept on this phone.

Notifications has the reasons the pages' settings have, and Only accounts I follow, read and written with getPreferences and putPreferences. They are the account's, so the inbox, the pages, the command line and pushes all follow them. A row above them says whether iOS allows this phone to show them, and opens iOS's own switch.

Signing out from a screen of the account's now empties the stacks of Home, Inbox and Profile, which would otherwise leave Settings open with no one signed in. It asks first, as it is now a single tap on a row.

Why

The app had nowhere to choose what it notifies you of, or how it looks, and account actions were tucked in a menu. The layout follows GitHub's app, keeping only what knotless can actually do: no app icons, languages, Copilot, or code options.

Toggles are sent one write at a time until the server has what's shown, as each write says the whole of them and a late one must not undo a newer one. A failed write puts the toggles back and says so.

How it was checked

just ios-look settings notification-settings, light and dark, and taps through the gear, the picker, the sign-out dialog and signing out, which ends on the sign-in form. With no forced scheme, Dark changed the app live and held across a relaunch, and Automatic went back to the system.

ios/check-models.sh now holds putPreferences to its lexicon and reads the notifications out from among other kinds of preference. look.mjs holds the made-up getPreferences answer to its lexicon too.

Shortcomings

Nothing here has run against the live server or on a device: the look tool's writes do nothing. From the code, putPreferences takes the app's cookie, as it sends no Origin, and the push round reads through the same choices. Toggling one on TestFlight is the check left to do.

ios/ isn't built by CI. Clear cache's size is what URLCache reports, which can lag. The app's Appearance doesn't read the account's theme from the pages. Choosing Dark from Automatic can leave you on the picker rather than going back: seen once in the simulator, and it does no harm.

Review

A quick look at the pictures. The saving loop in NotificationChoicesForm.save is the one part with any logic.

🤖 Generated with Claude Code

settings-light.png

settings-dark.png

notifications-dark.png

Approved

This adds a Settings screen behind a gear on your own profile. It has an appearance picker, notification toggles read and written with getPreferences and putPreferences, and the account actions. Sign-out now asks first and empties the Home, Inbox and Profile stacks. I read every changed file and found nothing that must change.

  • Save loop: NotificationChoicesForm.save is sound. Writes go one at a time. The loop repeats until kept matches what is shown. A failure puts choices back to kept, which re-fires onChange and does nothing because the two are equal.
  • Decoding: Preferences skips preference kinds it doesn't know, and ModelCheck covers that.
  • Home avatar: I found no change to the Home avatar in the diff. I think the gear shows there because ProfileScreen adds it whenever actor is your own handle or DID, but I didn't read the Home code to confirm.
  • Not exercised: Nothing ran against the live server, as the body says. The check left to do is toggling a notification on TestFlight.
Merged as a9a927d