id, title, status, priority, created, related_flows, related_issues, dependencies, tags
id
title
status
priority
created
related_flows
related_issues
dependencies
tags
0149
matrix-client-pc composer: markdown, reply, edit, reactions, media
pendiente
alta
2026-05-24
matrix
composer
markdown
media
reactions
threads
Objetivo
Composer del room: markdown rendering, replies con quote, edits, reactions emoji, threads (Matrix MSC3440), upload de media (imagenes, files, voice msg). Drag&drop archivos. Slash commands placeholder (/me, /shrug, /widget — este ultimo para issue 0152).
Tareas
Backend Go:
MatrixService.SendMessage(roomID, body, format) — text + markdown -> HTML via goldmark.
MatrixService.SendReply(roomID, parentEventID, body).
MatrixService.EditMessage(roomID, eventID, newBody).
MatrixService.SendReaction(roomID, eventID, key).
MatrixService.UploadMedia(roomID, filePath) -> mxc://.
MatrixService.SendThreadReply(roomID, threadRootID, body).
Frontend React:
Componente Composer con Mantine Textarea + toolbar markdown.
Hotkeys: Cmd+B/I/K, Cmd+Enter para enviar, Esc cancel edit.
Drag&drop zone over Composer + paste image desde clipboard.
EmojiPicker (reusar @emoji-mart/react o componente propio @fn_library).
ReactionBar debajo de EventBubble con aggregates.
Thread panel lateral (abrir click en evento "X replies").
Voice messages: graba con MediaRecorder (opus codec), upload + send con org.matrix.msc3245.voice flag.
Tests:
e2e/test_send_markdown.sh — **bold** aparece negrita en otro cliente.
e2e/test_edit_message.sh — edicion aparece in-place en Element Web.
e2e/test_reaction.sh — reaccion emoji propagada bidireccional.
Funciones del registry a crear
markdown_to_matrix_html_go_core — goldmark con sanitizer Matrix-compatible.
Composer_ts_ui — componente Mantine + dropzone.
EmojiPicker_ts_ui — wrapper picker emoji.
ReactionBar_ts_ui — componente reactions aggregadas.
Acceptance
Notas
Sanitizer HTML: usar allowlist Matrix (b, i, em, strong, a[href], code, pre, blockquote, ul, ol, li, br, p, h1-h6). NO permitir <script>, <iframe>, event handlers.
mxc:// uploads: validar size limit (Synapse default 50MB).
Voice msg: encode opus 32kbps, max 5min.