Skip to content

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

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

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

Conversation

@simonhamp

@simonhamp simonhamp commented Nov 15, 2026 •

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.

One HEAD@{last visit} marker. The Log still drew the old dashed row while Notifications drew the band, and the band asked for a mono-semibold font that was never registered, so the phone drew it in the system font instead of Geist Mono. Both screens now draw the same band, in mono-medium (Geist Mono Medium). The web asks for Geist Mono at semibold, but its Vite config only loads the 400 and 500 files, so browsers draw the 500 as well.

Given a lane, the rail runs down the gutter over the band and the room above and below it. That room is the band's margin, not the marker's padding, because iOS lays an absolute child out inside its parent's padding and the rail stopped 12pt short at each end. Neither screen passes a lane today: the Log starts a new run at the marker, as the web does, so the commit above ends in a dot.

Opening a group animates. It used to swap a right chevron for a down one and pop its notifications in and out. Now it works like replies on the Log in #179: the chevron turns, the notifications fade in nudged down 8pt into place, and closing fades them out the same way before they go. Older ones fade in as they load. It's the same mechanism: the rows are drawn see-through for one frame, then drawn as they should be when a Beat task comes back, and EDGE eases between the two over 220ms. Beat.php is copied byte for byte from #179, so the two merge cleanly. The 220ms lives in Notifications::GroupFade for now, since ThreadRows::Fade only exists in #179.

One difference from the Log: opening, the chevron turns on that second frame, not the first. On iOS a node with animate-duration animates everything about it that changes in the same update as its animated props, its position included. A group opens inside its own list row, so the row grows in the first frame, and a chevron turning in that frame slid down and back up as it turned. On the Log the replies are rows of their own and the commit's row keeps its height, so it never came up there.

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.

For the animation I opened and closed a group of stars on both platforms and pulled frames out of the recordings to check that the chevron turns in place and the notifications fade both ways.

php artisan test: 1,913 pass. Nothing native changed, so no new build steps. The fade tests run Beats through finishRefreshes(), so there's no third copy of #179's finishBeats() or #180's landBeats() to fold in later.

For the marker I used an iOS 27 simulator against a fake API, light and dark: the Log and Notifications before and after, and the Log with a lane forced onto the marker to check the rail runs its full height. I haven't added those screenshots to the tables below.

FontsTest checks that every font a view names is an alias in config/native-ui.php or a bundled file, which would have caught mono-semibold. It skips font="medium" and font="bold" for now. Neither has ever been bundled, so those 33 places draw in the system font. That wants its own change.

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. On the Log the band sits under the commit row's hairline, where Notifications leaves the hairline off the row above it.

Screenshots

group-toggle is a group of stars opened. The recordings show it opening and closing, before and after.

group-toggle

iOS light iOS dark Android light Android dark
Before
After

Recordings: Android light, after, Android light, before, iOS light, after, iOS light, before

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>
…e Log

A group's toggle swapped a right chevron for a down one, and its
notifications popped in and out. Now the chevron turns, and the
notifications fade in nudged down into place, then fade out the same way
before they go. Older ones fade in as they load. It's the Log's approach
from #179: the rows are drawn see-through for a frame, then drawn as they
should be when a Beat comes back, 220ms each way. Beat.php is copied byte
for byte from #179 so the two merge cleanly.

Opening, the chevron turns on that second frame rather than the first.
iOS animates everything about a node that changes in the same frame as
its animated props, so turning it while the row grew moved the chevron
down and back up as it turned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions

The marker had two styles. Notifications drew the web inbox's band, but
asked for a mono-semibold font that was never registered, so the phone
drew it in the system font. The Log still drew the old dashed row.

Now there is one marker, the band, everywhere. Its text uses mono-medium
(Geist Mono Medium). The web asks for Geist Mono at semibold but only
loads the 400 and 500 files, so browsers draw the 500 too.

Given a lane, the rail runs down the gutter over the band and the room
above and below it. That room is the band's margin, not the marker's
padding, because iOS lays an absolute child out inside its parent's
padding and the rail stopped 12pt short at each end.

A new test checks that every font a view names is a config alias or a
bundled file. font="medium" and font="bold" are left out of it for now:
neither is bundled, so both draw in the system font today.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp added a commit that referenced this pull request Nov 20, 2026
…o-base

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp added a commit that referenced this pull request Nov 20, 2026
Brings in #178's HEAD@{last visit} band.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp added a commit that referenced this pull request Nov 20, 2026
Brings in #178's HEAD@{last visit} band.

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