News on Home
Summary. The Home screen can show a single news card: the latest article published by the official Goblin news key. It sits between the Send/Receive actions and Recent Activity, is hidden when there is nothing to show, and always renders only the newest post. This page also covers how the news is published (a plain kind 30023 long-form article), so an operator can post their own.
What the user sees
When the wallet has cached a news post, Home renders a card with the article’s title and a short summary, spanning the full content width so it reads as a band rather than a chip. Any http(s) link in the summary is tappable and opens in the browser. No markdown is rendered in the panel, and there is no empty state: with no post cached, the card simply does not appear.
The panel is latest-only and language-aware. It shows exactly one article: the most recent one from the news key in the wallet’s own language, falling back to the newest English article when nothing is published in that language. An edit republished under the same identifier replaces it in place rather than stacking a second card.
The card is fetched from the wallet’s own relay set (which includes the money-path relay relay.floonet.dev) on the same subscription machinery as everything else, so it arrives over Tor like the rest of the wallet’s traffic. The wallet guards both the kind (30023) and the author (the news key), so a stray event on the news subscription cannot spoof the panel.
How it works
- The news publisher is a fixed key compiled into the wallet (
NEWS_NPUBingoblin/src/nostr/client.rs), currentlynpub15gsytqvs5c78u83yv2agl4twjkk6qgem7gtwe2agu7s90tkelxys0xxely. - The wallet subscribes to that key’s
kind 30023(NIP-23 long-form) events on its relay set under a stable subscription id (goblin-news), so a reconnect replaces the subscription rather than piling up duplicates. - Each post is cached with its
didentifier,created_at,title, a summary, and a detected language. The store dedupes newest-per-dand retains up to 18 cached events (raised from 8 in Build 158). Because one post published in all nine wallet languages is nine separate events, the old cap of 8 could evict a language before it was needed, and in practice dropped the English fallback; 18 leaves room for all nine languages of a post with headroom to spare. - The panel (
news_latest) selects the newest article whose language matches the wallet’s locale (folded to its ISO-639-1 primary, sozh-CNmatcheszh), then falls back to the newest English article if there is none. A post’s language comes from its["l", …]tag if present, otherwise a trailing[xx]marker in the title, otherwise it is treated as English. The summary is thesummarytag when present, otherwise the first couple of lines of the article body flattened to plain text and capped to about two lines.
On desktop, Home now lays out to the full window width, so the news band and the rest of the Home content use the available space instead of a fixed narrow column.
Publishing the news (MOTD how-to)
The news card is just a standard Nostr long-form article, so publishing is ordinary Nostr with two rules: sign with the news key, and send it to the relay the wallets read.
- Sign with the news key. Only articles from the compiled-in news key render in the panel; anything else is ignored.
- Publish a
kind 30023long-form article (NIP-23) towss://relay.floonet.dev. That is the money-path relay in the wallet’s default set, so a post there reaches wallets. (30023 is author-locked on Floonet relays: the news key must be an authorized author on the relay, which the flagship is configured for.) - Add a
titletag and asummarytag. The panel shows the title and the summary; without asummarytag it falls back to the first lines of the body. Keep the summary to roughly two lines. - Put any link in the summary.
http(s)URLs in the summary are tappable in the wallet; links in the article body are not surfaced in the card. - To update or correct a post, republish under the same
didentifier. Because the panel is latest-only and dedupes perd, an edit-in-place replaces the card instead of adding another. A brand-newd(with a newer timestamp) simply becomes the new latest.
Publishing in more than one language
Because the panel is language-aware, publish one article per language and let each wallet pick its own. The convention:
- Mark the language. The preferred way is a
["l", "<code>", "ISO-639-1"]tag (a clean title, machine-read language). Alternatively, append a[xx]marker to the title (for exampleWelcome [de]). No tag and no marker means English. - One
dper language. Use the base slug for English andslug-<lang>for every other language (for examplewelcomeandwelcome-de). That way an edit to the German article replaces the German card in place and never collides with the English one. - Date in ISO 8601. Where a title carries a date, write it as
YYYY-MM-DD.
A wallet then shows the newest article in its own language, falling back to the newest English article when that language has none. Publishing only an English article is fine; every wallet will show it.
Caveat: verify it landed
Some Nostr clients (Jumble is one) can silently fail to deliver an event to a relay you just added to their relay list, reporting success while the write never reaches the relay. After publishing, verify the article is actually on relay.floonet.dev (query the relay for the news key’s kind 30023), and republish if it did not land.
Reference
In goblin/src/nostr/:
client.rs:NEWS_NPUB,NEWS_SUB, the news subscription, andhandle_news(kind + author guard, newest-per-dcache).types.rs: the cachedNewsItem.store.rs:save_news(dedupe newest-per-d) andnews_latest.gui/views/goblin/mod.rs:news_panel_ui(the Home card, tappable summary links).
References
- The relay the news is published to: Relays.
- The author-lock on the publishing relay: the Floonet allowed kinds reference.