feat(desktop): add scoped reply thread sidebars

Keep forum and channel thread panes anchored to the selected branch, scope typing indicators to the active composer, and surface clearer relay errors when staging auth returns HTML.

Made-with: Cursor
This commit is contained in:
Thomas Petersen
2026-04-13 07:46:44 -04:00
parent 8d24bd4130
commit d4e71c6f37
24 changed files with 2226 additions and 411 deletions

View File

@@ -135,15 +135,26 @@ export class RelayClient {
);
}
async sendTypingIndicator(channelId: string) {
/**
* @param replyParentEventId Optional NIP-10 reply target — same id you pass as `parentEventId`
* when sending a message. Enables scoped “is typing” in thread UIs.
*/
async sendTypingIndicator(
channelId: string,
replyParentEventId?: string | null,
) {
// Bail when disconnected — not worth triggering a reconnect for ephemeral typing events.
if (this.wsId === null) {
return;
}
const tags: string[][] = [["h", channelId]];
if (replyParentEventId) {
tags.push(["e", replyParentEventId, "", "reply"]);
}
const event = await signRelayEvent({
kind: KIND_TYPING_INDICATOR,
content: "",
tags: [["h", channelId]],
tags,
});
// Fire-and-forget: no need to wait for relay acknowledgement.