Skip to content

Lay out notifications like the web, with a settings screen for which kinds show - #178

Draft
simonhamp wants to merge 2 commits into
mainfrom
feat/notification-settings
Draft

simonhamp wants to merge 2 commits into
mainfrom
feat/notification-settings

Conversation

@simonhamp

Copy link
Copy Markdown
Member

The Notifications tab was still on an old layout. This brings it in line with the web's inbox on dev-null.sh production and moves the filters to a small settings screen with real switches.

What changed

Layout. Each group now sits on its own rail in the lane of whoever it's about, ending in a dot, like the web. The shared grey rail and the blue ring on new rows are gone. The web marks new rows only with HEAD@{last visit}, which is now drawn as the web's tinted band.

Replies, quotes, mentions and first commits lead with the person: their avatar is the node, then name, handle and time, then what they did on a muted line ("Replied to your commit"), then their words. Stars, follows, verdicts and level-ups keep the stacked avatars or chip with the sentence below.

Things the app didn't know about yet: first commits, timeouts (reason, duration and when posting resumes, with an hourglass icon), organization wording ("Replied to @acme's commit", "Mentioned @acme", "@acme's commit was rejected"), and naming both people when exactly two follow you or star a commit. One star inside an opened group now opens that person's profile, as on the web.

Grouping is still whatever the API sends. It already groups exactly like the web (same NotificationGroupsQuery), so replies stand alone, mention threads group, follows group per day and stars group per commit.

Filters. The web replaced its single-choice tabs with a toggle per kind (Replies, Quotes, Stars, Mentions, Follows, Moderation), any mix of them. The app's tab pager is gone. A sliders button in the title bar opens Notification settings, with a native:toggle per kind. Each switch saves when it flips. Going back starts a fresh list for the new choice. The list asks the API with the same ?type= the web sends: all, a comma list, or none. Empty states use the web's words, including "All categories are turned off" and Show all notifications.

The web keeps this choice in a cookie in your browser (notification_types_{user id}), and the API keeps nothing, so the app keeps it on the phone per user (NotificationFilter). It doesn't follow you between the web and the app.

API gaps

These need a dev-null.sh change. I didn't fake them on the client.

  1. The unread badge ignores the filter. The web counts unread groups only in the kinds you have on. Every API response that carries unread_notifications_count calls unreadCount($user) with the default all, so the tab badge can count kinds you turned off. Fix: store the choice on the user (say a notification_types column), read it in ListNotificationsRequest::rememberedType() instead of the cookie, add PUT /api/v1/me/notification-types, and pass it to unreadCount() everywhere. The app would then save there instead of on the phone, and the web and app would share one choice.
  2. No quoted commit or starred images on API notifications. The web's controller runs withQuotedCommits() and withStarredCommitImages(), the API's NotificationController::index doesn't. So the app can't show your quoted commit under a quote, or the thumbnail and "starred your image" wording for an image-only commit. Fix: call both in the API controller.

How I tested

Against a local API on dev-null.sh production 2ef29e77, with a seeded inbox for local-dev: four stars on one commit, three follows in an hour plus two the day before, a three-mention thread, a quote, a first commit, an org reply and org mention, approved, rejected with a reason, a timeout, and older single stars and replies, read and unread.

On an iOS 27.0 simulator and an Android 35 emulator, light and dark: the grouped layout, expanding stars and a mention thread, opening a commit, a profile from a star inside a group, a group member's commit, turning kinds off and seeing the list change, turning everything off and Show all. The local web on the same data is linked below for comparison.

php artisan test: 1,907 pass. Nothing native changed, so no new build steps.

Watch for: native:toggle on iOS ignored a plain simulator tap and needed a held touch. That looks like a simulator input quirk rather than the app, but worth a check on a phone.

Screenshots

empty

iOS light iOS dark Android light Android dark
After

group

iOS light iOS dark Android light Android dark
After

notifications

iOS light iOS dark Android light Android dark
Before
After

settings

iOS light iOS dark Android light Android dark
After

Other files: web-filters-light.png, web-notifications-light.png

The web on the same data: inbox, filter menu.

  • No visible change

🤖 Generated with Claude Code

simonhamp and others added 2 commits November 15, 2026 23:34
The Notifications tab now matches the web's inbox. Each group sits on its
own rail in the lane of whoever it's about, ending in a dot. Replies,
quotes, mentions and first commits lead with the person's avatar, name and
handle, then what they did. Two people are both named, organizations get
their own wording, and timeouts and first commits are drawn.

The row of filter tabs is gone. A settings button in the title bar opens
a screen with a switch per kind, as the web's filters choose them. Each
switch saves straight away, on this phone per user, since the web keeps
its choice in a browser cookie and the API keeps none. The list asks
devnull with the same ?type= the web sends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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