ac4af582301a4e8a29245dbba767eba31334ddf9
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
5fadf6aceb |
gui: Settings' gateway row is titled an address, and says only its port is typed here (Chicring on Discord)
Chicring: Settings showed "网关端口" (gateway port), but the row showed
MAGPIE_ADDR's host:port.
What the field takes, from the code: renderPort posts to
/api/settings/port, and setPort (internal/gui/port.go) accepts only a port
from 1024 to 65535 (settings.CheckPort). The gateway listens on that port,
on 127.0.0.1, or on 0.0.0.0 while shared on the LAN. When MAGPIE_ADDR is
set, it is the whole host:port and comes first. The row then shows its
value and is disabled. So the row is the gateway's address, but only its
port is typed here; it isn't a second way to write MAGPIE_ADDR.
The row is renamed in every language: Gateway address / 网关地址 / 閘道位址 /
ゲートウェイのアドレス / Adresse des Zugangspunkts. The new hint says "Only
the port is set here, 1024 to 65535; MAGPIE_ADDR=host:port sets the whole
address instead. Agents magpie connected move with it. Now {url}". With
MAGPIE_ADDR set, the hint says "MAGPIE_ADDR={addr} sets the gateway's whole
address, host:port: unset it to set the port here". The CLI help (cpu,
healthcheck, heap, quota, statusline) and setPort's comment named
"Settings' Gateway port". They now say "the port in Settings' Gateway
address".
Test: gateway-port.test.cjs pins the new name and hints in en and zh. With
MAGPIE_ADDR set, it now also checks that the field shows 127.0.0.1:3426
and that the row's name and aria-label say the address. gui-zh-tw, gui-ja,
gui-de and i18n-keys cover the other languages. Broken by hand: on the old
app.js it is red, "not ok 1 - en expected: 'Gateway address' actual:
'Gateway port'", and zh red against '网关地址'.
What was run. The whole suites ran at dcf7eeae3, which was these two commits
on origin/main
|
||
|
|
e085d6e926 |
cli, gateway: magpie heap writes the running magpie's Go heap profile, with its memory numbers
A user on X (FatimaHill74421) reports the macOS app at 3.95 GB physical
footprint after ~12h (v0.1.1273, after 8a1b5916f's #2278 fix), and a macOS
`sample` shows Go's frames as ???. `magpie heap [<file>]` asks the magpie
that serves the gateway for GET /v1/magpie/heap: runtime/pprof's heap
profile after a GC (gzipped protobuf, go tool pprof reads it), with
HeapAlloc, live heap, HeapInuse, HeapSys, StackSys, Sys, NumGC and the
goroutine count in X-Magpie-Heap-Stats. It writes <file>, else
magpie-heap-<date>-<time>.pb.gz here (0600, never over a file), and prints
the path, the pid and the numbers. --help writes nothing; an unknown flag,
"-" or a second file is refused before anything is asked.
The route answers only a loopback, unproxied caller with no browser marks
calling localhost or a loopback IP. heapRefused checks this in the handler
itself, so a gateway key never lets in another machine, a listed page,
Origin null, a localhost page or a rebound Host, and it holds where Handler
is served without lanGuard.
Run at
|