feat(settings): add a private-account toggle with follow requests - #81
Merged
Merged
Conversation
An iOS-only user could receive follow requests (FollowRequestsView ships) but had no way to turn on the setting that produces them — `isPrivateAccount` was neither decoded nor writable from the app. - decode `isPrivateAccount` on `User`; `GET /api/user` already returns it via `userSelect` - extend `updateUserSettings` with `isPrivateAccount` (camelCase body, the key `PATCH /api/user/update` destructures) - add a Privacy section to `SettingsView`: the toggle, a footer explaining what private means, and a Follow requests link that appears only while private, so the setting and its consequence live together - failures roll the toggle back through the existing `syncFromUser` path Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017bss5MgZa7Jvj2m9zdaUd1
This was referenced Sep 15, 2026
Base automatically changed from
fix/default-publicly-visible-wire-key
to
main
September 17, 2026 03:21
Adron
added a commit
that referenced
this pull request
Sep 17, 2026
Conflict confined to project.pbxproj. Both sides were pure additions — this branch registers DMConversation.swift, APIClient+DirectMessages.swift and APIClientDMConversationsTests.swift; main brought the files from #75/#81/#82/ #83/#84 — so both sides were kept. Integrity checked after resolving: no Sources entry without a PBXBuildFile, no build file pointing at a missing fileRef, no duplicate object definitions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017bss5MgZa7Jvj2m9zdaUd1
Adron
added a commit
that referenced
this pull request
Sep 17, 2026
Conflict confined to project.pbxproj. Both sides were pure additions — this branch registers ListRowSorting.swift and ListRowSortingTests.swift, main brought the files from #75/#81/#82/#83/#84 — so both sides were kept. Integrity checked after resolving: no Sources entry without a PBXBuildFile, no build file pointing at a missing fileRef, no duplicate object definitions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017bss5MgZa7Jvj2m9zdaUd1
Adron
added a commit
that referenced
this pull request
Sep 17, 2026
Conflict confined to project.pbxproj. Both sides were pure additions — this branch registers DocumentPresence.swift, APIClient+DocumentPresence.swift, DocumentPresenceService.swift and their two test files; main brought the files from #75/#81/#82/#83/#84 — so both sides were kept. DocumentsView.swift auto-merged, since #83 (seed default templates) edits the template picker and this branch edits the document detail toolbar. Verified after merging that both survive: the subscriber-gated "Add the default templates" action and the presence chip are each still wired. Integrity checked after resolving: no Sources entry without a PBXBuildFile, no build file pointing at a missing fileRef, no duplicate object definitions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017bss5MgZa7Jvj2m9zdaUd1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #48. Adds the Private account setting to iOS. It is a real server-side gate — it drives
follow requests instead of instant follows and restricts profile/wall visibility — and iOS already
shipped
FollowRequestsView, so an iOS-only user could receive follow requests without any way toturn the producing setting on or off.
What's included
Models/User.swift: decodeisPrivateAccount: Bool?. ConfirmedGET /api/useralready returns it(
lib/auth/user-select.tsnamesisPrivateAccount), so no backend work was needed.Services/APIClient.swift:updateUserSettingstakesisPrivateAccount, sent camelCase viapatchCamel— the exact keyapp/api/user/update/route.ts:33destructures.Views/SettingsView.swift: a Privacy section with the toggle, a footer ("New followers must beapproved. Your posts stay visible only to approved followers.") and a Follow requests
NavigationLinkshown only while the account is private.syncFromUser()path, matchingpostingSection.Testing
xcodebuild … -parallel-testing-enabled NO -skip-testing:InterlinedListTests/E2EReadOnlyTests test— 1153 tests, 0 failures (+4 new).
test_updateUserSettings_sendsIsPrivateAccountKey(asserts the body key is exactlyisPrivateAccount),test_updateUserSettings_omitsIsPrivateAccountWhenNotSet,test_decodesIsPrivateAccount,test_isPrivateAccount_isNilWhenAbsent.Not verified here
The round-trip acceptance criteria — set on iOS → visible on the web, and a new follower landing in
FollowRequestsView— need a live logged-in account and were not exercised. The wire key and decodeare covered by unit tests.
🤖 Generated with Claude Code