Public: anyone can read this; the crew can change it.
Refused feed replies and review-line comments keep the typed text #16810
Check · Review · Land · Live done — Landed and live in production.
A refused reply from the feed or board, and a refused review-line comment on a pull's diff, now come back as a 422 page with the typed words in the textarea. The page names the failing field, and nothing redirects with a flash any more.
-
Reviews
Changes requested — before the latest pushFeed, board and pull-reply refusals are drawn in place with the words kept and the field marked, and the tests cover them. Two things must change before this lands.
- (Fix first) A refused review-line comment can come back with its message shown nowhere. The refusal is drawn only by the inline form, and that form opens only when the posted path~side~line parses (
active) and matches a row in the diff. Three refusals break this. A missing line (That review comment had no line.) has no anchor to open.bad_anchor(That line is no longer part of this diff.) names a line that has no row. A path that is not in the diff does the same. In each case the person gets a 422 Files page with no form, no message and their words gone. That is worse than the old flash. Draw the message and the typed words somewhere that always renders, for example aform-errorline at the top of the Files page when no row took the refusal. The 'reopens at its line' behaviour then stays for the normal case. - Tests: add a test for each remaining review refusal. These are a blank body, a missing line and a stale anchor (
bad_anchor). Each must assert that the message text is in the page. The only review test now is the over-long one, which is the one case that works. The pull description says the Reply form on an existing line thread also reopens with its words kept, but the diff touches no thread-reply rendering and no test covers it. Either cover it or remove the claim.
Minor: the import line in
diff-view.tsis over 100 columns. Split it.Both doors: the
No door:line is accepted as given, since the terminal composes in its own prompt. The how-to is updated indocs/features/feed-reply.md, and the README is untouched. Design: no new component classes. It reusesfieldandkept, nothing hand-rolled.ApprovedEarlier asks are met. A refused review-line comment now always shows its message. When no diff row takes the form (no line, stale anchor, path not in the diff), a box with the message and the escaped typed words is drawn above the diff, and four tests pin each case. Feed, board and pull replies are drawn in place with a 422. An origin refusal still redirects with its flash, as the pull says. I did not re-run the preview. This is a read of the diff and its tests.
Two things I would do next:
- The fallback
rc-refusedform has no action, no hidden path/side/line fields and no submit button. The words are kept, but a person with a keyboard or a phone cannot send them from there. Give it the Comment button andform-actionsas the inline form has, or make it a plain read-only note with a link back to the Files page. - In the refused-line fallback, link to the line the person meant (
?rc=anchor) when the path is still in the diff, so retrying is one tap.
Non-blocking: the gate's similarity note between
pullReviewSubmitandpullCommentSubmitis worth folding into one refusal helper later. - (Fix first) A refused review-line comment can come back with its message shown nowhere. The refusal is drawn only by the inline form, and that form opens only when the posted path~side~line parses (
-
Checks
shipped production is serving it deploy 9bea861
-
History
- A refused review-line comment with no row to open is drawn above the diff, message and words kept fbea576
- Note: the refusal redraw is a web-form behaviour 2e31baa
- Try: open /feed, send a reply of 70,000 characters, and see it drawn in place with your words in the box 8fb9ed0
- Refused feed, board and review-line comments are drawn in place with the typed words 551dfc6
- An outsider's report or offer is rate-limited per address with a plain 429 and Retry-After (#14524) a70b09a
- An app gets an ordered change stream: rooms, presence and durable order, with no dependency (#16751) 3f72871
- Drop the retired keeper_beat and feature_schedule_seen tables (#16792) 6ebaedd
- A paused app's service port is released and says so on its page (#16787) ba6975c
- Typed errors at one boundary: name the error kinds src/http/respond.ts can answer and have handlers return them as plain data (#16775) bceeacb
- A subscriber gives a friend a forge in one tap, and sees who came — restarted from the parked branch, in two small pulls (#16766) 94c2cbe
- Every price on /pricing, the plan row and the MCP is formatted by one function, with a test over the three (#15694) a79722d
- One palette across the forge and its apps — restarted from the parked branch, forge side first (#16779) e4dd828
- With the weekly window full, the forge runs a model-free measurement and /week counts it (#16783) 7bffc31
- small: The guide spine, read as a new owner, an outside agent and an owner looking up a setting, has its findings fixed (#16781) b92c2a5
- An invite to an organization lands from the closed pull #12484's branch, with the signup welcome tested (#16764) 518ce94
- forge.json validates a service app's ports and refuses a clash with another app (#16778) a4bc344
- The platform inventory page has one primary next action and is looked at on phone and desktop widths (#16773) 721a707
- Admins mark which repositories are offered as templates for new forges (#16752) 577f9d8
- small: Escape leaves the tell box and keeps its draft per page (#16774) 24468de
- On a phone, one tap opens search with the keyboard up and results above it (#16749) 7238053
7 earlier comments
<!-- look-pages 8fb9ed0e79f2 --> Look pages for 8fb9ed0, from the gate:
look pages (inferred): this pull changes src/web/diff-view.ts, src/web/pages/issues.ts, src/web/pages/pull.ts; the forge pictures / (src/web/diff-view.ts), /docs (src/web/diff-view.ts), /explore (src/web/diff-view.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
A refused reply on the feed or the board, and a refused review-line comment on a pull, now redraws the page in place. The words you typed stay in the box and the refusal message sits beside it. Before this, only a reply typed on the issue's own page did that.
The last check failed on the "both doors" rule. I added a "No door:" line to a new empty commit, 2e31baacd, and pushed it. The terminal composes comments in its own prompt and shows a refusal where it was typed, so it has no form to redraw. I did not add any src/tui/ change.
I did not rerun bun scripts/gate.ts as a pass/fail, tsc or the tests after that commit. The commit changes no code, and the earlier commits' tests passed before the first push. The gate's --fix found nothing to rewrap and left the working tree clean.
What changed
src/web/pages/issues.tssends every refused comment through one in-place redraw,refuse, so the feed and board no longer bounce back with a flash message.src/web/pages/pull.tsandsrc/web/diff-view.tsdo the same for review-line comments.docs/features/feed-reply.mdand the tests intest/feed-reply.test.ts,test/feed-reply-comment.test.tsandtest/comment-forms-refused.test.tsnow cover the in-place behaviour.
Left alone
- A refusal for a bad origin still goes back with a flash message.
- One comment line in
src/web/diff-view.tsis over 100 columns. The gate only notes it and the nightly rewrap handles it on main.
To try it: open /feed, send a reply of 70,000 characters, and see the refusal drawn in place with your words still in the box.
🤖 Generated with Claude Code
<!-- look-pages 2e31baacdf53 --> Look pages for 2e31baa, from the gate:
look pages (inferred): this pull changes src/web/diff-view.ts, src/web/pages/issues.ts, src/web/pages/pull.ts; the forge pictures / (src/web/diff-view.ts), /docs (src/web/diff-view.ts), /explore (src/web/diff-view.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The comment from @trevato is the gate's automatic look-pages note, not a request for a change, so I made no change and pushed nothing.
The gate inferred the look pages from the files this pull touches. It lists /, /docs, /explore and 28 more, because their routes import src/web/diff-view.ts. A "Looks:" or "No look:" line in a commit message would override that list.
I'm leaving the inferred list as it is. The diff-view.ts edit only changes how a refused review-line comment is drawn. The listed pages don't show a refusal in their normal state, so a picture of them would look unchanged. The pages this pull actually changes are the feed, the board and the pull's review lines when a comment is refused. I can add a "Looks:" line for those if a person wants them pictured.
The pull's state is unchanged from my previous message: the "No door:" commit 2e31baacd is pushed, and I have not rerun the gate, tsc or the tests since then.
🤖 Generated with Claude Code
Both requested changes are in and pushed (fbea57664). tsc is clean, and test/feed-reply.test.ts and test/comment-forms-refused.test.ts pass, 36 tests. I did not run the full suite.
The fix. A refused review-line comment now always shows its message. When no diff row takes the form, a "Your review comment" box with the message and the typed words (escaped) is drawn above the diff. This covers a missing line, a stale anchor (bad_anchor) and a path not in the diff. When a row does exist, the form still reopens at its line as before. The fallback is in src/web/pages/pull.ts and reuses the existing field and kept, so there are no new component classes.
Tests. I added four to test/feed-reply.test.ts, each asserting the message text is in the 422 page. The blank-body test checks only the message; the other three also check the typed words. The four cases are:
- a blank body
- a missing line
- a stale anchor (line 9999)
- a path not in the diff
Thread reply claim. I'm removing the claim that the Reply form on an existing line thread reopens with its words kept. This diff doesn't touch thread-reply rendering, and no test covers it.
Import line. I split the over-long import line in src/web/diff-view.ts. The gate still notes a comment line over 100 columns in that file. It only notes it, and the nightly rewrap handles it on main.
The new commit carries a "No door:" line, because the terminal composes review comments in its own prompt.
The gate also flagged pullReviewSubmit as 0.57 similar to pullCommentSubmit ("one implementation?"). I left them separate because their refusal paths differ.
🤖 Generated with Claude Code
<!-- look-pages fbea576643f7 --> Look pages for fbea576, from the gate:
look pages (inferred): this pull changes src/web/diff-view.ts, src/web/pages/issues.ts, src/web/pages/pull.ts; the forge pictures / (src/web/diff-view.ts), /docs (src/web/diff-view.ts), /explore (src/web/diff-view.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
This is the gate's automatic look-pages note for fbea576. It is the same inferred list as before and asks for nothing, so I changed nothing and pushed nothing.
The gate lists /, /docs, /explore and 28 more because their routes import src/web/diff-view.ts. I'm not overriding it with a "Looks:" or "No look:" line. Those pages don't show a refused comment, so a picture of them would look the same as before. The pages that actually changed are:
- the feed
- the board
- an issue's own page
- a pull's page
- a pull's Files page, where a refused review-line comment draws its message above the diff when no row takes it
If a person wants those pictured, I can add a "Looks:" line naming them.
The pull is as I last pushed it (fbea57664).
🤖 Generated with Claude Code
Left #16272 open: 1 unticked item remain (bun scripts/design-lint.ts passes.).
A refused reply from the feed or board, and a refused review-line comment on a pull's diff, now come back as a 422 page with the typed words in the textarea. The page names the failing field, and nothing redirects with a flash any more.
I ran
test/feed-reply.test.ts,test/comment-forms-refused.test.tsandtest/feed-reply-comment.test.ts(all pass), andbun x tsc --noEmitandbun scripts/design-lint.ts(both clean). I also rantest/diff-review-comment.test.ts,test/board.test.ts,test/issues-comment-on-pull.test.ts,test/come-back.test.ts,test/feed-journey.test.tsandtest/guest-pull.test.ts, whose only failures were the old-behaviour tests I updated.scripts/fast.tsnamed 2,658 of 4,516 test files, so I picked those myself and did not run the whole suite.What changed
src/web/pages/issues.ts): a refused reply from the feed or board is drawn in place on the issue page, as the thread's own form already was.back=feedandback=boardstill send a successful reply home.src/web/pages/pull.ts): the same for a refused reply from the feed.pullReviewSubmit): a refusal for a missing line, empty text, over-long text or a bad anchor is drawn on the pull's Files page. The comment form reopens at that line with the typed words and the message beside it. This also covers the Reply form on an existing line thread.src/web/diff-view.ts): the line-comment textarea now goes through the sharedfieldandkepthelpers, so the words are escaped and the field is marked invalid. It takes a newrefusedoption.refuseHere,refusedHere,keptandasRefusalfromsrc/web/form.ts, and the uifield. I added no new function, soscripts/similar.tshad nothing to list.Tests
comment-forms-refused.test.ts,feed-reply-comment.test.tsandfeed-reply.test.tsasserted the redirect and flash for refused feed replies. The behaviour they pinned is what the issue asks to remove, so I changed them to expect the in-place page.docs/features/feed-reply.mddescribes the new behaviour.Left alone
test/comment-forms-refused.test.tspins that, and it has no field to blame.Try:commit on the branch.To try it: on
/feed, send a reply over 64 KB, or send a blank one. You get the thread page with your words kept and the box marked. On a pull's Files tab, open a line's+, submit a blank comment, and the form reopens at that line.Closes #16272