panel-redesign: three things the first look at the deployed panel showed

Seen by the owner on the test server, on real data (2026-10-10).

  - Overview's Processes card said "7 of 7 running" with six programs
    running and postfix-reload idle. The card counts the programs that
    are meant to stay up; a one-shot helper (health.Process.OneShot) is
    left out of both numbers and named only when it is in trouble.
  - The Milter sockets card clipped its second line ("OpenDKIM,
    send-log,...") once the spam filter was the third socket. The line
    names the sockets that do not answer when some do not; with all
    answering it is their names, or "incl. the spam filter" - the
    mockup's words - when the filter is among them.
  - A real 2048-bit DKIM value did not fit the three rows of its field
    and scrolled inside it. The field is as tall as the value needs
    (3 to 12 rows).

The fixtures had a shortened key, two sockets and no one-shot program,
so none of this showed in the evidence screenshots.

  go test -count=1 ./internal/health/... ./internal/web/...: ok

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mix
2026-10-10 23:39:39 +03:00
co-authored by Claude Opus 5.5
parent ce41a8cf34
commit baa053d250
7 changed files with 97 additions and 14 deletions
+16 -1
View File
@@ -145,11 +145,26 @@ func applyCheck(r *Record, c DNSCheck, standing Text, mismatch Text) {
}
}
// dkimRows is the height of the field that shows a DKIM value: enough lines for
// the whole key, so the field does not scroll inside itself. A 2048-bit key is
// about 410 characters; a line of the field holds some 80 of them at the
// narrowest width the page is drawn for.
func dkimRows(value string) int {
rows := (len(value)+79)/80 + 1
if rows < 3 {
return 3
}
if rows > 12 {
return 12
}
return rows
}
// DKIMRecord is the DKIM record to publish: the key is not a secret, and the
// selector says which one it is.
func DKIMRecord(selector, host, value string, c DNSCheck) Record {
r := Record{Name: "DKIM", Note: Rich("Not a secret · selector ", Code(selector)),
Host: host, Type: "TXT", Value: value, ValueRows: 3}
Host: host, Type: "TXT", Value: value, ValueRows: dkimRows(value)}
applyCheck(&r, c, nil, nil)
return r
}