Skip to content

Stream

The main reading view: every item of the sources a user follows, newest first (SI-528). Code: apps/web/src/lib/stream/, services in packages/core/src/services/items.ts. In the app: Stream (/).

What it shows

Each item is a card:

  • the image: from the feed, the content or the article’s page, served from Hotaru’s own cache (images.md)
  • the source with its favicon
  • how long ago it was published (“5 min ago”, “3 h ago”, then a date)
    • for an item whose feed gives no date: when Hotaru found it (“Added 4 min ago”). The stream sorts it by that time, as other readers do; items.undated records it.
  • the title, and the AI summary (summaries.md), or the feed’s excerpt when there is none
  • up to three keywords, each a link to the stream filtered by it (keywords.md)
  • a video badge for YouTube: the duration, “Short” or “Live” (youtube.md). Users can hide Shorts and live streams under Appearance → YouTube

Read items fall back into the dark. The selected item carries the focus light.

List, grid or masonry

The switch next to the filter (or g, which goes list, grid, masonry, list) shows the cards in one column, in a grid across the full width of the page, as many columns as fit (at least 19rem each), or as a masonry wall of images. The choice belongs to the device, like the text size: the desktop can show a grid while the iPad keeps the list. It’s stored in localStorage and applied before the first paint, so the page never jumps from one to the other. On a phone one column fits either way, so the switch is hidden there.

In the grid, a card lays itself out by its own width (a container query): the source line takes the full width, the actions sit at the bottom, and the cards of a row line up. j and k still move in reading order, left to right, then down.

The masonry (SI-552) is for looking rather than reading, for example at a topic such as Art or Architecture. Code: Masonry.svelte, MasonryTile.svelte.

  • Images at their own shape, untinted, in as many columns as fit (at least 14rem each). Very tall or wide images are cut to 1:2 or 2:1. An item without an image is a small text tile: source, title, summary.
  • Hover, focus or j/k raises a panel over the image’s lower part: the source and time, the title, three lines of the summary and the scores. A click opens the reader.
  • On a touch screen (no hover, as on the iPad) the first tap raises the panel, the second opens the reader. A tap elsewhere lowers it.
  • The filters stay. The layout belongs to the device, not to the address, so switching keeps the view, the tag, the keyword or topic, the order and the score bounds.
  • Fast with hundreds of images. Each item goes into the shortest column when it arrives and stays there, so loading a page further down never moves the tiles above. The columns are measured, not every tile. Images load lazily, and off-screen tiles skip layout and paint (content-visibility). The next page loads while the end is within 1,600 px, also when a page of tiles is too short to push the end away. With 400 items (5 columns, 19,000 px) the wall loaded in under a second, and scrolling it from top to bottom kept every frame at 16.7 ms, with no long tasks, in Chromium on a desktop. The 172 images it loaded on the way averaged 58 KB.
  • The server renders the list; the browser builds the masonry once the page runs, since only it knows the device’s layout and width. Until then the list is hidden, so it doesn’t flash up.
  • Tested on the iPad’s screen size, touch and lack of hover in Chromium, not yet in Safari on an iPad.

Not yet, for the masonry: image sizes aren’t stored, so a tile is 4:3 (16:9 for a screenshot) until its image loads and can then grow or shrink, moving the tiles below it in its column. Tiles load the same 1,200 px images as the cards; a smaller size for tiles may follow if they prove heavy on an iPad.

Unread is the default; All (/?show=all) includes read items; Starred (/?show=starred) is described below.

Items a filter rule mutes are in no view but Starred, nor in any count (filters.md). Items the AI gate filtered out are in neither Unread nor All, nor in their counts. The “3 filtered out” link beside the count opens Filtered (/?show=filtered): those items, newest first, each with the reason (gate.md).

The header with the counts and the filters stays under the band while the stream scrolls, so Mark all as read and the filters are always at hand. Cards go under it: a card counts as read on scroll once it passes under the header, and j/k stop a card just below it. On a phone the title scrolls away and only the row of controls stays; Mark all as read is its check icon there.

Filter by tag

The tag menu next to the filter keeps the items of the sources with one tag (tags.md): /?tag=<tag id>, with Unread and All (/?show=all&tag=<tag id>). Switching between Unread and All keeps the tag; All tags removes it. The menu lists only the tags with something to show in the view: in Unread, tags with unread items, within the score bounds; in All, tags with any item. The chosen tag stays in the list even when its items run out. The list is worked out when the page loads (streamTagIds()). The count says where it counts (“12 unread in “Tech””), and so do the “new items” pill and Mark all as read, which then marks only the items of those sources. Starred shows every starred item, so it has no tag menu. A tag that no longer exists shows the whole stream. The first page (30 items) comes from the server. Later pages load from /api/v1/stream well before the reader reaches the end. Off-screen cards skip layout and paint (content-visibility): with 1,200 cards loaded, scrolling stayed at 60 frames per second.

