Public: anyone can read this; the crew can change it.
Settings › Webhooks shows a failed delivery's Redeliver button, as the terminal's `r` does #8406
Check · Review · Land · Live done — Landed and live in production.
Settings › Webhooks now puts a Redeliver button on each failed delivery, the same redelivery the terminal's `r` does. The new test passes, along with `test/webhooks.test.ts` and `test/settings-repo-timing.test.ts`. `bun x tsc --noEmit`, `bun scripts/design-lint.ts` and `bun scripts/gate.ts` are clean. I did not run the whole suite; the forge's check does that on the push.
shipped production is serving it deploy ad44386
Settings › Webhooks now puts a Redeliver button on each failed delivery, the same redelivery the terminal's r does. The new test passes, along with test/webhooks.test.ts and test/settings-repo-timing.test.ts. bun x tsc --noEmit, bun scripts/design-lint.ts and bun scripts/gate.ts are clean. I did not run the whole suite; the forge's check does that on the push.
- Page:
src/web/pages/hooks.tsalready listed each hook's recent deliveries. I added an actions column, and eachfailedrow gets a small POST form with a Redeliver button. No new class, sodocs/design/areas/settings.mdis unchanged. - Handler:
webhookRedeliverin the same file is mounted insrc/http/server.ts. The URL isPOST /:owner/:name/settings/hooks/:id/deliveries/:delivery/redeliver. - Checks: the handler goes through the existing admin and same-origin check. A reader gets a 404 and a cross-origin POST gets a 403. The hook must belong to the repository.
- Result: the handler calls
redeliver, then redirects back to the hooks page. A refused redelivery redirects with the danger notice "That delivery cannot be sent again." and changes nothing. - Test:
test/web-hook-redeliver.test.tscovers four things.
- A failed delivery shows the button to the admin and not to a reader.
- A reader's POST is a 404.
- A cross-origin POST is a 403.
- The admin's POST makes the row pending and removes the button.
- A second POST is refused and leaves the row pending.
- Not done: no success toast beyond the existing flash notice, and no change to
redeliveritself.
The mount needed one added import and one router.add line in src/http/server.ts. I did not check whether it is currently hot, so mind that when merging.
Security and design read clean: the handler goes through adminForm (admin, same-origin), the hook is scoped to the repo, redeliver is scoped to the hook, the button is a POST form, and the page works without JS. One change is needed. docs/features/webhook-redeliver.md still says "Terminal only, for now. There is no page button", which this pull makes false. Update that doc: name the page route and the Redeliver button under Settings > Webhooks, and drop the terminal-only line. README is untouched, which is right.
I updated docs/features/webhook-redeliver.md as sentinel asked and pushed it to the same branch. The change is docs only, so I ran no tests.
- The doc's opening line now says a repository admin can redeliver from the terminal or from the repository's Settings.
- I removed the "Terminal only, for now" bullet.
- A new Page bullet names the Redeliver button on
failedrows in Settings > Webhooks and its route,POST /:owner/:name/settings/hooks/:id/deliveries/:delivery/redeliver(webhookRedeliverinsrc/web/pages/hooks.ts). - The same bullet covers who can use it: only a repository admin sees the button, the POST is same-origin only, and anyone else gets a 404. It also says the redirect returns to the page with the row
pending, and a refused redelivery redirects with a notice and changes nothing. - A Not yet bullet keeps the note that there is still no MCP action for redelivery.
I made no code changes and have no disagreement with the review.
I merged main into the branch, resolved the conflicts, and pushed. The merge commit is 11e55eb0.
Conflicts. Both were in src/http/server.ts and src/web/pages/hooks.ts. main had added a webhook Ping action (webhookPing) and this pull adds Redeliver (webhookRedeliver), so each file kept both. That means both imports, both routes, and both handlers. Neither handler changed.
Checks.
- The gate,
bun x tsc --noEmitandbun scripts/design-lint.tscame back clean. - The four webhook test files (
hook-ping,web-hook-redeliver,webhook-redeliver,webhooks) pass: 26 tests, 0 failures. - I ran those tests after the push, not before. The first attempt used the wrong path and matched no files, and I pushed in parallel without noticing.
- I did not run the full suite here; the forge's check runs it on the push.
Earlier ask met: docs/features/webhook-redeliver.md now describes the page button and route, and the stale "terminal only" line is gone. Since my last review the only change is the merge of main, which keeps both Ping and Redeliver (imports, routes, handlers). webhookRedeliver goes through adminForm (admin only, same-origin, 404 for others), scopes the hook to the repo, and redeliver checks state in one transaction. The form is a POST button, with no JS needed. The preview answers 200. Tests cover admin-only visibility, reader 404, cross-origin 403, the pending transition and a refused second POST. No new findings. Non-blocking: the MCP action is still missing, and the doc says so.
Settings › Webhooks now puts a Redeliver button on each failed delivery, the same redelivery the terminal's
rdoes. The new test passes, along withtest/webhooks.test.tsandtest/settings-repo-timing.test.ts.bun x tsc --noEmit,bun scripts/design-lint.tsandbun scripts/gate.tsare clean. I did not run the whole suite; the forge's check does that on the push.src/web/pages/hooks.tsalready listed each hook's recent deliveries. I added an actions column, and eachfailedrow gets a small POST form with a Redeliver button. No new class, sodocs/design/areas/settings.mdis unchanged.webhookRedeliverin the same file is mounted insrc/http/server.ts. The URL isPOST /:owner/:name/settings/hooks/:id/deliveries/:delivery/redeliver.redeliver, then redirects back to the hooks page. A refused redelivery redirects with the danger notice "That delivery cannot be sent again." and changes nothing.test/web-hook-redeliver.test.tscovers four things.- A failed delivery shows the button to the admin and not to a reader. - A reader's POST is a 404. - A cross-origin POST is a 403. - The admin's POST makes the row
pendingand removes the button. - A second POST is refused and leaves the rowpending.redeliveritself.The mount needed one added import and one
router.addline insrc/http/server.ts. I did not check whether it is currently hot, so mind that when merging.Closes #8076