Skip to content

feat(chat): Priority / General inbox split - #14593

Open
dylanjeffers wants to merge 2 commits into
mainfrom
feat/inbox-priority-general
Open

feat(chat): Priority / General inbox split#14593
dylanjeffers wants to merge 2 commits into
mainfrom
feat/inbox-priority-general

Conversation

@dylanjeffers

@dylanjeffers dylanjeffers commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Users are being message-blasted by artists they follow but don't want to block. This adds the "missing middle" between mute-per-conversation and block: a Priority / General inbox split.

  • Two inbox tabs, Priority (default) and General, on web and mobile. No Spam tab (block covers that).
  • All conversations start uncategorized and surface in the Priority tab, so nothing is buried without a user action.
  • Mark a conversation as Priority or General and future messages from that sender route to that tab automatically. The category is stored server-side per user (see the companion API PR).
  • Each tab shows its own purple dot when it has unread messages. Uncategorized unreads count toward the Priority dot. The existing sidebar/nav dot keeps firing for unreads in either category.

Categorizing is lightweight

  • Web: hover a row for an options button, or use the conversation header menu ("Move to Priority" / "Move to General").
  • Mobile: swipe a row left to reveal Priority / General, long-press for the actions drawer, or use the in-conversation drawer.
  • No prompt on new chats.

Changes

  • SDK: chats.setCategory (RPC chat.set_category), chats.getUnreadCountByCategory, ChatCategory enum, category on UserChat.
  • Common store: setChatCategory with optimistic move and rollback on failure; per-category unread counts (server baseline plus an optimistic overlay that tracks reads, new messages and moves); per-tab chat list and unread-dot selectors; success/failure toasts; two analytics events. Fixed the nav dot's fallback scan, which stopped at the first blast row and could hide a later unread.
  • Web: InboxTabs in the inbox header (fits the existing 112px header), useChatCategoryMenuItems shared by the list row and the conversation header, per-tab filtering with backfill in ChatList.
  • Mobile: InboxTabs, ChatCategorySwipeActions, swipe/long-press on ChatListItem, per-tab filtering with backfill in ChatListScreen, new rows in ChatActionsDrawer.

Because chats are paginated by recency across categories, a tab backfills older pages until it has at least 10 rows or nothing is left.

Companion PR

Backend (migration 0240_user_conversation_preferences, chat.set_category, category on chat rows, GET /comms/chats/unread_by_category): AudiusProject/api#1037. Deploy the backend first for accurate tab dots; older clients ignore the new field, and this client falls back to loaded chats for the dots if the endpoint is missing.

Not included / follow-ups

  • Category changes are not pushed over the websocket to a user's other devices (same as read/delete today); they sync on the next chat fetch.

Test plan

  • tsc clean for sdk, common, web, mobile
  • eslint clean on changed files
  • common: 21 chat store tests pass (14 new, covering optimistic move/rollback, unread bucket moves, tab selectors, nav dot)
  • web: 9 chat-page tests pass (7 new: tab filtering, per-tab dots, fallback dot, tab switching, options menu)
  • Manual: web inbox with a signed-in account (tabs, dots, hover options, header menu)
  • Manual: iOS + Android chat list (tabs, dots, swipe, long-press, drawer)

🤖 Generated with Claude Code

Adds a "missing middle" between muting a conversation and blocking a
sender: users can file each chat into a Priority or General inbox tab, and
future messages from that sender route there automatically.

- SDK: `chats.setCategory` (RPC `chat.set_category`),
  `chats.getUnreadCountByCategory`, `ChatCategory` enum, `category` on
  `UserChat`.
- Common store: `setChatCategory` with optimistic move + rollback,
  per-category unread counts (server baseline + optimistic overlay that
  tracks reads, new messages and moves), per-tab chat list selectors and
  per-tab unread-dot selectors. The nav dot's fallback scan no longer stops
  at the first blast row, so a General unread always lights it.
- Web: Priority (default) / General pill tabs in the inbox header with
  independent purple dots, hover options on each list row, and
  "Move to Priority / General" in the conversation header menu.
- Mobile: same tabs and dots on the chat list screen, swipe-left on a row
  to reveal Priority / General, long-press for the actions drawer, and the
  same options in the in-conversation drawer.

Uncategorized chats surface in the Priority tab (and count towards its
dot) so new conversations are never buried without an explicit action.
Tabs backfill older pages until they have enough rows, since chats are
paginated by recency across categories.

Requires the comms server change in AudiusProject/api (migration 0240,
`chat.set_category`, `category` on chat rows, `/comms/chats/unread_by_category`).
Older nodes still work: the client falls back to the loaded chats for the
tab dots when the endpoint is unavailable.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4382297

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant