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

A post in the feed shows how many replies it has, and the count links to the thread #14570

opened this

Check · Review · Land · Live — No review yet. Next: reviewer, no review yet.

Ready to land

A feed post about an issue or pull now shows a quiet "3 replies" link (or "1 reply") to its thread, and nothing at zero. I ran the new test file and four neighbouring feed suites (card markup, like, journey, fold), all green. The tsc and design-lint output was cut off by the timeout, so those two are unconfirmed.

Notes · 5 files · +163 −1

look green — its preview answered, ready for a look deploy 3d7876d

Check passeddeploy 3d7876d

Website spec: 26 findings (report only)

This pull asks to reach lab--forge-trevato-apps.open-platform.sh. Its preview and check reach what main reaches; the new host opens when the pull lands.

Look

10 pages beside main · 0 new to this pull

/apps

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 3d7876d ·

/docs

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 3d7876d ·

/explore

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 3d7876d ·

/looks/failed

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 3d7876d ·

/looks/missing

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 3d7876d ·

/nope/nothing

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 3d7876d ·

/notes

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 3d7876d ·

/releases

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 3d7876d ·

/review

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 3d7876d ·

/security

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 3d7876d ·

opened this

A feed post about an issue or pull now shows a quiet "3 replies" link (or "1 reply") to its thread, and nothing at zero.

I ran the new test file and four neighbouring feed suites (card markup, like, journey, fold), all green. The tsc and design-lint output was cut off by the timeout, so those two are unconfirmed. I did not run the whole suite.

What moved

  • src/feed/replies.ts is new. repliesOf(db, posts) counts comments for a whole page with one grouped query, keyed by repository and issue number. It counts conversation comments only, not review lines, and does it for pull and tell posts whose link is a thread in the post's own app. A post about a run, a map or another app's thread gets no count.
  • src/feed/feed.ts: decorate fills each item's new replies field, next to settled state and steps.
  • src/feed/rank.ts: FeedItem gains an optional replies, absent at zero.
  • src/web/studio/feed.ts: the post card renders the link above the like bar, pointing at permalinkOf(item.link), so any comment anchor is dropped.
  • test/feed-reply-count.test.ts has five tests: a count that matches the comments, zero hidden, a post about a non-thread getting none, the link target and wording, and the query count. The query test wraps db.query and shows 1 post and 30 posts both use one query.

Chose not to

  • Posts of kind reply (a comment shown as a post) get no count, to avoid repeating the thread's number under every comment.
  • I touched nothing else in the feed, so #14480 and #14516 should not conflict.
  • No new dependency.

To try Open /feed and find a post about an issue or pull that has comments. Its "N replies" link goes to the thread.

The pre-push hook refused the first push until a commit said how to try the change, so the branch carries an empty "Try:" commit.

Closes #14555

6 earlier comments
commented

A feed post about an issue or pull now shows a quiet "3 replies" link (or "1 reply") to its thread, and nothing at zero.

I ran the new test file and four neighbouring feed suites (card markup, like, journey, fold), all green. The tsc and design-lint output was cut off by the timeout, so those two are unconfirmed. I did not run the whole suite.

What moved

  • src/feed/replies.ts is new. repliesOf(db, posts) counts comments for a whole page with one grouped query, keyed by repository and issue number. It counts conversation comments only, not review lines, and does it for pull and tell posts whose link is a thread in the post's own app. A post about a run, a map or another app's thread gets no count.
  • src/feed/feed.ts: decorate fills each item's new replies field, next to settled state and steps.
  • src/feed/rank.ts: FeedItem gains an optional replies, absent at zero.
  • src/web/studio/feed.ts: the post card renders the link above the like bar, pointing at permalinkOf(item.link), so any comment anchor is dropped.
  • test/feed-reply-count.test.ts has five tests: a count that matches the comments, zero hidden, a post about a non-thread getting none, the link target and wording, and the query count. The query test wraps db.query and shows 1 post and 30 posts both use one query.

Chose not to

  • Posts of kind reply (a comment shown as a post) get no count, to avoid repeating the thread's number under every comment.
  • I touched nothing else in the feed, so #14480 and #14516 should not conflict.
  • No new dependency.

To try Open /feed and find a post about an issue or pull that has comments. Its "N replies" link goes to the thread.

The pre-push hook refused the first push until a commit said how to try the change, so the branch carries an empty "Try:" commit.

commented

<!-- look-pages ba0db98e430d --> Look pages for ba0db98, 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

A feed post about an issue or pull now shows its reply count, linked to the thread. That count and link were already on the branch; this push adds only the two commit-message lines the gate asked for.

The failing check was the gate's rules "both doors" and "pipeline first". Both accept an override line in a commit message, so I added an empty commit carrying them:

  • No door: The reply count is a link on an existing feed post, not a new surface, so it gets no terminal screen or docs/features how-to.
  • Direction: This is the small reader-facing change that #14555 asks for, so it goes ahead of the pipeline items.

After the commit, bun scripts/gate.ts printed only the inferred look-pages notice, which is information and not a failure. I did not rerun tsc or the tests, since no code changed. To try it, open /feed on the preview, find a post about an issue that has comments, and follow its "N replies" link.

commented

<!-- look-pages 6e478069141f --> Look pages for 6e47806, 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

The gate's look-pages note was only an inference: it pictured 31 pages because their routes import src/web/studio/feed.ts. I narrowed it to / with a Looks: / line in a new empty commit (no code change). The gate now reports "look pages (named)" for /.

  • Why /: The feed post with its reply count shows on the home page, so one picture covers the change.
  • Not /feed: A first commit named /feed, but the gate rejected it because /feed isn't in app.looks in forge.json. Both commits are on the branch; only the second one counts.
  • What I didn't change: No code or forge.json change, since this only narrows which pages are pictured. I didn't rerun tsc or the tests, and I haven't seen the forge's verdict on this push yet.
commented

<!-- look-pages 3d7876d5eec3 --> Look pages for 3d7876d, from the gate:

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

Nothing to change: this comment is the gate reporting that it will picture /, as the Looks: / line in my last commit asked. It makes no request, so I made no new commit and pushed nothing.

The branch is unchanged at 3d7876d.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs