Commit Graph
4 Commits
Author SHA1 Message Date
yetone f17300d9c1 gui: Download source says what Update source picked
Settings › About's Download source said "from usemagpie.ai, and from
GitHub when that fails" whatever Update source said, right above it: with
usemagpie.ai only it still offered a GitHub mirror that is never used
(the site alone never asks GitHub), and with GitHub only it still named
usemagpie.ai as the source and the checksum's home. Its line, its
tooltip and its host now follow Update source: site says no mirror is
used, GitHub only says updates come from GitHub (or through the mirror)
and are checked against the release's signed checksums.

The row's drawing (renderUpdateMirror, setUpdateMirror, editMirror) moved
into updatesource.js, which About already imports for Update source, so
the core's script shrinks rather than grows; no budget raise.

Run (mica, at this tree):
- settings-update-source (Chromium and WebKit, every language, 1100 and
  420 wide), update-mirror, i18n-keys: 56 pass.
- the 18 GUI files that open Settings › About or search Settings
  (update-*, whats-new*, segs-glide, uninstall-settings,
  settings-search, settings-groups, gui-de): 409 pass, 6 red, all in
  settings-groups' "warm-ups and check-in" (an extra "Spend extra usage"
  row), red the same on origin/main 265217bf4 and filed as #6597.
- go test ./internal/gui -run 'TestCoreScriptBudget|TestI18n|TestCSS': ok.

Broken by hand: Download source reading "" for the source:
settings-update-source 10 of 10 red (Chromium), then put back.

Not tried: the real app window.
2026-11-18 12:42:07 +08:00
yetone 7bdda04509 settings: Update source's menu button shows its whole name (jiangshangmuyun on X)
Settings › About › Update source showed only a clipped glyph and the
chevron (reported on Windows, reproduced in Chromium and WebKit alike).
Cause: .pref-pick's max-width is min(230px, 45%), meant for a picker
that is the row's own child (Language). Update source's button sits in
the row's .val box, whose width is its content's, so 45% resolved
against the button's own width and shrank it each time. A .pref-pick
inside .val now takes min(230px, 100%); .val is held to 60% of the row
already. Only #updateSourcePick sits there (langPick and the sidebar
pages picker are the row's own children), so nothing else moves.

settings-update-source.test.cjs now checks the label is not clipped
for each of its three choices.

