Skip to content

feat: make notification types easier to tell apart - #489

Merged
xHeaven merged 4 commits into
dev-null-sh:productionfrom
simonhamp:feat/notification-avatars
Oct 19, 2026
Merged

xHeaven merged 4 commits into
dev-null-sh:productionfrom
simonhamp:feat/notification-avatars

Conversation

@simonhamp

@simonhamp simonhamp commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

The notifications page drew every kind of update the same way, with a type icon on the rail and a row of avatars, so replies and quotes were hard to pick out from follows and stars.

Replies, quotes and mentions now put the person's avatar on the rail where the icon was, the way Twitter does. They read like commits: name, handle and time on top, a short "Replied to your commit" line, then the text. Follows, stars and moderation updates keep their icons and stacked avatars.

A quote now shows the commit it quotes underneath, in the same grey box stars already use for your commit. If you deleted that commit, it shows the usual tombstone. The web inbox loads commit.quotedCommit through a new NotificationGroupsQuery::withQuotedCommits(), with trashed rows and limited to the recipient's own commits. A quote notification always quotes the recipient, and the limit means a reply that quotes someone else never sends that commit to the page. The API's notifications don't load it, so their response is unchanged.

The Follow button on follow notifications is now an icon styled like save and report, with a tooltip naming who it follows back. A group of several followers no longer has one on its summary row. It could only follow the newest of them back, and its state didn't match that person's row once the group was expanded. Each follower still gets their own in the expanded list.

For review:

  • Most of the diff in notification/index.tsx is the old summary header re-indented inside a new condition. It reads much smaller with whitespace hidden.
  • The two .tsx unit tests now render inside TooltipProvider, as CommitStarButton.test.tsx does.
Before After After (dark)
Notifications with a type icon on every row and a Follow button on follows Replies, quotes and mentions with the avatar on the rail, and quotes showing the quoted commit The same in dark mode

An expanded group of followers, each with their own follow-back icon:

Expanded follower group with a tooltip on one follow-back icon

I checked it with Playwright at 1440×900, 1366×650 and 390×844 in light and dark. Layout shift stayed at 0 on load, when expanding a group and when following back. NotificationInboxTest has a new test for the quoted commit, covering the tombstone and a reply that quotes someone else. The unit tests cover the quote and the group without a button. I ran the notification tests, lint, format and types locally, not the full suite.

🤖 Generated with Claude Code

Replies, quotes and mentions now show the person's avatar on the rail
instead of the type icon, so they read like commits. Quotes also show
the commit they quote. Follow-back is an icon with a tooltip, and a
group of followers only gets it per person once expanded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 18, 2026 18:38
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonhamp simonhamp changed the title Make notification types easier to tell apart feat: make notification types easier to tell apart Oct 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No blocking issues were identified in the focused UI changes, recipient-scoped loading, or accompanying tests.

No open issues 🎉

What changed in this PR

Makes notification types easier to distinguish while preserving the existing inbox grouping behavior.

Changes:

  • Gives replies, quotes, and mentions avatar-led headers.
  • Adds recipient-owned quoted-commit previews and deleted-commit tombstones.
  • Replaces follow-back buttons with tooltip icons and removes them from multi-follower summaries.
File Description
tests/​Unit/​NotificationIndex.test.tsx Adds tooltip support to test rendering.
tests/​Unit/​NotificationInbox.test.tsx Covers quote previews, tombstones, and follow controls.
tests/​Feature/​NotificationInboxTest.php Tests quoted-commit loading and recipient isolation.
resources/​js/​types/​notification.ts Types quoted-commit preview data.
resources/​js/​pages/​notification/​index.tsx Updates notification layouts, previews, and follow controls.
app/​Queries/​NotificationGroupsQuery.php Eager-loads recipient-owned quoted commits, including deleted rows.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 18, 2026 18:46
@simonhamp
simonhamp marked this pull request as ready for review October 18, 2026 18:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Static review identified no blocking issues, and targeted regression coverage accompanies the changes; tests were not executed during this review.

No open issues 🎉

Review effort: Balanced

Production moved the follow-back button onto the shared follow state
(useIsFollowing and onFollowHttpException). The icon follow-back button
here now uses both, in place of its own useState and throttle toast.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 19, 2026 07:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

The API's commit resource includes quoted_commit whenever the relation
is loaded, so loading it in the shared paginate() added that key to
every API notification. The web inbox now loads it on its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 19, 2026 07:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@xHeaven
xHeaven merged commit a6fcefc into dev-null-sh:production Oct 19, 2026
5 of 6 checks passed
udaykiranchenna added a commit to udaykiranchenna/dev-null.sh that referenced this pull request Oct 19, 2026
…notification-excerpt

Resolves the conflicts with dev-null-sh#489, which moved the bordered block into OwnCommitExcerpt and shows the quoted commit under quotes. The quoted commit now loads its image count too, so an image-only one shows "Image" instead of an empty block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonhamp
simonhamp deleted the feat/notification-avatars branch October 19, 2026 23:12
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.

3 participants