# Chat & Messaging ## Overview The app supports two chat modes: - **Direct messages**: Encrypted point-to-point messages to individual contacts - **Channel messages**: Broadcast messages to shared channels (see [Channels](channels.md)) This page covers direct messaging. For channel chat, see the Channels documentation. ## How to Access From the Contacts screen, tap any Chat-type contact to open the ChatScreen. ## Chat Screen Layout ### App Bar - **Title**: Contact name - **Subtitle**: Current routing path label (e.g., "2 hops", "flood (auto)", "direct (forced)") and unread count. Tapping the subtitle shows the full path details. - **Action button**: - **Overflow menu** (⋮ icon): Contains Routing, Info, Telemetry, Settings, and Clear Chat. Routing opens the routing sheet where you can switch between Auto, Direct, and Flood routing and manage recent paths (hop count, round-trip time, age, success count, color-coded by repeater). Info shows a dialog with contact type, path, GPS coordinates, and public key. ### Message List - Scrollable list with newest messages at the bottom - **Outgoing messages**: Right-aligned, primary color background. **Failed messages** change to a red-toned error container background - **Incoming messages**: Left-aligned, grey background with a colored avatar (initial letter or first emoji of sender name; color is deterministic from a hash of the sender name) - Bubble width capped at 72% of screen width - Hyperlinks rendered as tappable green underlined text - **Pinch-to-zoom**: Two-finger zoom (0.8x–1.8x) and double-tap to reset - **Jump to bottom**: Floating button appears when scrolled away from the bottom - **Lazy loading**: Scrolling to top loads older messages from storage ### Input Bar - **GIF button** (left): Opens GIF picker bottom sheet - **Translation button** (optional, between GIF and text field): Shown only when translation is enabled in App Settings. Tap to configure outgoing-message translation language and on/off toggle. - **Text field** (center): Auto-capitalization, enforces UTF-8 byte limit in real-time - **Send button** (right): Submits the message - On desktop: Enter/Numpad Enter also submits - When a GIF is selected, the text field shows an inline GIF preview with a dismiss button ## Message Types | Type | Wire Format | Display | |---|---|---| | Plain text | Raw UTF-8 string | Inline text with link detection | | GIF | `g:` | Inline GIF image from Giphy CDN | | Location pin | `m:,\|