Negotiation Inbox: Unread Count Badge & Smarter Search — v0.1.154
Negotiation Inbox: Unread Count Badge & Smarter Search
Release: v0.1.154 · Category: UI/UX · Usability
This release addresses two friction points in the NegotiationInbox that interrupted the flow of managing deposit negotiation threads: a missing unread count at the panel level, and a search input that reset itself whenever you switched tabs.
Problem 1 — You Arrived and Lost the Number
The sidebar badge on the negotiation section correctly shows how many unread threads you have. But the moment you clicked through into the inbox, that number disappeared. The Threads panel header showed no aggregate count — only individual per-thread unread dot indicators, which require scanning the full list to build a mental total.
This meant the context the sidebar badge established was immediately lost on arrival.
Fix: Aggregate Unread Count Badge on the Panel Header
The Threads heading now carries a small badge showing the total number of unread threads across the active tab. The count updates in real time as threads are read or new messages arrive, and reflects only the currently visible tab (open or closed) so the number stays meaningful and actionable.
Problem 2 — Switching Tabs Wiped Your Search
The inline search in the thread list panel did not survive tab switches. If you searched for a tenant name or keyword and then toggled from Open to Closed threads (or vice versa), the search input was cleared. Your query — still valid, still relevant — was gone, and you had to type it again.
Fix: Search Query Persists Across Tab Changes
The search query is now preserved when switching between the Open and Closed tabs. The same term is applied to whichever tab you navigate to, so you can check both open and closed threads for the same search without re-entering the query.
Bonus: Mark All as Read
Alongside the existing New Thread button, a Mark all as read control is now available at the panel level. Rather than opening each thread individually to clear its unread indicator, you can dismiss all unread state for the current tab in a single click.
Summary of Changes
| Feature | Detail |
|---|---|
| Unread badge on panel header | Shows total unread count for the active tab (open or closed) |
| Search persistence | Query survives open ↔ closed tab switches |
| Mark all as read | Panel-level button, sits alongside New Thread |
Affected File
src/app/dashboard/negotiation/negotiation-inbox.tsx