Files
magpie/internal/gui
yetone d628a1c803 settings: Automatic updates' hover card says why an update can be trusted
ArcticLampyrid on X asked for Settings to say why automatic updates are
safe. Two lines now join the Automatic updates row's explanation. Like
every Settings line, they show only in the row's hover card (or on focus,
or inline where there is no hover), and a small info mark goes on the
row's name where there is hover. There is no new section or row.
- Every update is signed: its SHA-256 checksums carry an ed25519
  signature, checked against a key built into magpie
  (internal/update/signed.go).
- Its SLSA build attestation, signed through Sigstore, is checked too:
  it shows magpie's release workflow on GitHub built those exact files.
  An update that fails a check is not installed
  (internal/update/attest.go).

The lines are added by updatetrust.js, a module settingshints.js loads
on demand. It watches #about and adds them each time About is drawn.
They live there and not in app.js because the core scripts' budget
(TestCoreScriptBudget) has no room. old-webkit's list of on-demand
scripts names it. Translated in zh, zh-TW, ja and de.

update-auto.test.cjs: at rest the two lines are out of sight; hovering
the name shows the card with the row's line, "ed25519" and "Sigstore";
the mark is there; and the card goes once the pointer leaves. The
existing check of the switch's own line now reads the first line only.

Run (mote-run, at this commit rebased on 414517ccf):
  node --test old-webkit phone-no-sideways settings-hints
    settings-lines-wrap settings-search update-auto (Chromium + WebKit)
  66 pass, 26 fail. The 26 are the same tests, failing the same way, on
  plain 414517ccf: #6467 (appearance.js), #5919 (:has), #5869 (de 375),
  #6107 (settings-hints ja/de 420px), #6353 and #6133 (settings-search
  /api/update/using, settings-lines-wrap de 440px). update-auto passes
  in both engines.
  The first run, at e5b8f381d, covered 38 update-*, settings-*, about-*,
  i18n-keys, i18n-en-no-cjk, remote-update, whats-new and
  uninstall-settings files: 720 of 746 passed, and the 26 reds are the
  ones above.
  go test ./internal/gui/... (TestCoreScriptBudget included): ok.
Broken by hand: without the import in settingshints.js, update-auto
goes red (no .update-trust lines within 5s).
Not tried: the real app window; only the faked API in Playwright.
2026-11-13 19:31:37 +08:00
..
…
…
…