Skip to content

Restructured settings into sub-pages, exposed 10+ new API-backed controls, added push notification management.#29

Merged
cbl merged 1 commit into
mainfrom
feat/mastodon-settings
Apr 17, 2026
Merged

Restructured settings into sub-pages, exposed 10+ new API-backed controls, added push notification management.#29
cbl merged 1 commit into
mainfrom
feat/mastodon-settings

Conversation

@cbl

@cbl cbl commented Apr 17, 2026

Copy link
Copy Markdown
Member

Added

Composables (@repo/api)

  • useAccountPreferences() — optimistic wrapper for PATCH /accounts/update_credentials (locked, discoverable, hideCollections, bot, source.language/privacy/sensitive). Patches currentUser synchronously, rolls back on server error.
  • usePushSubscription() — full Web Push lifecycle: browser permission, VAPID key from instance, PushManager subscribe/unsubscribe, Mastodon POST/PUT/DELETE /push/subscription, per-type alert toggles.

Components (@repo/ui)

  • <SettingsSection> — titled group header with optional description.
  • <SettingsNavItem> — navigation row (internal route / external link / button) with optional badge and chevron/↗ icon.

Pages

  • /settings/privacy — posting defaults (visibility, language, sensitive), sensitive content display (media visibility moved from appearance), account visibility (locked, discoverable, hideCollections, bot), content links (blocked/muted).
  • /settings/notifications — push notification master toggle, 7 per-type alert toggles (mention, follow, reblog, favourite, poll, status, update), browser permission flow.
  • /settings/appearance — theme, autoplay GIFs, reduce motion.

Infrastructure

  • public/push-sw.js — service worker for push event handling + notification click.
  • Updated plugins/unregister-sw.client.ts to register the push SW instead of unregistering all SWs.

Changed

  • /settings index — stripped to profile card + account status + category nav (Privacy & safety, Notifications, Appearance) + logout. Removed Early Access and About sections (already accessible from nav).
  • Media visibility control moved from Appearance → Privacy & safety under "Sensitive content" section. Labels clarified: "Default" → "Only sensitive", "Show all" → "Show all media", "Hide all" → "Hide all media".

New settings exposed (previously unavailable)

Setting API field
Require follow approval locked
Show in profile directory discoverable
Hide follows/followers hideCollections
Mark as automated account bot
Default post language source.language
Push: mentions alerts.mention
Push: new followers alerts.follow
Push: boosts alerts.reblog
Push: favourites alerts.favourite
Push: poll results alerts.poll
Push: new posts alerts.status
Push: post edits alerts.update

@cbl cbl merged commit 397b833 into main Apr 17, 2026
2 checks passed
@cbl cbl deleted the feat/mastodon-settings branch April 17, 2026 09:04
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.

1 participant