From a599b34e38941915fa8674feff7ef16069ac9a81 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Fri, 18 Sep 2026 05:38:41 -0700 Subject: [PATCH] Spec topic metadata columns Define four-column topics page behavior across client, indexer, and DB: topic name, time since most recent post, post count, and follower count. By specifier. --- .../specs/topic-metadata-columns.feature | 44 ++++++++++ psf-memo-db/specs/topic-metadata.feature | 84 +++++++++++++++++++ .../specs/topic-metadata-indexing.feature | 78 +++++++++++++++++ specs/feature-backlog.md | 12 ++- 4 files changed, 217 insertions(+), 1 deletion(-) create mode 100644 psf-memo-client/specs/topic-metadata-columns.feature create mode 100644 psf-memo-db/specs/topic-metadata.feature create mode 100644 psf-memo-indexer/specs/topic-metadata-indexing.feature diff --git a/psf-memo-client/specs/topic-metadata-columns.feature b/psf-memo-client/specs/topic-metadata-columns.feature new file mode 100644 index 0000000..e8ede7d --- /dev/null +++ b/psf-memo-client/specs/topic-metadata-columns.feature @@ -0,0 +1,44 @@ +# Scenarios: Topic Metadata Columns - 1, Topic Metadata Columns - 2, Topic Metadata Columns - 3 +# +# The topics page renders one row per topic with four columns: the topic name, +# the time since the topic's most recent post, the post count, and the follower +# count. The relative time is computed from the API's lastSeen timestamp (epoch +# milliseconds) against the current time: +# - no posts -> "No posts" +# - less than an hour -> "Less than an hour ago" +# - under 24 hours -> "N hours ago" (1 hour ago when singular) +# - 24 hours or more -> "N days ago" (1 day ago when singular) +Feature: Topic Metadata Columns + + Scenario Outline: Topic Metadata Columns - 1 the topics page shows each topic's post count and follower count + Given the psf-memo-db API serves a topic named "" with posts + And the topic "" has followers + When I open the topics page + Then the topics page shows the topic "" with posts + And the topics page shows the topic "" with followers + + Examples: + | room | postCount | followerCount | expectedPostCount | expectedFollowerCount | + | bitcoin | 42 | 17 | 42 | 17 | + | cash | 7 | 3 | 7 | 3 | + + Scenario Outline: Topic Metadata Columns - 2 the topics page shows the most recent post in hours or days + Given the current time is 1800000000000 + And the psf-memo-db API serves a topic named "" with 1 post + And the topic "" was last posted at + When I open the topics page + Then the topics page shows the most recent post for the topic "" as "