Filter by keyword or topic

A keyword chip on a card or in the reader opens the stream filtered by that keyword: /?keyword=<keyword id>, with Unread and All, on top of a tag and the score bounds (keywords.md). The header says so (“3 unread about “Svelte””) next to a chip whose cross removes the filter. The unread count, the “new items” pill and Mark all as read keep to it. Starred and Filtered show every item of theirs. A keyword that no longer exists shows the whole stream.

Topics in the lede picks a topic, the AI’s group of keywords, or one of its keywords: /?topic=<topic id> keeps the items with any keyword of the topic, the same way (“12 unread in “Art””).

Sort and filter by score

The order beside the count (“Newest first”) orders Unread and All for you (ranking.md), or by Signal, Facts or least Hype, instead of by date, and keeps only items with scores in chosen bounds (“Signal 50+”, “Hype ≤ 25”). Cards show the three scores as small bars. The choice is in the address, applies to the counts, the pill and Mark all as read, and stays when switching between Unread and All. scores.md.

Dates

How dates are written is a setting under Appearance → Dates, for the whole account. It applies everywhere: cards, the reader, search, Sources, the settings pages and the tooltips with the full date. Code: apps/web/src/lib/dates.ts.

Format Older item Older item, other year Tooltip
Automatic (default) Nov 3 Nov 3, 2025 Monday, November 3, 2025 at 2:05 PM
European 3.11. 3.11.2025 Monday, 3.11.2025, 14:05
US 11/3 11/3/2025 Monday, 11/3/2025, 2:05 PM
ISO 11-03 2025-11-03 Monday, 2025-11-03 14:05

Automatic follows the browser’s language (the example is English). Items from the last week stay relative (“5 min ago”, “2 d ago”) in every format.

The server renders the dates too, so it must write the same text as the browser:

  • It is stored per account (user_settings.preferences.dateFormat), not per device.
  • For Automatic, the server takes the locale from the Accept-Language header and hands it to the browser with the page data. Both format with that locale.
  • Dates are shown in the browser’s time zone. The browser stores it in the hotaru-tz cookie, and the server renders in that zone. Without the cookie (the first visit), the server uses its own zone, and the page switches to the browser’s after it loads.
  • The European, US and ISO formats are put together from the date’s parts, not from a locale’s pattern, so they don’t change with the ICU version of Node or the browser.

Reading

Opening an item shows it in the reader: its full content (feed HTML, sanitized when it was fetched) or, when the feed only has an excerpt, the excerpt, a Load full article button and a link to the original (below). The reader opens over the stream with shallow routing, so closing it (Escape, or Stream) returns to the same scroll position. /items/<id> also works on its own, in a new tab or as a link.

A YouTube item plays in the reader: the thumbnail with a play button, and the player only after a click (youtube.md).

Article styles. Feed content and full articles share one stylesheet, prose.css. Feeds and Readability wrap the text in <div>s at any depth, so the spacing applies at every level: each block after another gets space above it. Headings have more space above than below. Images and videos are at most as wide as the column. Code blocks and tables scroll inside the column, so the page never scrolls sideways. SVG diagrams, which are drawn for a white page, get a light ground.

Cleaning. Feed content and full articles are cleaned when they’re stored (cleanHtml() in normalize.ts): no scripts, styles or classes. It also drops empty paragraphs, turns a <picture> into its image, takes lazy-loaded images from data-src, turns emoji images into the character, and moves YouTube players to youtube-nocookie.com.

When an item counts as read is a setting under Appearance → Reading, for the whole account:

  • When I open it (default): in the reader, or on the original site.
  • When I scroll past it: a card counts as read once it leaves the top of the screen. The page collects these and sends them in batches (every 1.5 s, and when the tab is hidden or closed).

Mark all as read marks everything up to the newest item on the page, and the older items below it that aren’t loaded yet; with a tag, only the items of its sources. Items that arrived after the page loaded stay unread, even when their feed dates them older. Then the stream loads again from the top: in Unread the read items are gone, and the late items show.

Full article

