localui.c starts the identity, listener, --peer links, pin store and the transfers from the UI: Nearby comes from DcPeers, messages become conversations of the Local peers account, the send hook routes by peer id, the file hooks use the offer dialog and DcFileSend/DcFileRecv with the Xt timer pumping the DcLoop. An unknown pin shows the 6-digit SAS dialog; Codes match stores the pin in peers.json, Reject (or a changed pin) blocks and closes. main.c gains --local/--config/--listen/--peer/--downloads. End-to-end test: a headless peer connected, the dialog was accepted, the pin stored and 'hello ui' appeared in the transcript (screenshot dtchat-t58-pair.png). make mcde-host still blocked by pid 2126511.