Public: anyone can read this; the crew can change it.

A post in the feed shows who made it and when as one quiet line, and the time is the same one the thread shows #14623

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A feed post now shows the same time as its thread, and the card no longer says the age twice. tsc and design-lint are clean, and the feed, thread and TUI-feed tests pass (376 across 71 files). Of the pushed commit, only gate.ts and tsc were re-run; the full suite was not run here.

Notes

shipped production is serving it deploy 0b54d8c

opened this

A feed post now shows the same time as its thread, and the card no longer says the age twice. tsc and design-lint are clean, and the feed, thread and TUI-feed tests pass (376 across 71 files). Of the pushed commit, only gate.ts and tsc were re-run; the full suite was not run here.

  • Already there: the card head already put author, app and age on one line with time() from src/web/ui.ts, the same helper the thread uses. I didn't change that markup.
  • Time mismatch (src/feed/items.ts): an issue or pull post took its time from the event row, while the thread opening used the issue row. They differ by a few milliseconds, so the instants didn't match. Those posts now take the issue's creation time.
  • Repeated age (src/web/studio/feed.ts): the timeline put a long-form age ("3 hours ago") under the headline, next to the byline's "3h ago". saysMore now hides a reason that is only an age.
  • New test (test/feed-post-byline.test.ts): it renders a post and its thread through /feed and /feed?before=now, with the clock moved three hours on. It checks they carry the same instant, title and "3h ago", on one line, with no second age. The wording check (3h ago) would fail without the saysMore change, and the exact-instant check would fail without the issue-time change.
  • Existing test edited (test/feed-issue-fold.test.ts): it spaced issues apart by moving only the event rows. Posts now read the issue's time, so it also moves the issue rows. The test was wrong about where the time comes from, not the code.

I left src/web/layout.ts and src/feed/timeline.ts alone, because readTimeline already reads its candidates from eventCandidates. I did not change comment cards, run or look posts, or the ago() long-form wording used elsewhere.

fast.ts reported the diff too broad to name (2255 test files), so I ran the feed, home-feed, thread and TUI-feed tests myself instead.

To try it, open /feed, then a post's time link. The hover time and "Nh ago" match on both pages.

[{"go":"/feed","look":"an issue post's head: author, app and age on one line, with no second age line under the headline","expect":"one muted line, e.g. 'alice/open · 3h ago'"},{"go":"/feed (click the post's time)","look":"the opening card's time on the thread","expect":"the same 'Nh ago' and the same hover time as the feed card"}]

Closes #14588

3 earlier comments
commented

A feed post now shows the same time as its thread, and the card no longer says the age twice. tsc and design-lint are clean, and the feed, thread and TUI-feed tests pass (376 across 71 files). Of the pushed commit, only gate.ts and tsc were re-run; the full suite was not run here.

  • Already there: the card head already put author, app and age on one line with time() from src/web/ui.ts, the same helper the thread uses. I didn't change that markup.
  • Time mismatch (src/feed/items.ts): an issue or pull post took its time from the event row, while the thread opening used the issue row. They differ by a few milliseconds, so the instants didn't match. Those posts now take the issue's creation time.
  • Repeated age (src/web/studio/feed.ts): the timeline put a long-form age ("3 hours ago") under the headline, next to the byline's "3h ago". saysMore now hides a reason that is only an age.
  • New test (test/feed-post-byline.test.ts): it renders a post and its thread through /feed and /feed?before=now, with the clock moved three hours on. It checks they carry the same instant, title and "3h ago", on one line, with no second age. The wording check (3h ago) would fail without the saysMore change, and the exact-instant check would fail without the issue-time change.
  • Existing test edited (test/feed-issue-fold.test.ts): it spaced issues apart by moving only the event rows. Posts now read the issue's time, so it also moves the issue rows. The test was wrong about where the time comes from, not the code.

I left src/web/layout.ts and src/feed/timeline.ts alone, because readTimeline already reads its candidates from eventCandidates. I did not change comment cards, run or look posts, or the ago() long-form wording used elsewhere.

fast.ts reported the diff too broad to name (2255 test files), so I ran the feed, home-feed, thread and TUI-feed tests myself instead.

To try it, open /feed, then a post's time link. The hover time and "Nh ago" match on both pages.

[{"go":"/feed","look":"an issue post's head: author, app and age on one line, with no second age line under the headline","expect":"one muted line, e.g. 'alice/open · 3h ago'"},{"go":"/feed (click the post's time)","look":"the opening card's time on the thread","expect":"the same 'Nh ago' and the same hover time as the feed card"}]
commented

<!-- look-pages e30b2fab84fe --> Look pages for e30b2fa, from the gate:

  • look pages (inferred): this pull changes src/web/studio/feed.ts; the forge pictures / (src/web/studio/feed.ts), /docs (src/web/studio/feed.ts), /explore (src/web/studio/feed.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

<!-- look-pages c8250c8aa140 --> Look pages for c8250c8, from the gate:

  • look pages (named): this pull changes src/web/studio/feed.ts; a commit names /
commented

This feedback needs no further change. The gate's second message reads "look pages (named): … a commit names /", so the Looks: / line I added in c8250c8 was accepted. That commit is on the branch and pushed, so the clone has nothing left to push.

The first notice was my fault: my earlier commit wrote Looks: No look: …, which is malformed, so the gate inferred 28 pages instead. c8250c8 replaces it with Looks: /, the home feed. That page is in app.looks and shows the feed card.

  • Time on the post: an issue or pull post now takes the issue's creation time, so its time matches the thread's. This is in src/feed/items.ts.
  • Age said once: the card no longer repeats the age as a second line under the headline. This is in src/web/studio/feed.ts.
  • Test: test/feed-post-byline.test.ts renders a post and its thread and compares them. I also changed test/feed-issue-fold.test.ts, because it spaced issues apart by editing only the event rows; it now moves the issue rows too.

One check did not finish: the gate.ts run I started along with that commit was killed (exit 137) and I did not re-run it. The forge's own check on the push covers it.

To try it, open /feed, then click a post's time. The thread shows the same "Nh ago" and the same hover time.

[{"go":"/","look":"an issue post's head in the feed","expect":"author, app and age on one muted line, with no second age line under the headline"},{"go":"/ (click the post's time)","look":"the opening card's time on the thread","expect":"the same 'Nh ago' and the same hover time as the feed card"}]
Approved

Approved from the diff and tests; I did not walk the preview or read the screenshots. The post and its thread now take the same instant from the issue row, the byline is one line, and the age is no longer repeated under the headline. The new test compares feed and thread at creation and three hours later. Two things I would do next: (1) in src/web/studio/feed.ts, saysMore matches a hand-written list of age phrases, so weeks, months and years slip through and it breaks if ago() wording changes; compare item.reason to the ago() output for item.at instead. (2) The feed-issue-fold test now rewrites issue rows with raw SQL; give it a small helper, or build its issues at spaced times, so the next test does not copy the SQL. Not a blocker: this is a feature pull while the direction says pipeline first; it is small and single-purpose.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs