Public: anyone can read this; the crew can change it.
An admin pauses and resumes a webhook from the terminal's webhook list with `p`, and a paused hook gets no deliveries #8088
An admin can now pause and resume a webhook from the terminal's webhook list with p, and a paused hook is sent nothing. tsc, scripts/gate.ts, and the webhooks, tui-hooks, mcp-size, event-audience and parity tests pass. I did not run scripts/design-lint.ts, because nothing under src/web/ changed.
stopped parked by the crew deploy 2f8bfc5
3 earlier comments
An admin can now pause and resume a webhook from the terminal's webhook list with p, and a paused hook is sent nothing. tsc, scripts/gate.ts, and the webhooks, tui-hooks, mcp-size, event-audience and parity tests pass. I did not run scripts/design-lint.ts, because nothing under src/web/ changed.
- Core:
setWebhookActive(db, repoId, hookId, active)insrc/core/webhooks.tsreturns false for a hook of another repository.Webhookalready carriedactive, andenqueueForEventalready skipped inactive hooks, so nothing else changed there. - Action:
pauseWebhookinsrc/actions/repos.tschecks the actor administers the repo and appendswebhook.pausedorwebhook.resumedto the bus. It sits next todeleteWebhook. I also added the two events' wording tosrc/design/activity.ts. - Terminal: on the list screen only (the Deliveries screen is untouched),
ptoggles the selected hook for anyone the screen already allows. A paused row readspausedin place of its last delivery, and the key binding is listed in the help. - Tests:
test/webhooks.test.ts: a paused hook enqueues nothing, a hook of another repository is refused, and after resume a new event is queued while the one from the paused time is not.test/tui-hooks.test.ts:ppressed twice, with both events checked.
I did not touch the API or MCP; test/mcp-size.test.ts still passes.
I did not rebase on #8075, which also edits src/core/webhooks.ts and hooks.ts. My changes are confined to a new function and the list screen, so the two should merge cleanly.
I made no code fix for the failed check, because I couldn't reproduce the failure. the crew section: admin only, and an agent made on the web lives in test/web-apps.test.ts, a file this pull doesn't touch, and it passed on all four local runs, including the last one after merging main. It looks like a flaky test, though I haven't proven that.
I merged origin/main into the branch and pushed (c1428bf8) so the check runs again. I merged rather than rebased because a rebase would need a force push, which is refused here. Locally, tsc is clean and 42 tests pass across test/webhooks.test.ts, test/tui-hooks.test.ts and test/web-apps.test.ts.
If that test fails again on the new run, the log should show which assertion fails. It needs a person, or another pull, to look at it, since nothing in this pull reaches it.
The failing check was not caused by this change, and I changed no code to fix it. Shard 43 was killed after 40 s while running test/tui-runwords.test.ts, a test of how runs read in the terminal. This pull touches only the webhooks list, so it never goes near that screen. The log reports "0 failed" across all 11,652 tests, which fits a load kill rather than a failing test.
Run alone here, test/tui-runwords.test.ts passes in 1.2 s. With test/tui-hooks.test.ts and test/webhooks.test.ts that is 34 tests, all passing, and bun x tsc --noEmit is clean. I did not run bun scripts/gate.ts or the rest of the suite.
I pushed an empty commit to trigger the forge's check again. If shard 43 is killed again, the cause is that test's runtime under load on the check machine, not this pull.
What this pull does
- An admin pauses or resumes a webhook from the terminal's webhooks list with
p. - A paused hook gets no deliveries.
- The change is in
src/actions/repos.ts,src/core/webhooks.ts,src/design/activity.tsandsrc/tui/screens/hooks.ts, with tests intest/tui-hooks.test.tsandtest/webhooks.test.ts.
Parked by the crew: the check stayed red through 2 automatic tries: MCP backups > a listing that fails is a short sentence with no key in it
An admin can now pause and resume a webhook from the terminal's webhook list with
p, and a paused hook is sent nothing.tsc,scripts/gate.ts, and the webhooks, tui-hooks, mcp-size, event-audience and parity tests pass. I did not runscripts/design-lint.ts, because nothing undersrc/web/changed.setWebhookActive(db, repoId, hookId, active)insrc/core/webhooks.tsreturns false for a hook of another repository.Webhookalready carriedactive, andenqueueForEventalready skipped inactive hooks, so nothing else changed there.pauseWebhookinsrc/actions/repos.tschecks the actor administers the repo and appendswebhook.pausedorwebhook.resumedto the bus. It sits next todeleteWebhook. I also added the two events' wording tosrc/design/activity.ts.ptoggles the selected hook for anyone the screen already allows. A paused row readspausedin place of its last delivery, and the key binding is listed in the help.test/webhooks.test.ts: a paused hook enqueues nothing, a hook of another repository is refused, and after resume a new event is queued while the one from the paused time is not.test/tui-hooks.test.ts:ppressed twice, with both events checked.I did not touch the API or MCP;
test/mcp-size.test.tsstill passes.I did not rebase on #8075, which also edits
src/core/webhooks.tsandhooks.ts. My changes are confined to a new function and the list screen, so the two should merge cleanly.Closes #8082