feat: TUI room creation + daemon-side room persistence

/room <name> in the TUI sends create_room to the daemon, which persists
it in the rooms SQLite table and echoes room_created back. state_snapshot
now includes persisted rooms so they survive reconnects. Tab navigation
and room rendering pick them up automatically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Fredrik Johansson
2026-06-26 22:26:12 +02:00
parent 1308082c7b
commit 340735f992
4 changed files with 73 additions and 1 deletions

View File

@@ -236,6 +236,7 @@ const (
CmdAddShare IpcMsgType = "add_share" // add a share root; fields: path, networks
CmdRemoveShare IpcMsgType = "remove_share" // remove a share root; field: path
CmdListShares IpcMsgType = "list_shares" // returns shares_list event
CmdCreateRoom IpcMsgType = "create_room" // field: room (name)
// Events (daemon → UI)
EvtMessageReceived IpcMsgType = "message_received"
@@ -255,6 +256,7 @@ const (
EvtIdentityExported IpcMsgType = "identity_exported"
EvtIdentityImported IpcMsgType = "identity_imported"
EvtSharesList IpcMsgType = "shares_list"
EvtRoomCreated IpcMsgType = "room_created" // field: room (name)
)
// NetworkInfo summarises one joined network for state_snapshot and network_joined events.