-
Notifications
You must be signed in to change notification settings - Fork 5
Description
As a user who has chats that I use on a daily basis, it would be helpful to have those chats at the top of the list so I don't have to go find them. History pagination has made the search box less helpful because it can't find chats that haven't loaded yet. I'll make a separate issue for that (#347). For example, I have a "Proof Read" chat that I use for a final grammar and spelling check before sending out important communications.
Here's a feature spec for Pinned Chats.
Pinned Chats Feature Specification
Feature Description
Enables users to pin high-priority chats (e.g., daily-use conversations) to keep them permanently visible at the top of the chat history. Pinned chats appear in a dedicated section above the standard history, ensuring immediate access regardless of history pagination or chronological order. This feature addresses usability challenges when searching for frequently used chats (#347).
Key User Flow
- User opens the contextual menu ("…" button) for a chat in history or within an open chat.
- User selects "Pin chat" to pin or "Unpin chat" to unpin.
- Pinned chats appear alphabetically by title in the "Pinned" section above history.
- Unpinned chats return to their chronological position in history.
Acceptance Criteria
Core Functionality
-
Pin/Unpin Mechanism
- "Pin chat" option added to the contextual menu ("…" button) for all chats in history and chat headers.
- Menu dynamically changes to "Unpin chat" for pinned chats.
-
Pinned Section Behavior
- "Pinned" section appears above "History" only when ≥1 chat is pinned.
- Section auto-hides when all chats are unpinned, restoring "History" to default position.
-
Sorting & Storage
- Pinned chats ordered alphabetically by title (case-insensitive, A-Z).
- Pinned status persists across app restarts, logins, and sessions.
- Renaming a pinned chat instantly updates its alphabetical position in the "Pinned" section.
-
Edge Handling
- Maximum of 20 pinned chats per user; exceeding this shows: "Maximum pinned chats reached."
- Deleting a pinned chat automatically removes it from the "Pinned" section and unpins it.
-
Cross-Device Sync
- Pin/unpin actions sync in real-time across devices via backend.
- Conflicts resolved via last-action-wins (e.g., unpin overrides pin if simultaneous).
Edge Cases to Validate
-
Pinning Limits
- Attempt pinning a 21st chat → error message appears.
- Unpin 1 chat → pin a new chat → verify new chat appears without errors.
-
Deletion & Cleanup
- Delete a pinned chat via history → ensure removed from "Pinned" section and unpinned.
- Clear all history → verify "Pinned" section disappears and all pins removed.
-
Order & State Conflicts
- Pin same chat simultaneously from two devices → verify last action wins after sync.
-
Empty Conditions
- Unpin all chats → verify "Pinned" section disappears instantly.