Many feeds only send a teaser. Load full article in the reader (or f) fetches the item’s page and extracts the article with Readability, the library behind Firefox’s reader view (SI-568). Code: feeds/extract.ts and services/full-article.ts.

  • The reader offers it below the text when the item has less than 1,500 characters of text. For longer items it’s a button in the toolbar, for feeds that cut articles off further down.
  • The article is cleaned like feed content and replaces the teaser on the item (items.content, with content_extracted_at). Items are shared, so every reader of the source gets it, and it’s fetched once. Under the article, the reader says where it came from.
  • It counts only when the page has a real article: at least 500 characters of text, and at least 20% more than the feed had.
  • When it fails, the reader says why and links to the original, with Try again. The reason is stored on the item (extraction_error), so it still shows after a reload. The reasons: the page couldn’t be loaded (with the HTTP status), it isn’t a web page, the site redirects to a cookie-consent page, no article was found (often a paywall or a login), or the page has no more text than the feed (link posts). Messages never name an address.
  • After 90 days the retention prunes it like feed content. The button then loads it again.

Always load the full article is a switch per source, in the source’s editor on Sources. New items of that source get their article when they arrive: the 10 newest per fetch from the last 14 days, unless the feed’s text is already 3,000 characters or more. The article’s page also gives the card its image, so no second page is fetched for it (images.md). Older items load on request.

What to expect: of 21 teaser-only feeds among 30 well-known feeds in English and German, 17 gave the full article. Two were link blogs whose pages really have no more text. Two (golem.de, derstandard.at) redirect to a cookie-consent page. Paywalled sites (NYTimes, Spiegel+) give only the free part.

Starred

Star an item with the star on its card, in the reader, or with s. Starring an item that is already starred keeps the time of the first star.

Starred (/?show=starred) lists the starred items, most recently starred first. It keeps items of sources that are paused or no longer followed: a star is a choice to keep the item, and its content is never pruned (retention). Unstarring there leaves the card in place until the next load, so a slip is undone with one more press.

Starred feed

The starred items as a private Atom feed at a secret URL, for n8n and other feed readers (SI-529). It replaces the Inoreader bookmark feed. Turn it on under Settings → Starred feed (/settings/feed), copy the URL, and give it to the tool.

  • The URL is the key. It opens without a login. Anyone with it can read the feed, so it goes only to tools you trust. The URL is shown once, when it’s made. Only a hash of its token is stored (feed_tokens), the same as for API tokens.
  • New URL makes a new token. The old URL stops working at once and answers 404, the same as one that never existed. Turn off deletes the token.
  • Contents: the 50 most recently starred items, with title, link, author, excerpt, full content and the source’s name. An item without a link of its own links to its reader view in Hotaru.
  • Dates: each entry is dated when it was starred, not when it was published. Tools such as n8n pick up new entries by date, so an old article starred today has to count as new. For the same reason there is no <published>: rss-parser, which n8n uses, reads it before <updated>.
  • Polling: the feed sends an ETag. A reader that sends it back gets 304 Not Modified while nothing changed. The settings page shows when a reader last fetched the feed.

To switch n8n over, replace the Inoreader feed URL in the flow’s RSS Read or RSS Feed Trigger node with the starred feed’s URL.

Touch

On touch screens, pulling down at the top of the page does what r and Escape do (code: lib/gestures/):

  • In the stream, it refreshes: the stream loads again from the top, with the new items, and in Unread without the items read since the page loaded (also those read on another device). Read marks still waiting to be sent go out first. In Starred it reloads the list.
  • In the reader (and on /items/<id>), at the top of the article, it goes back to the stream.

A light comes down with the finger, against growing resistance. It turns on past the threshold, and letting go then does the action. A shorter pull does nothing. It works only for touch, at the very top, and not while a dialog is open or, in the stream, while the reader is open.

The listeners are passive, so scrolling never waits for them. Instead, the page (or the reader) turns off native overscroll (overscroll-behavior-y: none): at the top, a pull moves only the light. No rubber band, and no browser pull to reload, which would reload the whole app.

Votes

Every card and the reader have two buttons: More of this (thumbs up) and Less of this (thumbs down), or + and - on the selected item (SI-544). Pressing the vote an item already has takes it back. Voting on a card selects it, as the other card buttons do.

After a downvote, the card (or the reader) asks why, once: Not my topic, Bad source or Clickbait. Answering is optional: Skip, or no answer at all, leaves the vote without a reason. The thumbs-down button’s name then includes the reason (“Less of this: Clickbait”).

Votes are stored per user and item on user_items: vote (1, -1, 0 for none), vote_reason (only on a downvote) and voted_at. Any vote other than a downvote drops the reason. A vote doesn’t change the order at once. Once a day, the feedback loop (SI-546) nudges the item’s keyword and source weights from it and proposes larger changes, and recent votes go to the gate as examples of your taste (feedback.md).

Keyboard

The shortcuts of the stream, the reader and the app. Press ? in the app for this list. Shortcuts pause while you type in a field or a dialog is open.

