All Docs
FeaturesDepositClearUpdated March 11, 2026

Negotiation Inbox: Unread Message Badges in Sidebar

Negotiation Inbox: Unread Message Badges in Sidebar

Available from: v0.1.134

Overview

Agents and landlords working across multiple active negotiation threads can now see at a glance — directly from the sidebar — how many unread tenant messages require a response, separate from the count of open disputes.

This update surfaces two distinct signals on the Negotiation nav item and ensures the same unread count is available on mobile.


Background: Two Different Metrics

The Negotiation section of the dashboard tracks two related but independent concepts:

MetricWhat it meansBadge colour
Open disputesThreads where a formal dispute is currently open🟡 Amber
Unread messagesMessages from tenants not yet read by the agent🔴 Red

Before v0.1.134, the sidebar badge only showed open disputes (openDisputes). This meant an agent could have several unread tenant replies in active threads and receive no distinct visual signal — the badge count would not change unless the dispute status itself changed.


What's New

Dual Badges on the Negotiation Nav Item

The Negotiation sidebar nav item now displays up to two badges at the same time:

  • Red badge — total count of unread negotiation messages across all open threads (unreadNegotiationMessages). This is the primary signal for inbox urgency.
  • Amber badge — total count of open disputes (openDisputes). This reflects workflow status rather than communication urgency.

If either count is zero, its badge is hidden automatically.

New unreadNegotiationMessages Field

The WorkQueueSummary type returned by the dashboard.workQueue tRPC query now includes:

unreadNegotiationMessages: number

This field aggregates the total unread message count across all active negotiation threads. It is kept in sync with the existing 8-second polling interval already used by NegotiationInbox, so the sidebar badge updates without requiring a page reload.

Mobile Bottom Tabs

The unread negotiation message count is now also displayed on the Deposits tab within MobileBottomTabs, giving mobile users the same urgency signal as desktop users see in the sidebar.


How Unread Count Is Calculated

  • A message is counted as unread if it was sent by a tenant (or third party) and has not been opened by the authenticated agent/landlord user.
  • The count spans all open threads — not just threads currently visible in the viewport.
  • The count is refreshed every 8 seconds via the polling mechanism in NegotiationInbox.
  • Individual thread rows within NegotiationInbox continue to show per-thread unread badges as before — the sidebar badge is the aggregate of these.

Affected Components

ComponentChange
src/components/sidebar-nav.tsxAdded dual-badge support (red + amber) to Negotiation nav item
WorkQueueSummary typeAdded unreadNegotiationMessages: number field
dashboard.workQueue tRPC queryPopulates new unreadNegotiationMessages field
MobileBottomTabsSurfaces unread count on Deposits tab

Notes

  • The NegotiationInbox polling behaviour (every 8 seconds) is unchanged.
  • Per-thread ThreadRow unread badges are unchanged.
  • The change is purely additive — no existing badge behaviour has been removed.