render message reply threads in dashboard and per-agent inbox

- MessageEvent and DashboardEvent Sent/Delivered now carry id and in_reply_to
- broker.send() includes last_insert_rowid in the emitted event
- recent_all() and recv_batch() include id and in_reply_to from the DB
- deliver_reminders_batch() tracks per-row rowids within the transaction
- dashboard message flow: reply rows are indented with a border-left and a
  clickable '↳ reply' tag that scroll-jumps + briefly highlights the parent
- per-agent inbox: reply messages get a '↳ reply ·' prefix and indent

Closes #26
This commit is contained in:
iris 2026-05-20 15:27:31 +02:00 committed by Mara
parent 804875d670
commit b1f10b1d1b
8 changed files with 132 additions and 22 deletions

View file

@ -257,25 +257,29 @@ fn spawn_broker_to_dashboard_forwarder(coord: Arc<Coordinator>) {
tokio::spawn(async move {
loop {
match rx.recv().await {
Ok(MessageEvent::Sent { from, to, body, at }) => {
Ok(MessageEvent::Sent { id, from, to, body, at, in_reply_to }) => {
let file_refs = dashboard::scan_validated_paths(&body);
coord.emit_dashboard_event(DashboardEvent::Sent {
seq: coord.next_seq(),
id,
from,
to,
body,
at,
in_reply_to,
file_refs,
});
}
Ok(MessageEvent::Delivered { from, to, body, at }) => {
Ok(MessageEvent::Delivered { id, from, to, body, at, in_reply_to }) => {
let file_refs = dashboard::scan_validated_paths(&body);
coord.emit_dashboard_event(DashboardEvent::Delivered {
seq: coord.next_seq(),
id,
from,
to,
body,
at,
in_reply_to,
file_refs,
});
}