monoscope/docs/plans
Anthony Alaribe faa945d61f
Typed handler outcomes: routes list every refusal, handlers return domain values (#797)
* Typed htmx action outcomes: route types list refusals, handlers return domain values

Web.Outcome adds HxPost e a (UVerb: 200 outcome | 422 refusal) and hxAction/hxDone.
AIThreads and the monitor uptime/cron/alert handlers return outcome records and
per-endpoint error sums instead of RespHeaders (Html ()) and Either Text.

* Type /api/v1 refusals and webhook rejections

ApiHandlers' 404/400/401/403 bodies come from one ApiError sum (wire unchanged).
Git.verifyWebhook returns WebhookRejection, so the metric label is a total case
instead of substring-matching the error text.

* Typed outcomes for Projects, Settings, Issues, Dashboards and CodeContext actions

Refusals become per-endpoint sums (ChannelsRejection, TeamRejection, ScrapeRejection,
ErrorPatternRejection, TimelineRejection, WidgetMonitorRejection, MappingRejection, ...)
declared in the route types; success values are records whose HxOutcome owns the
redirect/toast. PagerDuty/Slack integration changes now require edit permission
(they mutated before any role check).

* Typed refusals for bots, GitSync and remaining Pages actions

Slack/Discord answer through one refusal sum each (wire bytes unchanged);
Issues.commandOrigin/incidentChannel return typed errors. GitSync settings render
from a record with a typed failure instead of a Maybe Text message.

* Review fixes: refused assignee saves nothing and resets its select; invalid widget monitor query is a refusal

Also fixes two htmx-4 handlers filtering on detail.successful (never set), so
Remove monitor closes its drawer and the resolve button removes itself again.

* Format with fourmolu 0.19; satisfy hlint

* Name action answers by what they are, not by htmx: Action/act/done, Outcome/Refusal, in System.Types

Web.Outcome's Hx* names read as htmx attributes (hxPost_, HXRedirect). The types
now live beside RespHeaders in System.Types: routes are Action/Unrefusable,
handlers return ActionResult via act/done, Outcome owns body/redirect/toast
(no ToHtml superclass, no NoBody), Refusal owns the message.

* Format with fourmolu 0.19

* Derive standalone instances; widget saves refuse before writing

Widget PUT answered 200 with an empty body (an empty Outcome instance), so the
editor never adopted the saved widget. It now returns a typed WidgetSaved whose
body is the widget and whose toast names the change. Both widget saves validate
everything before writing: an uncompilable monitor query is MonitorQueryInvalid
(compileAlertSql is now total and shared), and a vanished widget is
WidgetNotFound instead of an untyped 404.

Says/Mime via-wrappers replace 17 fixed-message Refusal/Outcome instances and 6
Accept instances; DB, JSON and HTTP codecs derive where the output is
identical; LatencyHist derives via monoidal-containers. Plan in
docs/plans/derive-standalone-instances.md.
History 2026-11-06 15:05:31 +01:00
..
assets Fix dashboard bug reports; exploratory sweep fixes and tests (#618) 2026-10-01 11:56:14 +02:00
2026-09-05-chart-cache-chunks.md Retire Timefusion connections before proxy expiry and refresh stale pools 2026-09-05 23:37:19 +02:00
2026-09-05-streaming-charts.md Stream chart results progressively with cancellation and backpressure 2026-09-05 18:19:10 +02:00
2026-09-25-sentry-parity.md Improved Issue details page (#599) 2026-09-27 00:03:26 +02:00
2026-10-11-repository-capabilities.md Unify repository configuration and sync dashboards and monitors through PRs (#671) 2026-10-11 15:50:53 +02:00
2026-10-22-project-wiki-followups.md Unify autonomous agents across Slack, web and native jobs (#619) 2026-11-02 11:15:00 +01:00
2026-10-30-slack-coworker-agent.md Connecting Slack installs the Slack investigation routine (#793) 2026-11-04 22:35:35 +01:00
derive-standalone-instances.md Typed handler outcomes: routes list every refusal, handlers return domain values (#797) 2026-11-06 15:05:31 +01:00