4794de398ea8337d223a91e207181c56fcf4ad76
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f36e744c30 |
gui: Settings › General says each setting's name alone where it says enough, and Language is one menu (1ooogle on X)
1ooogle's mockup on X redrew Settings › General the way macOS System
Settings reads it. The owner approved, and this follows it.
Rows that now show only their name:
- Appearance, Text size, Interface and Code font, the tray click,
Provider in model names, the Codex titles, auto-review and memories
model rows, Open at login and Show in Dock.
- A font row's line shows only while its fonts are loading or have
failed.
- The text size keys (⌘0 / Ctrl+0) move into the choices' tooltip.
Rows that keep one short line, because the name alone doesn't explain
the setting or what it costs:
- Codex subagents, Long conversations, Lightweight mode, Prevent sleep
and Session terminal.
Renames:
- "Tray icon" becomes "Click the tray icon to", with the choices "Open
the quick panel" and "Open the main window" (点击托盘图标: 打开快捷面板 /
打开主窗口).
- "Keep awake while agents work" becomes "Prevent sleep" (防止休眠: 在
magpie 运行任务时,让电脑保持唤醒状态).
- "Dock" becomes "Show in Dock" (显示程序坞).
Language is one button showing the language picked (renderLangPick).
It opens in the app's own menu (openProtoMenu, styled like Session
terminal's sess-pick), not a native <select> and not six segments.
Every language gets the same text: en, zh, zh-TW, ja and de. The 25
strings no longer used are removed from all four translations.
Tests:
- New: settings-general.test.cjs. In Chromium and WebKit, en, zh,
zh-TW, ja and de, at 1000 and 440 px, on a Mac, it checks that:
- the rows that should show only their name have no line;
- the kept lines are one line each, and none is cut short at 1000px;
- Language is a button showing the language, and its menu lists all
six;
- a pick saves lang and redraws the page in that language, with the
button staying under the pointer;
- nothing has a left stripe and nothing scrolls sideways.
I broke it by hand twice and saw it fail both times: once by giving
the Dock row a line back, once by making the pick save nothing.
- Updated to the new text and controls: codex-titles,
codex-auto-review, codex-memories-settings, model-suffix-own,
plain-names, lightweight, keep-awake, text-size, gateway-mode,
omarchy, settings-search, gui-zh-tw (Language's button and menu fit
at 1000/440px), header-relang (picks through the menu) and
readable-focus (the first shown line).
- German's long-conversations line was shortened to fit on one line at
1000px.
What was run:
- go test -tags nogui ./internal/gui passes; gofmt -l is clean; go vet
passes on darwin, linux and windows.
- The whole GUI suite (601 files, --test-concurrency=4): 6584 passed,
33 failed. Every failing file was then run alone:
- mobile-web fails on purpose. It compares desktop screenshots with
origin/main, and only the Settings page differs.
- routing-group-fold, text-size, routing-sessions and pick-skills
are #1672; searcher-pick is #1745. Each also fails alone on
origin/main
|
||
|
|
e4aadb4840 |
gui: the header is fitted again when the language or the interface font changes, so the tabs no longer run under the magpie and the traffic lights (kiwiflysky on X)
With a wide interface font, the macOS window's header fit in Chinese but not in English, Japanese or German: the tabs slid left under the magpie and the window's buttons, and in German into the refresh button and the gear. fitTop draws the header in step by step (tight, cramped, inrow, crowded, packed), but it only ran again when .top, .brand or .actions changed size (ResizeObserver) and once on document.fonts.ready. Another language or a font picked later changes only #nav's width, so the header kept the fit it had for the old one. Now translateStatic (every language change) and desktopFonts.apply (every font applied: picked, saved in the other webview, from settings) call fitTop, and document.fonts' loadingdone does too, for a font still loading when it's applied. Both run synchronously, where the change happens. A ResizeObserver on #nav was tried first. It had to defer to a frame, since fitting resizes the nav and WebKit reports that loop as a page error, and the deferred refit moved the page after a click: text-size, number-units, tray-logos and rail-tip went red. That approach was dropped. Measured (830px, macOS window, before): switched live to en, ja and de, the tabs ran 61, 105 and 148px under the magpie (Chromium and WebKit alike). header-relang.test.cjs (new): - Opens a macOS window in Chinese, with the header's tabs picked over the sidebar. - Switches it from Settings to en, zh-TW, ja, de and back. - In English, on the Agents page, it hands in Menlo at each width from 1000 to 640px. Each fit must equal a fresh fitTop. - Sweeps each language from 1100 to 600px: 7.5px clear of the magpie or padding and of the buttons. - Chromium and WebKit. Run on this commit: - header-relang: 12/12 in Chromium and WebKit. Red on origin/main |