Repository source: docs/concepts/post_presentation.md
Post presentation and visibility
Purpose: Present public contributions with existing author attribution, readable content and links to their source conversation.
Scenario: A Recent preview reuses shared author/time metadata and plain-text title/excerpt handling, then links to the thread, anchored to the reply; a post whose thread is unavailable links to its own page. Visible replies can remain readable after their thread root becomes unavailable; the preview does not expose excluded root text.
Signals: Every thread root and reply card carries one server-rendered line, Liked by a, b, c +N · Flagged by d · Title set by e, naming the reactions the score counts and the identity behind the current title; it is hidden when empty and identical for every viewer, and the viewer's own saved, counted reaction appends their name in place.
Sources: signals partial (source unavailable), signal actors (source unavailable), Recent entry (source unavailable), renderer metadata helpers (source unavailable), title handling (source unavailable), thread reader (source unavailable), Recent eligibility (source unavailable).
Boundary: Recent does not change attribution, approval, post deletion or retraction policy. Profile-history counting rules are not a public-contribution membership filter.
Records (2026-11-14): with FORUM_POST_RECORDS_ENABLED, a post page ends with a collapsed list of the records that target it; see post record list.
Activity (2026-11-14): with FORUM_THREAD_ACTIVITY_DRAWER_ENABLED, a thread page moves unanswered hashtag-only replies out of the conversation and lists them, with each post's likes and flags, in a collapsed drawer; see thread activity.
Thumbnails: on the board's list rows and Recent rows, a post with a stored attached image shows it as a small thumbnail as tall as the row, linking where the title does. The page's image references come from one lookup by post ID; a retracted post, a missing file, images turned off (FORUM_IMAGE_CONTENT_ENABLED), or list thumbnails turned off (FORUM_LIST_THUMBNAILS_ENABLED) show none. The whole image is shown, letterboxed rather than cropped. Rows link small cached copies (fitting 64 x 128 px, plus a 2x copy) at /images/thumbs/<sha256>-<size>.<ext> (1x, 2x), generated with GD on first request into <image root>-thumbs and served only while the original is present; without GD, or when the original is already that small, the original is used. Sources: list thumbnails (source unavailable), row thumbnail (source unavailable), thumbnail store (source unavailable).
Gallery: /gallery/ lists the same posts as Recent that carry a stored image, newest first, as tiles in justified rows that keep each image's proportions (clamped between 0.6 and 2.2). A tile shows a preview, the thread title and the thread's reply count, and opens the post in its thread. Previews are the thumbnail store's tile copies (fitting 480 x 480 px) at /images/thumbs/<sha256>-tile.<ext>, generated and served like row thumbnails. The page and its nav item follow FORUM_IMAGE_GALLERY_ENABLED, which requires image attachments. Sources: gallery (source unavailable), thumbnail store (source unavailable).
Zen gallery: /gallery/?view=zen presents the Zen strip collection as thread links. It uses the same card as the homepage feature, with an uncropped responsive image or a title when no image is available. Sources: gallery (source unavailable), Zen meme card (source unavailable).
Formatting: full-post views render a post's body according to its recorded format (post body formatting); previews, quotes and titles always use plain words.
Resolution: on a reply in a thread whose tag unlocks a state (tagset), the card wraps its content in <details>; resolved and closed replies fold to one line (state, author, date, first words) that expands on tap, also without JavaScript.
Pledges (2026-11-16): with FORUM_PLEDGES_ENABLED, a campaign thread's opening post is followed by a totals block, and each reply with a pledge: line shows its amount, or why it is not counted, under its body; see pledge campaign.
Ported (2026-11-19): a ported post's byline is "name on Hacker News", with the site linked to the original (ported_from), and the time it was written there (ported_created_at). A ported thread's page shows replies as a tree (reply tree (source unavailable)), each reply under the post it answers, indented up to six levels; same-author merging is off there. Other threads stay flat. The read model stores that byline as author_label, so every view shows it, offline included. A ported post has no identity, so it never links to or counts toward a profile. Recent lists a ported thread by its root only. See ported thread.