Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.
This repository was archived by the owner on May 20, 2026. It is now read-only.

Feature: LXMF Chat Backend - NomadNet Feature Parity #2

@cwilson613

Description

@cwilson613

Summary

This issue tracks the implementation of full LXMF chat backend functionality in styrened to achieve feature parity with NomadNet. The goal is to expose all backend APIs needed by styrene-tui for a complete chat experience.

Background

A comprehensive gap analysis was performed comparing:

  • Reference implementations: NomadNet, Sideband, LXMF library
  • Current styrened: Basic LXMF send/receive, auto-reply, RPC

Full analysis: .claude/plans/styrened-comms-backend-plan.md

Current State

Component Status
LXMF Router Implemented
Send/Receive Messages Implemented
Auto-Reply Implemented
Message Persistence Partial (model exists, not wired)
Conversation Management Not implemented
Contact Directory Not implemented
Delivery Tracking Not implemented
Propagation Nodes Not implemented

Gap Analysis Summary

P0 - Critical for Basic Chat

  • Conversation Service: List, create, delete conversations
  • Message History: Query messages per conversation with pagination
  • Delivery Tracking: Callbacks for sent/delivered/failed status
  • Unread Counts: Track and expose unread message counts
  • IPC Endpoints: QUERY_CONVERSATIONS, QUERY_MESSAGES, CMD_SEND_CHAT, CMD_MARK_READ

P1 - Required for NomadNet Parity

  • Contact Directory: Trust levels, display names, preferred delivery
  • Propagation Node Support: Set/sync from propagation nodes
  • Announce Stream: Recent announces with metadata
  • Ignore List: Block specific destinations

P2 - Enhanced Features (Sideband Parity)

  • Rich Message Fields: Title, renderer hints, custom fields
  • File Attachments: FIELD_FILE_ATTACHMENTS support
  • Signature/Encryption Info: Expose validation status to UI
  • Stamp Costs: Anti-spam proof-of-work

P3 - Future

  • Audio messages (Codec2/Opus)
  • Telemetry integration
  • Paper messages (QR codes)
  • Ratchet support (forward secrecy)

Proposed Architecture

New Services

services/
├── conversation_service.py  # Conversation management, history
├── contact_service.py       # Contact directory, trust levels
└── propagation_service.py   # Propagation node sync

New IPC Messages

# Queries
QUERY_CONVERSATIONS -> [ConversationInfo, ...]
QUERY_MESSAGES {dest_hash, limit} -> [MessageInfo, ...]
QUERY_CONTACTS {trust_filter?} -> [ContactInfo, ...]
QUERY_PROPAGATION_NODES -> [PropagationNodeInfo, ...]

# Commands
CMD_SEND_CHAT {dest_hash, content, title?} -> MessageInfo
CMD_MARK_READ {dest_hash} -> bool
CMD_ADD_CONTACT {identity_hash, display_name?, trust_level?} -> ContactInfo
CMD_SET_PROPAGATION_NODE {dest_hash?} -> bool
CMD_SYNC_PROPAGATION_NODE {max_messages?} -> SyncResult

Implementation Phases

Phase 1: Core Chat (P0) - ~2-3 weeks

  1. ConversationService with list/create/delete
  2. Message history persistence and queries
  3. Delivery status tracking via LXMF callbacks
  4. IPC handlers for chat operations

Phase 2: Contacts & Directory (P1) - ~1-2 weeks

  1. Contact model and service
  2. Trust level implementation
  3. IPC handlers for contact management

Phase 3: Propagation Nodes (P1) - ~2-3 weeks

  1. Propagation node detection
  2. Message sync implementation
  3. IPC handlers for propagation

Phase 4: Rich Messages (P2) - ~2-3 weeks

  1. Full LXMF fields support
  2. Attachment handling (optional)

References

Acceptance Criteria

  • styrene-tui can display conversation list with unread counts
  • styrene-tui can view full message history for a conversation
  • styrene-tui can send messages and see delivery status updates
  • styrene-tui can manage contacts with trust levels
  • styrene-tui can sync messages from propagation nodes (when configured)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions