ui: name the common event kinds from a data table #13

Merged
raucao merged 2 commits from feat/event-kinds into main 2026-12-01 12:43:53 +00:00
Owner

Adds human names for many more event kinds, and moves the table out of Rust so that naming one is a data edit.

data/event-kinds.tsv is now the single source of truth: one kind per line, tab-separated, with the column naming the standard that defines it. It grows from around 80 kinds to more than 230 — the whole NIPs table, the NIP-82 software catalogue, Blossom authorisation, git-repository kinds, and community NIPs (starting with kind 360, Place Photos and Videos, named "Place media"). Anything still unknown keeps a generic name.

src/ui/kind.rs embeds the file with include_str! and parses it once; a malformed, duplicated or overlapping row panics and fails cargo test, so the file cannot rot unnoticed. The table is listed as an input of the Meson cargo target, so editing it triggers a rebuild.

The kind is now shown as a sentence-cased name with the number alongside, each surface in its own shape:

  • the approval dialog shows Kind: Reaction (7)
  • an Apps permission row shows Sign kind 7 (Reaction)
  • an activity entry shows Reaction (kind 7) — allowed silently
Adds human names for many more event kinds, and moves the table out of Rust so that naming one is a data edit. `data/event-kinds.tsv` is now the single source of truth: one kind per line, tab-separated, with the column naming the standard that defines it. It grows from around 80 kinds to more than 230 — the whole NIPs table, the NIP-82 software catalogue, Blossom authorisation, git-repository kinds, and community NIPs (starting with kind 360, Place Photos and Videos, named "Place media"). Anything still unknown keeps a generic name. `src/ui/kind.rs` embeds the file with `include_str!` and parses it once; a malformed, duplicated or overlapping row panics and fails `cargo test`, so the file cannot rot unnoticed. The table is listed as an input of the Meson cargo target, so editing it triggers a rebuild. The kind is now shown as a sentence-cased name with the number alongside, each surface in its own shape: - the approval dialog shows `Kind: Reaction (7)` - an Apps permission row shows `Sign kind 7 (Reaction)` - an activity entry shows `Reaction (kind 7) — allowed silently`
raucao added 2 commits 2026-12-01 12:40:42 +00:00
Move the kind names out of src/ui/kind.rs into data/event-kinds.tsv — one
kind per line, with the standard that defines it — and cover the whole NIPs
table plus the NIP-82 draft, Blossom and git kinds: around 230 kinds instead
of 80. The module embeds the file with include_str! and parses it once; a
malformed, duplicated or overlapping row panics and fails the tests. The file
is an input of the Meson cargo target, so editing it triggers a rebuild.

Render the kind as a sentence-cased name with the number alongside: the
approval dialog shows `Kind: Reaction (7)`, an Apps permission row
`Sign kind 7 (Reaction)`, and an activity entry
`Reaction (kind 7) — allowed silently`.
ui: name the first community-NIP kind (360, Place media)
CI / test (push) Successful in 51s
CI / test (pull_request) Successful in 50s
c23b947001
The kind table now takes kinds from community NIPs that have no assigned
number, cited by title in the `spec` column with the nostr address on a
comment above the row. The first is Place Photos and Videos (kind 360),
named "Place media" because an event carries one photo or video.
raucao added the ui/uxenhancement labels 2026-12-01 12:41:35 +00:00
raucao merged commit 84fcd96777 into main 2026-12-01 12:43:53 +00:00
Sign in to join this conversation.