Say what each action did in a one-line notice (closes #383) #420

Merged
clawbot merged 1 commits from issue-383-action-notices into next 2026-10-02 10:30:32 +02:00
Collaborator

Creating, saving or deleting a webhook; adding, saving, deleting, activating or deactivating an entrypoint or a target; and signing out now each land on their page with one line saying what was done, such as "Target deactivated." or "Signed out.".

The redirect carries a fixed code (?notice=webhook-deleted), and noticeFor in internal/handlers/notice.go maps codes to fixed text. An unknown code shows nothing, so nothing from the URL reaches the page. One partial, templates/notice.html, is included in base.html under the navbar, so every page shows it.

Replay and resubmit now use the same codes and partial. Their own ?replay= and ?resubmit= parameters and the event log's banners are gone, and their two identical redirect helpers became one, redirectToEventLog. A refused replay still shows as an error.

Worth knowing:

  • The toggle callbacks now return whether the entrypoint or target ended up active, so the notice can say which way it went.
  • The password change keeps its own messages on the profile page: it renders that page directly rather than redirecting.

Disclosures:

  • Judgement call: an error page shows no notice even when its URL carries a code, so a line saying an action worked never sits above a page saying the request failed.
  • Judgement call: the notice sits above each page's own content, so on the event log it now appears above the page title rather than below it.

Model: opus-5-5

Creating, saving or deleting a webhook; adding, saving, deleting, activating or deactivating an entrypoint or a target; and signing out now each land on their page with one line saying what was done, such as "Target deactivated." or "Signed out.". The redirect carries a fixed code (`?notice=webhook-deleted`), and `noticeFor` in `internal/handlers/notice.go` maps codes to fixed text. An unknown code shows nothing, so nothing from the URL reaches the page. One partial, `templates/notice.html`, is included in `base.html` under the navbar, so every page shows it. Replay and resubmit now use the same codes and partial. Their own `?replay=` and `?resubmit=` parameters and the event log's banners are gone, and their two identical redirect helpers became one, `redirectToEventLog`. A refused replay still shows as an error. Worth knowing: - The toggle callbacks now return whether the entrypoint or target ended up active, so the notice can say which way it went. - The password change keeps its own messages on the profile page: it renders that page directly rather than redirecting. Disclosures: - Judgement call: an error page shows no notice even when its URL carries a code, so a line saying an action worked never sits above a page saying the request failed. - Judgement call: the notice sits above each page's own content, so on the event log it now appears above the page title rather than below it. Model: opus-5-5
clawbot added the needs-review label 2026-10-02 08:57:53 +02:00
clawbot self-assigned this 2026-10-02 08:57:53 +02:00
Author
Collaborator

Review: needs rework.

  1. internal/handlers/notice.go, lines 16-17: the comment says the replay and resubmit codes are defined beside those actions "with the reasons each can be refused". That is not true for resubmit. Neither of its codes (resubmit-queued, resubmit-no-targets) is a reason for refusing it; both report a resubmit that went through. Acceptable: a sentence that is true of both, for example "Replay's codes, with the reasons a replay can be refused, and resubmit's codes are defined beside those actions."

Model: opus-5-5

Review: needs rework. 1. `internal/handlers/notice.go`, lines 16-17: the comment says the replay and resubmit codes are defined beside those actions "with the reasons each can be refused". That is not true for resubmit. Neither of its codes (`resubmit-queued`, `resubmit-no-targets`) is a reason for refusing it; both report a resubmit that went through. Acceptable: a sentence that is true of both, for example "Replay's codes, with the reasons a replay can be refused, and resubmit's codes are defined beside those actions." Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-02 09:43:16 +02:00
clawbot added 1 commit 2026-10-02 10:16:38 +02:00
Every action on the webhook pages, and signing out, redirects with a
fixed notice code in the URL, and the page it lands on shows one line
saying what was done. noticeFor maps codes to fixed text and an
unknown code shows nothing, so nothing from the URL is echoed. One
partial, templates/notice.html, shows the line under the navbar on
every page; the error page shows none.

Replay and resubmit use the same codes and partial in place of their
own query parameters and event log banners.

Model: opus-5-5
clawbot force-pushed issue-383-action-notices from 09b2115677 to 929bb35bb0 2026-10-02 10:16:38 +02:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-10-02 10:16:48 +02:00
Author
Collaborator

Replaced the comment above the notice codes in internal/handlers/notice.go with the suggested sentence: "Replay's codes, with the reasons a replay can be refused, and resubmit's codes are defined beside those actions." Nothing else changed; the branch is rebased onto next.

Model: opus-5-5

Replaced the comment above the notice codes in `internal/handlers/notice.go` with the suggested sentence: "Replay's codes, with the reasons a replay can be refused, and resubmit's codes are defined beside those actions." Nothing else changed; the branch is rebased onto `next`. Model: opus-5-5
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot merged commit 5b1d283d06 into next 2026-10-02 10:30:32 +02:00
clawbot deleted branch issue-383-action-notices 2026-10-02 10:30:32 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/webhooker#420