Run (mote):
- settings-update-source.test.cjs on the old CSS: 10 of 20 red (every
  language at 1100px in chromium and webkit, e.g. "自动: the label is
  clipped (24px in 0px, button 25.6px)"); with the fix 20 of 20 ok.
- node --test settings-update-source, segs-glide, uninstall-settings,
  update-mirror, update-download-steps, update-hide, update-quiet,
  update-row-steady, update-check, i18n-keys: 300 of 300 ok (both
  engines, every language).
- go test -run 'Budget|CSS|Asset|I18n' ./internal/gui: ok. gofmt clean.
Not tried: the real Windows app (WebView2); the whole GUI suite, as the
rule matches one element.
2026-11-16 09:43:49 +08:00
yetone bbe5c952f1 settings: Update source moves from Network to About, under Download source (WeltAn_X on X)
WeltAn_X on X: the source updates come from sits in Settings › Network and
sharing, though it is an update setting. Update source (Automatic,
usemagpie.ai only, GitHub only) is now the row right under Download source
in Settings › About, with Automatic updates, Update channel and the other
update rows. Same menu, same updateSource value, same save; the Network page
loses the row. App updates' proxy stays on Network, beside the other
proxies. No new tab, label or line.

It goes under Download source rather than above it: placed above, the
About page scrolled at update-mirror's 420px window, and Use a mirror…
then slid Download source 2-10px. That slide is on main too in a shorter
window (#6739), not fixed here.

Docs: the Mirrors page (en, zh, ja) and reference.md say About › Update
source; llms-full.txt and the search indexes are regenerated.

Run at 60ebaea03 + this change, on mica; rebased since onto 02f1cee79,
which touches only internal/plugin, internal/provider, internal/cli and a
subsystem page:
- gofmt -l internal: clean. go test -tags nogui ./internal/gui/...: ok
  (TestCoreScriptBudget included). node --test site/*.test.mjs: 132/132.
- GUI, chromium and webkit: settings-update-source (en, zh, zh-TW, ja, de at
  1100 and 420px; now opens About, the row is under Download source, none
  on Network), update-mirror, update-channel, update-auto, update-restart,
  settings-search, settings-sections, settings-places, settings-general,
  settings-update-proxy, settings-plugin-proxy, about-log, about-notices,
  about-report, about-website, cli-path, uninstall-settings, click-scroll,
  i18n-keys, i18n-en-no-cjk: all ok.
- Reds that fail the same on origin/main 2e1c0a377, run there on mote:
  old-webkit's two (#6030, #5919), settings-hints ja/de 420px (#6107),
  settings-lines-wrap chromium de 440px (#6353).
- The new settings-update-source is red 20/20 on origin/main 2e1c0a377.

Not tried: the real app; the GUI tests stand in for it.
2026-11-15 14:55:33 +08:00
yetone a2feeb11a0 update: pick the update source by hand, Automatic, usemagpie.ai only or GitHub only (RootSir, Sakugar_ on X)
usemagpie.ai's download is slow for some users (Cloudflare R2) and GitHub
is the one that works for others. Settings > Network has an "Update source"
menu button under App updates' proxy (the app's menu, no native select):
Automatic (default, as before: the site, then GitHub when the feed can't be
reached), usemagpie.ai only, GitHub only. Settings.UpdateSource ""/site/
github, this computer's own (KeepOwn), in settingsapi.Keys and Choices so
`magpie settings set updateSource github` works; any other value is refused
on save. The menu loads from assets/updatesource.js, so app.js (at its
budget) grows by one line.

GitHub only: latestAt reads yetone/magpie-releases without asking the feed,
and download starts at the file's github.com address (mirror and GitHub's
API route as before), never the site. usemagpie.ai only: no fallback to
GitHub for the release (fallsBack) nor for a file (toGitHub, toAPI off).
Stable and a MAGPIE_UPDATE_FEED of your own keep reading the site's feed
whatever the source says (Stable's release list is only the site's; its
files still come from GitHub on GitHub only). Every source goes through
Release.verify: ed25519 signature against the embedded key, the version in
the signed text, each hash from the signed list; a release read from GitHub
must be signed whatever its version. The update private key is untouched.

Run (mote, tree before the commit): gofmt clean; go vet update/settings/gui,
GOOS=windows and linux vet of update; go test internal/update, settings,
settingsapi, backup, cli ok; internal/gui TestCoreScriptBudget, assets and
i18n tests ok. GUI: settings-update-source (chromium and webkit x en, zh,
zh-TW, ja, de x 1100 and 420px: three menu items, each pick saves updateSource
alone, tick, no overflow), settings-update-proxy, i18n-keys, i18n-en-no-cjk,
settings-*, gui-* ok except the 22 subtests (gui-de/ja "has every zh string",
settings-hints, settings-lines-wrap de 440, settings-search) that fail the
same on origin/main 5a3d73039 (#6234, #6073, #6156, #6133 are open for them).
New Go tests use a fake GitHub and a live fake site feed that count their
hits: GitHub only never asks the feed and downloads from GitHub, the site and
Automatic never ask GitHub, the site only never falls back (release or file),
GitHub only refuses wrong key, swapped sums, no/junk signature and an
unsigned old version, a custom feed is never overridden. Broken by hand:
without the githubOnly branch and the two download switches, 3 of them go red.
Not tried: the real github.com or R2, a Windows run, Stable with GitHub only.
2026-11-12 19:35:57 +08:00