feat: use app name in window titles for NIP-89 app events

Add special handling for kind 31990 (Application Handler) events in
getEventDisplayTitle to use the app name from content JSON instead of
generic kind name. Falls back to identifier if app name not available.

This gives NIP-89 app handler events nice readable window titles.
This commit is contained in:
Claude
2026-01-05 10:39:44 +00:00
parent 94028bdec4
commit 396b78363c

View File

@@ -9,6 +9,7 @@ import {
getPullRequestSubject,
} from "@/lib/nip34-helpers";
import { getCodeName } from "@/lib/nip-c0-helpers";
import { getAppName } from "@/lib/nip89-helpers";
import { getKindInfo } from "@/constants/kinds";
/**
@@ -48,6 +49,9 @@ export function getEventDisplayTitle(
case 1618: // Pull request
title = getPullRequestSubject(event);
break;
case 31990: // Application Handler
title = getAppName(event);
break;
}
if (title) return title;