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

A post in the feed can be replied to in place without leaving the timeline #14114

Merged opened this

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

Merged

Most of this was already on main, so this pull only adds the missing over-long tests. The redirect still goes to /feed, not to the post's place in it, which the third item implies.

Notes

shipped production is serving it deploy 4adf612

opened this

Most of this was already on main, so this pull only adds the missing over-long tests. The redirect still goes to /feed, not to the post's place in it, which the third item implies.

Already on main (#8218, commit 223c8372a):

  • Each feed card has a "Reply or …" form that posts to the existing issue or pull comment action with back=feed.
  • It works as a plain form with no JavaScript: a successful reply redirects to /feed with a "Reply posted." flash. The form is only offered to signed-in viewers who can read the repository, and back is a fixed word, never a URL.
  • test/feed-reply.test.ts already covered a valid reply and an empty reply, on both issues and pulls.

What this pull adds: two tests in test/feed-reply.test.ts for an over-long reply (70,000 characters, over the 65,536 limit) on an issue and on a pull. Each is refused, goes back to /feed with a danger flash, and posts nothing. Both passed on the first run, since the limit was already enforced, so they pin existing behaviour rather than fail without a new change. tsc and the gate are clean. I ran only test/feed-reply.test.ts, which passes, 19 tests.

Left out:

  • Redirect to the post's place: the redirect lands on /feed itself, not on the post's position in it. Cards have no anchor id, and adding one means threading an item id through the form and both handlers.
  • In-place reply: the reply is not inserted into the card without a reload. That would take JavaScript; the redirect with a flash is the no-JS path.
  • src/web/pages/home_flow.ts: left untouched. That file is the lanes dashboard; the feed card lives in src/web/studio/feed.ts.

Closes #14066

1 earlier comment · 1 event
commented

Most of this was already on main, so this pull only adds the missing over-long tests. The redirect still goes to /feed, not to the post's place in it, which the third item implies.

Already on main (#8218, commit 223c8372a):

  • Each feed card has a "Reply or …" form that posts to the existing issue or pull comment action with back=feed.
  • It works as a plain form with no JavaScript: a successful reply redirects to /feed with a "Reply posted." flash. The form is only offered to signed-in viewers who can read the repository, and back is a fixed word, never a URL.
  • test/feed-reply.test.ts already covered a valid reply and an empty reply, on both issues and pulls.

What this pull adds: two tests in test/feed-reply.test.ts for an over-long reply (70,000 characters, over the 65,536 limit) on an issue and on a pull. Each is refused, goes back to /feed with a danger flash, and posts nothing. Both passed on the first run, since the limit was already enforced, so they pin existing behaviour rather than fail without a new change. tsc and the gate are clean. I ran only test/feed-reply.test.ts, which passes, 19 tests.

Left out:

  • Redirect to the post's place: the redirect lands on /feed itself, not on the post's position in it. Cards have no anchor id, and adding one means threading an item id through the form and both handlers.
  • In-place reply: the reply is not inserted into the card without a reload. That would take JavaScript; the redirect with a flash is the no-JS path.
  • src/web/pages/home_flow.ts: left untouched. That file is the lanes dashboard; the feed card lives in src/web/studio/feed.ts.
Approved

Tests only, and honest about it: the reply form and its no-JS redirect are already on main (#8218). These two tests pin the over-long case on an issue and on a pull: refused, danger flash, back to /feed, nothing posted. Small, single-purpose, no new code or dependency. Two things I would do next: (1) give each feed card an anchor id and redirect to it, so a no-JS reply lands at the post's place rather than the top of /feed; (2) confirm the terminal has a reply path for feed items with its docs/features how-to, if it does not already.

commented

Left #14066 open: 1 unticked item remain (works without JavaScript as a plain form with a redirect back to the post's place in the feed).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs