Skip to content

fix: implement batch of specs (emails, incidents, Pushover, port fields, bug report, Discord) - #500

Merged
fclairamb merged 60 commits into
mainfrom
fix/batch-2026-10-09-specs
Oct 9, 2026
Merged

fclairamb merged 60 commits into
mainfrom
fix/batch-2026-10-09-specs

Conversation

@fclairamb

Copy link
Copy Markdown
Owner

Summary

Implements the 8 specs of the 2026-10-09 batch (specs archived to specs/done/2026/10/), plus the specs from #496 and #497.

  • Gmail Android dark mode: owned link colors, full-bleed phones, flat light surfaces
  • Check deletion resolves incidents with a check_deleted resolution, one notification, backfill migration 027_v0_39_0
  • Pushover canonical user_key/api_token, startup backfill, INTEGRATION_MISCONFIGURED, settings drift guard (also fixes ntfy)
  • Port fields: defaults, chips, host:port paste, no error before input
  • Bug report: mobile annotation, inline text, charts in screenshot, pen/highlight/blur/redo, select, viewport crop
  • First-setup secrets saved (SMTP password, JWT secret, inbox password), live email config for test mail
  • Discord webhook-only delivery and webhook URL validation
  • Discord setup docs and redirect URI panel, SP_DISCORD_REDIRECT_URL removed

Breaking changes

  • Saving a Discord integration with a non-Discord webhook_url returns 400.
  • Server-side check form errors show only after the field is touched or the form is submitted.
  • SP_DISCORD_REDIRECT_URL is ignored (startup warning).

Operator actions

  • Add the second Discord redirect URI in the Discord portal.

The Gmail device-matrix rows in wiki/features/email-dark-mode.md still need a human with a phone.

Closes #492
Closes #493
Closes #494
Closes #495

🤖 Generated with Claude Code

fclairamb and others added 30 commits October 3, 2026 16:30
One-way Slack incoming webhook, restricted to hooks.slack.com, seeded in the default and critical severities for new orgs.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Slack (webhook) type in the new-integration picker, form, icon, labels and
all four locales; create errors now show the server's validation reason.
Docs section and Playwright coverage. CHANGELOG is left to release-please.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
List slack-webhook in the MCP list_integrations type filter and assert it in the severity seeds test.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The new-integration page derives its type from ?type= (validated against
ALL_TYPES), Cancel in a form returns to the picker, and the two Teams
tiles read Teams (webhook) and Teams (bot).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Three specs from a self-hoster's report:
- 02: secret fields (SMTP password, JWT secret, inbox password) are
  dropped on first save; test mail ignores env overrides.
- 03: Discord webhook delivery was removed in #409 but the UI and docs
  still offer it. Bring it back as the no-bot fallback.
- 04: bot install uses a second redirect URI the public docs never list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… Android dark mode

Closes #492. Pin left as light only; device matrix rows left for the owner.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…mail Android dark mode

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… to names and domains

Check names, region names and the demoted custom domain are free text that
Gmail can auto-link, so they now go through nolink in the HTML content blocks.
Adds tests for the dark .fallback colour, nolink and custom-domain-demoted.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…mail Android dark mode

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ail Android dark mode

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…check_deleted

Every deletion path (org deletion, test API, the checks service) now goes
through one rule: the DB-layer DeleteCheck soft-deletes the check and
resolves its active incidents with resolution_type = 'check_deleted' in the
same transaction. Migration 027 backfills existing orphans, resolved as of
the check's deleted_at. A result in flight when its check was deleted no
longer opens or reopens an incident on it.

Refs #493

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e-check delete

checks.Service.DeleteCheck no longer resolves incidents itself (the DB
layer does). It lists them first and, through the new
CheckDeletedIncidentNotifier (incidents.Service, wired on the HTTP, MCP and
background-job checks services), cancels their pending escalation steps and
emits one incident.resolved with resolution_type check_deleted. Org deletion
sends nothing.

Every sender words that resolution as "check deleted", never "recovered";
webhook payloads gain incident.resolutionType. The notification job may load
a soft-deleted check only for a check_deleted incident. Tests cover org
deletion, the test API reset and bulk delete, the escalation step, the
in-flight result race and every sender.

Refs #493

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The incident timeline's Resolved entry reads "Closed because the check was
deleted" for a check_deleted resolution (en, fr, de, es), the incident type
accepts the new value, and the incidents docs describe the rule.

Refs #493

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…very deletion path, with a check_deleted resolution type

Closes #493

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…get their own test code

The Pushover sender read userKey/apiToken while the dashboard wrote
user/token and the secret registry encrypted user_key/api_token, so every
dashboard-created Pushover integration failed before reaching the API.
The sender now reads the canonical user_key/api_token pair and falls back to
both legacy pairs until the startup backfill has run.

ntfy had the same drift: it now reads the form's server_url, priority and
the registry's auth_token, with serverUrl/accessToken as fallbacks.

Missing-setting sender errors are now ConfigError values matching
notifications.ErrIntegrationMisconfigured. The integration test endpoint
reports them with code INTEGRATION_MISCONFIGURED and missingSetting.

Refs #494

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fclairamb and others added 22 commits October 9, 2026 17:40
…port paste, no error before input

Closes #495

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…chips, no spinner, host:port paste, no error before input

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…en/highlight/blur, redo, colors, select/move/delete, viewport crop

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… limited: no mobile annotation, window.prompt for text, charts missing, few tools

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…irst setup (SMTP password, JWT secret, inbox password)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… resolves

Discord integrations on an instance without the bot accepted a webhook URL
and then failed every test and alert with "no default channel configured".
The sender now posts an embed to the webhook (wait=true, one retry on 429,
5xx retryable) when no bot destination resolves, and returns a config error
that says what to do when there is neither. The webhook URL is validated on
save: only discord.com / discordapp.com (and canary/ptb) webhook URLs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…le and URL validation

The Discord settings panel shows a Discord webhook placeholder. The E2E suite
creates a webhook-only Discord integration on a bot-less instance and checks
a non-Discord URL is rejected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…RL and then never deliver

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…op SP_DISCORD_REDIRECT_URL

The field and system parameter were read and never used. Setting the env var
now logs a startup warning.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…cation setup

Dashboard shows login and install redirect URIs plus the interactions URL with
copy buttons, warns on a default localhost base URL, docs list every portal
value.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…id OAuth2 redirect_uri" on self-hosted instances

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The touched-field gating (port fields spec) hid the server's tunnelCheckUid
finding because region checkboxes carry no id or name. Toggling a region now
counts as touching the tunnel field.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@fclairamb
fclairamb enabled auto-merge (squash) October 9, 2026 17:47
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.72340% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.68%. Comparing base (71588ac) to head (d12edd3).

Files with missing lines Patch % Lines
server/internal/credmigrate/pushover.go 86.20% 12 Missing ⚠️
server/internal/notifications/discord_webhook.go 85.48% 9 Missing ⚠️
server/main.go 0.00% 8 Missing ⚠️
...erver/internal/handlers/incidents/check_deleted.go 80.00% 5 Missing ⚠️
server/internal/app/server.go 77.77% 4 Missing ⚠️
server/internal/handlers/incidents/service.go 60.00% 4 Missing ⚠️
server/internal/email/sender.go 80.00% 3 Missing ⚠️
server/internal/db/postgres/postgres.go 92.85% 2 Missing ⚠️
server/internal/db/sqlite/sqlite.go 92.85% 2 Missing ⚠️
server/internal/handlers/checks/service.go 92.85% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #500      +/-   ##
==========================================
+ Coverage   82.57%   82.68%   +0.10%     
==========================================
  Files        1167     1174       +7     
  Lines      120960   121363     +403     
==========================================
+ Hits        99887   100345     +458     
+ Misses      21066    21011      -55     
  Partials        7        7              
Files with missing lines Coverage Δ
server/internal/config/config.go 92.89% <100.00%> (+0.05%) ⬆️
server/internal/config/discord_oauth.go 100.00% <100.00%> (ø)
server/internal/db/models/incident.go 100.00% <ø> (ø)
server/internal/db/models/integration.go 71.94% <ø> (ø)
server/internal/email/formatter.go 86.71% <100.00%> (+1.44%) ⬆️
server/internal/handlers/auth/discord_service.go 80.51% <100.00%> (ø)
server/internal/handlers/integrations/service.go 76.72% <100.00%> (+0.27%) ⬆️
server/internal/handlers/system/service.go 68.26% <100.00%> (+0.59%) ⬆️
server/internal/integrations/discord/service.go 75.07% <100.00%> (ø)
...erver/internal/integrations/discord/webhook_url.go 100.00% <100.00%> (ø)
... and 34 more

... and 16 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

fclairamb and others added 2 commits October 9, 2026 21:15
The main Playwright suite now takes ~41 min alone, so the job was cancelled
inside the session-continuity side-car step after every test had passed.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@fclairamb
fclairamb merged commit 03be40c into main Oct 9, 2026
23 checks passed
@fclairamb
fclairamb deleted the fix/batch-2026-10-09-specs branch October 9, 2026 20:20
@fclairamb fclairamb mentioned this pull request Oct 9, 2026
fclairamb added a commit that referenced this pull request Oct 9, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.38.1](v0.38.0...v0.38.1)
(2026-10-09)


### Bug Fixes

* implement batch of specs (emails, incidents, Pushover, port fields,
bug report, Discord)
([#500](#500))
([03be40c](03be40c))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment