Skip to content

Improve verification and media UX #72

@mjkatgithub

Description

@mjkatgithub

Goal

Improve the end-to-end encryption (E2EE) user experience so that verification
state is clear and media handling is predictable.

This is based on real user feedback:

  • Session verification appears inconsistent vs Element.
  • Emoji comparison UI is not shown (or does nothing).
  • Image uploads/messages may not render until switching rooms.
  • Decryption failures show a raw error message.

Scope

  • Verification UX
    • Ensure Decentra’s verification state matches the underlying crypto state.
    • Provide a clear UI entry point to verify the current session/device.
    • When verification is required, show an explicit prompt and a working flow.
    • Add an Element-like hint/badge for content coming from an unverified session
      (at minimum for images/attachments; ideally also for encrypted messages).
  • Media rendering reliability
    • Fix image/attachment events not appearing immediately after send/receive.
    • Ensure media thumbnails/previews update without requiring a room switch.
  • Error messaging
    • Replace “encrypted message could not be decrypted” style raw errors with a
      user-friendly state + action hints (e.g. retry, wait for keys, verify).

Acceptance Criteria

  • Verification status shown in UI is consistent with actual crypto state.
  • Emoji/SAS compare flow is accessible and functional when verification is
    possible.
  • Images/attachments render immediately after they are sent/received (no
    manual room switch required).
  • If a message/media is from an unverified session, Decentra shows a clear
    non-blocking warning similar to Element (e.g. “Session not verified”).
  • Decryption failures are presented as a friendly UI state and do not show
    raw technical strings to end users.

Test Checklist

Unit

  • Verification state mapping (verified/unverified/unknown) -> UI model
  • Media event -> timeline render update (reactivity)
  • Decryption error mapping -> user-friendly message

Integration

  • Verify session flow triggers expected crypto calls and UI transitions
  • Send image and observe immediate render without navigation
  • Receive image and observe immediate render without navigation

E2E

  • Login with a new session, trigger verification, complete SAS compare
  • Send/receive an image in an encrypted room and verify it displays
  • Simulate a decrypt failure and verify the friendly error UI

Notes

  • Element displays media with a hint about the unverified session; Decentra
    should implement a comparable hint/badge.

Branch

feature/verification-media-ux

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions