Files
magpie/build
yetone fb3942ee67 windows: the app's icon fills its square in the taskbar, the tray and Start (dzxx0496)
On Windows 10 magpie's icon looked a size smaller than its neighbours
in the taskbar, the tray overflow and Start's "Recently added"
(dzxx0496 on Discord, #general). Every Windows icon was the Mac's tile:
build/windows/icon-*.png (75cb19264, the exe's icon group #3, which
the window, the taskbar and the Start shortcut's IconLocation exe,0
all use) and internal/gui/icon.png (the tray) were build/icon/gen.go's
app(), on macOS's grid, the tile 80% of the canvas with 10% clear on
each side. Windows draws an app to the edges of its square.

- gen.go: app() and the new win() share tile(). win() is the same
  white tile, shading and bird (.8 of the tile), a 32nd of the side
  clear from 32px up (1px at 32 and 48, 8px at 256) so the rounded
  corners' soft edge stays inside, and to the edge under 32px, where
  that pixel would only blur it; corner radius .2 of the side (.225 on
  the Mac). No new colour.
- build/windows: icon-16 to icon-256 drawn by win(), plus 20, 24 and
  40 px, which Windows asks for at 125% to 250%; winres.json lists
  them.
- The tray takes internal/gui/icon-windows.ico (16, 20, 24, 32, 40,
  48, 64); Wails picks the SM_CXSMICON entry, where the 64px PNG was
  scaled down by the system. icon.png, only the tray's, is gone.
- Makefile's icons target draws all of these.

Not changed: macOS (app() is byte for byte the same at 64, 256 and
1024: cmp against the committed icon-256.png and icon-1024.png; the
.icns, Assets.car and tray.png untouched). Linux: its tray is the
glyph with no tile, and its desktop icon (icon-256.png) keeps the
margin GNOME's and the hicolor theme's app icons have too.

What was run:
- mote: go test ./internal/gui: TestWindowsIconsFillTheirSquare (new),
  TestTrayIconPerOS and TestTrayIconSize ok. Red, each filed and none
  about icons: TestSettingsSaveKeepsWhatItDoesNotSend (#4514, red 3 of
  3 at a fresh origin/main 733fac48f), TestMainWindowCorners/macOS_26_SDK
  (#3949, macOS 27) and TestColdTurnsTaken once in the package run,
  ok when run again (#4510). go vet ./..., GOOS=linux go vet -tags
  nogui ./..., GOOS=windows go vet ./..., go build and GOOS=windows
  go build: ok. gofmt -l prints nothing.
- Broken by hand: the old PNGs, winres.json and the old 64px picture
  as the tray's .ico: TestWindowsIconsFillTheirSquare red, "tile
  (25,25)-(231,231) in (0,0)-(256,256), want at least 15/16 of the
  side, centred" and the same for each size, "icon-windows.ico has no
  16px picture".
- make release-windows on mote at origin/main and at this change, both
  exes on the Windows 11 box (xiaomi-gpu). Its console was locked at
  the PIN screen, so no desktop screenshot: instead Windows itself
  drew each exe and a .lnk to it through IShellItemImageFactory (what
  Explorer, the taskbar and Start use) at 16/24/32/48/256, beside
  Docker Desktop, Claude, Explorer, Edge and Notepad, and the tray
  icon through CreateIconFromResourceEx at 16 to 40 as Wails makes it.
  Before: the tile 80% of the square, the tray blurred. After: the
  tile fills it as Docker's, Claude's and Edge's do; the tray is
  crisp at each size.

Not run: go test -tags nogui ./... (the change is internal/gui's
embeds, which nogui leaves out, and build/).
Not tried: Windows 10 itself, and the real taskbar, tray and Start
with the desktop unlocked. Windows keeps an exe's icon in its icon
cache by path, so a user may see the old one until the cache renews.
2026-11-01 11:02:56 +08:00
..
gui: the page runs in macOS 12's WebKit — no regex lookbehind, the few newer built-ins filled in, fallbacks for container queries, subgrid, :has and color-mix (#220 uclort: on macOS 12.7.6 the app opened blank, the panel showing its tab bar, a "Profiles + Save current" heading and "Open magpie · Quit" and nothing else, no button working) — the page runs in the system's WebKit, on macOS 12 Safari 15.x's, and app.js's snippet highlighter had a regex lookbehind, (?<==)\S+ (app.js:2167), which WebKit only parses from Safari 16.4: a SyntaxError in a literal fails the whole file, so app.js never ran (and routing.js and library.js, which lean on it, threw), leaving index.html's static markup; library.js had two more, (?<![\w-]) in the SVG greying (library.js:162-163). The highlighter now finds a value after "=" by hand (the character before the match, a sticky \S+) and the greying checks the character before a colour name in its replace callback, each giving the same output as before (compared on shell, curl, Python and Node snippets and an SVG with attribute and style colours, data-fill and x-color left alone). Built-ins newer than Safari 15.0 in use, routing.js:307's findLast and library.js:1042's structuredClone (15.4), are filled in by a new compat.js loaded before the other scripts (with at, findLastIndex and Object.hasOwn), each only where missing; structuredClone there is a JSON copy, enough for the API's plain data. Styles: a selector list with :focus-visible (15.4) drops the whole rule before 15.4, so the agent handle's hover, an account's Remove and protocol buttons showing on hover, the protocol menu's hover and the editor's focus ring are split from their :focus-visible (or it is dropped where :focus covers it); .acc:has(.aq) and the panel's .profiles:has(> .chip-input) hint (15.4) are classes set by app.js (with-aq, naming); the Routing page's container queries and the request list's subgrid (16) get @supports not fallbacks by the window's width (the tray panel is narrower than all of them) and a row's own columns; and the panel's --panel-tint, a color-mix() (16.2) in a custom property that would have gone invalid and painted the panel clear (tintPanel then handing the system white under dark text), falls back to --bg, as the floating status and Library's sticky head do. Other things newer than 15.0 are left as cosmetic: inert (15.5) on the folded agent list, accent-color, the rest of color-mix() on hover and focus shades, .quota's subgrid rows. The build: Go 1.25 and later run on macOS 12 and up only (the linker stamps 12.0 as the oldest), so Info.plist's LSMinimumSystemVersion and the Makefile's -mmacosx-version-min go from 11.0 to 12.0 and the site says macOS 12+ rather than 11+. Tested with a new internal/gui/tests/old-webkit.test.cjs: every assets/*.js parsed with the Babel parser Playwright bundles, failing on a regex lookbehind, v flag or modifiers (in a literal or new RegExp("…")), a class static block, decorators, import attributes or using (checked against the old highlighter's regex and a static block, and not on named groups, lookahead, ??= or private methods); a grep for built-ins newer than 15.0 (at, findLast, structuredClone, hasOwn, toSorted and co., Set methods, groupBy, withResolvers, Iterator helpers, popover …) unless compat.js fills them in (fails on main's routing.js:307 and library.js:1042 without it); compat.js the first of the page's scripts and every script loaded; the CSS with no :has(), no :focus-visible in a mixed list, no nesting or dvh, and @container, subgrid columns and a color-mix() custom property only with an @supports not fallback in the same file; and, in WebKit with those built-ins deleted, the panel's tabs, Save current's name field and every window page drawn with no page error. Documented in internal/gui/tests/README.md. go build -tags nogui (and GOOS=linux, GOOS=windows), go build (darwin GUI), go test -tags nogui ./... and the whole GUI suite (130 tests) pass. Not tried on a real macOS 12 or Safari 15: the old engine's parse is judged by the parser, not run.
2026-09-29 23:52:38 +08:00