Key Action
j / k Next / previous item (in the reader: the next or previous item’s content)
o or Enter Open the selected item in the reader
v Open the original in a new tab
f Load the full article (in the reader)
s Star
+ / - More / less of this (votes)
c Send to the agent chat (chat.md)
b Save to Raindrop; Shift + B always asks for the collection and tags (raindrop.md)
m Mark as read or unread
Shift + A Mark all as read
r Load new items
g Switch between list, grid and masonry
Escape Close the reader
1 2 3 Stream, Sources, Stats
4 5 6 Stories, Views, Settings
/ Search (search.md)
? All shortcuts

Touch screens: pull down at the top of the page.

Live updates

New items arrive over server-sent events. When the fetcher stores new items, it tells every subscriber’s open pages through an in-process event bus (streamEvents in events.ts). /api/v1/events forwards these as items events. The page doesn’t add items on its own. It asks /api/v1/stream/new how many arrived since it loaded, and shows a “12 new items” pill. The pill reloads the stream from the top.

  • Arrival, not publish date: an item a feed delivers today but dates last week still counts as new (user_items.created_at, index user_items_arrived_idx).
  • No missed counts: the page asks again after a reconnect and when it becomes visible, so a sleeping iPad or a server restart never leaves the count wrong.
  • Bursts: an import sends hundreds of events a minute. The page asks for the count at most every two seconds.
  • Proxies: the endpoint sends a comment every 25 seconds and X-Accel-Buffering: no, so reverse proxies neither close nor buffer it.

The event bus lives in the one app process (ADR-0001). Items written by another process, such as the pnpm feeds fetch CLI, don’t send events. Open pages see them after their next reconnect or wake-up.

API

All endpoints need a session or an API token, except the starred feed. Changes need a write token. The SDK has a method for each (@hotaru/sdk).

Endpoint SDK What it does
GET /api/v1/stream?cursor=&unread=true&tag=&keyword=&topic=&limit=30 stream() A page of the stream, newest first, with nextCursor and unreadCount. With tag (a tag’s id), only items of sources with that tag, and their unread count; with keyword (a keyword’s id), only items with it; with topic (a topic’s id), only items with one of its keywords (topics.md). With sort, minSignal, minFacts, maxHype: by score and within bounds (scores.md); sort=foryou ranks for you, each item with its rank (ranking.md)
GET /api/v1/stream?starred=true&cursor= stream({ starred: true }) A page of the starred items, most recently starred first, with starredCount
GET /api/v1/stream/new?since=<ISO date>&tag=&keyword=&topic= newItems() How many items arrived since then; with tag, from sources with that tag; with keyword, with that keyword; with topic, with one of its keywords; with score bounds, in them
POST /api/v1/stream/read { upTo?: cursor, arrivedBy?, tag?, keyword?, topic?, minSignal?, minFacts?, maxHype? } markAllRead() Marks everything up to and including that position read; without upTo, every unread item. With arrivedBy (ISO 8601), only items that had arrived by then; with tag, only items of sources with that tag; with keyword, only items with it; with topic, only items with one of its keywords; with score bounds, only items in them
GET /api/v1/items/:id item() One item with its full content
POST /api/v1/items { url } addLink() Adds a link to your stream by hand; it goes through the pipeline. 201, or 200 with created: false when you added it before (source-types.md)
PATCH /api/v1/items/:id { read?, opened?, starred?, vote?, voteReason?, storySplit?, labels? } updateItem() Marks it read or unread, starred or not. opened: true: you opened it, a real read for the stats (stats.md); it marks the item read too. labels: your Signal / Facts / Hype (labels.md). vote: 1, -1 or 0 (none); voteReason (topic, source, clickbait, or null) only with a downvote (votes). storySplit splits it from its story or puts it back (dedupe.md)
GET /api/v1/items/:id/transcript transcript() A video’s transcript, { transcript, wordCount }. 404 when it has none. The item says hasTranscript (youtube.md)
POST /api/v1/items/:id/full-article loadFullArticle() Replaces the teaser with the full article and answers with the item. 422 with the reason when there’s none
POST /api/v1/items/read { itemIds, read } markRead() Up to 500 items at once
GET /api/v1/events — Server-sent events: items with { count }
GET /feeds/starred/<token> — The starred feed (Atom). No session or API token: the token in the URL

A cursor is <publishedAt ms>_<itemId>, the position of the last item of the previous page. In the Starred list it is <starredAt ms>_<itemId>. In a stream sorted by a score or for you it starts with the order’s key: <key>:<publishedAt ms>_<itemId> (scores.md, ranking.md).