feat: render history_loaded in web UI with earlier messages divider

- store: handle history_loaded event — prepend gossipped messages,
  dedup by mid, sort by ts, record cutoff timestamp per room
- MessagePane: show "earlier messages" divider between history and
  live messages based on the cutoff timestamp
- types: add history_loaded, room_created, create_room to IpcMsgType;
  add messages field to IpcMessage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Fredrik Johansson
2026-06-28 23:50:48 +02:00
parent 15306dc0c2
commit 9de625d617
4 changed files with 42 additions and 5 deletions

View File

@@ -82,6 +82,9 @@ export type IpcMsgType =
| 'shares_list'
| 'peer_status'
| 'error'
| 'history_loaded'
| 'room_created'
| 'create_room'
export interface IpcMessage {
type: IpcMsgType
@@ -124,4 +127,6 @@ export interface IpcMessage {
conn_state?: PeerConnState
candidate_type?: CandidateType
remote_address?: string
// history_loaded
messages?: ChatMessage[]
}