panel-redesign: Server pages and Help on the kit; the help drawer is gone

Stage 2, step 6. Written by Sonnet, reviewed by Opus.

  - Six pages named after their mockups: system-log, backup, users,
    user, user-delete, help, with typed page data (view/server.go,
    help.go), fixtures and tests. The old templates of the six are gone
    (user_form.html, encrypt_fields.html deleted, the others rewritten)
    and their names are off legacy_pages.txt, which now holds mail_queue
    alone.
  - Help is six help_topic blocks (checks, certificate, rdns, dns, apps,
    limits); a test renders every fixture page and fails on a Help link
    without a topic. The help drawer (help_drawer.html and its includes
    in layout_legacy.html) is removed; its rules in legacy.css go with
    the next step.
  - The user form sets the user's e-mail (plan, Account e-mail): create
    and update, validated, and a changed address resyncs DMARC for a
    user whose default is the account e-mail - through the helper the
    Account profile now shares.
  - Handlers pass typed data; routes, POST targets, field names,
    validation and authorization are unchanged. A test loads the user
    form for four reach combinations and for the only global user, posts
    it back untouched and finds the user unchanged.

Fixed on the way
  - The user delete confirmation said the domains were not affected. A
    domain that follows the user's default report address is left with
    none; the page names those domains now.
  - A refused backup lost the encryption choice and printed a literal
    <code> element in its message.

Differences from the mockups, for the owner:
  - Help has no DMARC and no Inbound topic: its outline fixes two boxes
    of three topics, although other mockups link to #dmarc and #inbound.
    Until the owner decides, Account's Help link goes to #dns and the
    inbound MX box has none;
  - system log: newest line first, as drawn; "refreshes on its own" (5 s
    active, 30 s idle); only status=, warning: and error: lines are
    coloured;
  - backup: the file field is a plain file input; the encryption box is
    ticked, as drawn and as on the domain export, so a plain download
    means unticking it first;
  - users: an E-mail column; the flash does not name the user;
  - user form: no lead; the domain lists are no longer hidden by script
    when Global is chosen (the server ignores them for that role).

Evidence
  - docs/assets/panel-redesign/evidence/system-log.png, backup.png,
    users.png, user.png, user-delete.png, help.png: 1440 px wide,
    headless Edge, real templates served locally with their fixtures -
    NOT from the container (no Docker on this machine).
  - panel/audit.js on the six pages at 1440 and 1280: 720 texts checked,
    problems: [].
  - The system log's polling swap was not exercised in a browser; it
    uses the mechanism of Overview and Health.
  - go test -count=1 ./internal/web/... ./cmd/panel
      ok  internal/web
      ok  internal/web/auth
      ok  internal/web/handlers
      ok  internal/web/validate
      ok  internal/web/view
      ok  cmd/panel

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mix
2026-10-10 02:14:25 +03:00
co-authored by Claude Opus 5.5
parent 610023ef6a
commit fa696efa8b
37 changed files with 1896 additions and 537 deletions
+21 -58
View File
@@ -1,62 +1,25 @@
{{/* Help (mockup help.html): one topic per heading, stacked in two boxes, with a
menu that jumps to each. A box on another page links to the topic that
explains it by the topic's id (Box.Help). Overview is absent for a viewer
who does not see the pages it explains. */}}
{{define "content"}}
<h1>Help</h1>
{{template "page_head" .Head}}
<p class="muted">Short operator notes inside the panel — not a second copy of
the full guide. The cards keep their readings and controls; this page (and the
drawer opened from each card's «?») holds the explanations that do not belong
on the card itself.</p>
<div class="card">
<h2>On this panel</h2>
{{if .IsGlobal}}
<ul>
<li><label for="help-status">Status checks</label> — Machine, TLS, PTR,
queue</li>
<li><a href="/outbound/queue">Mail queue retries</a> — time-based, no attempt
budget (on the queue page)</li>
{{if .InboundEnabled}}
<li><a href="/inbound/domains">Inbound</a> — not mailboxes; listed recipients or any
address at the domain</li>
{{end}}
</ul>
{{end}}
<p class="muted">Domain page</p>
<ul>
<li><label for="help-dns">DNS status</label></li>
<li><label for="help-records">DKIM and SPF records</label></li>
<li><label for="help-dmarc">DMARC record</label></li>
<li><label for="help-connection">Connection settings</label></li>
<li><label for="help-apps">Applications</label></li>
<li><label for="help-domain-settings">Domain settings</label></li>
<li><label for="help-export">Export domain</label></li>
</ul>
<p class="muted">Topics marked as labels open the same text in the help
drawer. For installation, backup, and environment variables see the
<a href="{{.SourceURL}}/blob/main/docs/guide.md">operator
guide</a> in the repository.</p>
</div>
{{if .IsGlobal}}
<div class="card">
<h2>Machine</h2>
<p>CPU and memory are the container's own readings, not the host's spare
capacity. Network is a short window, not a daily total. High CPU with an empty
queue usually means something else on the box — not SelfPost being slow to
send.</p>
</div>
<div class="card">
<h2>TLS certificate</h2>
<p>Port 465 presents the certificate the reverse proxy (or the image)
mounted. The panel does not issue certificates. A warn here is expires soon;
an error is missing or unreadable, and clients will refuse submission.</p>
</div>
<div class="card">
<h2>Hostname / reverse DNS</h2>
<p>Forward-confirmed reverse DNS: the A/AAAA for
<code>SELFPOST_HOSTNAME</code> must reverse to that same name. PTR is set at
the hosting provider, not in this panel.</p>
<div class="columns">
<div class="column is-3">
{{template "side_menu" .Menu}}
</div>
<div class="column is-9">
{{if .ShowOverview}}
{{template "box_open" .Overview}}
{{range .OverviewTopics}}{{template "help_topic" .}}
{{end}}
{{template "box_close"}}
{{end}}
{{template "box_open" .Outbound}}
{{range .OutboundTopics}}{{template "help_topic" .}}
{{end}}
{{template "box_close"}}
</div>
</div>
{{end}}
{{end}}