1ccacad63281094de8a3372d5a507d38f9969e5c
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6ce663c0ce |
check-in: a time of day every daily check-in waits for (times_ang on X)
times_ang asked on X: 可以调整自动签到的时间吗. Before this, the daily
check-in had no time to choose. The loop first looks 2 minutes after start,
asks every 30 minutes, and asks as the Beijing day (UTC+8) turns. So an
account was checked in at the first look after 00:00 Beijing, on whatever
clock the computer kept.
settings.CheckinAt ("15:04", local time) is one time for every check-in:
the built-in WorkBuddy, Trae, MiniMax and Qoder ones and the plugins'
auth.checkin.
- checkinGate puts it on the Beijing day the account is checked in for:
the first HH:MM on the computer's clock at or after that day's start.
- The loop holds each account's first ask of a Beijing day until then,
and wakes at it.
- Within the day nothing changes: a vendor's own turn (a plugin's until),
retries and the before-noon recheck. So a vendor day is never skipped.
- Unset keeps today's behaviour.
- A press (Check in now, `magpie accounts checkin`) is never held.
Where to set it:
- The editor's check-in groups get a Check-in time row (Off/On and a time
box, as the warm-ups do), drawn by checkinnow.js so the core stays in
its budget.
- The Usage card's not-yet line says "checks in from 09:00".
- From the CLI: `magpie settings set checkinAt 09:00`.
Run (on mote unless named):
- go test ./internal/provider ./internal/gui ./internal/tui; settings,
settingsapi and cli.
- The check-in tests again with TZ=UTC and TZ=Pacific/Kiritimati.
- TestCheckinAt*/TestCheckinGate on Windows (win-run).
- TestCoreScriptBudget at the rebased head: 1,533,673 of 1,533,802.
- gofmt; go vet for darwin, linux (nogui) and windows.
- GUI: checkin-at.test.cjs (chromium and webkit, 1100 and 420 wide, en,
zh, zh-TW, ja, de) plus 27 more files the change reaches (check-in,
warm-at, provider-prefs, settings, i18n, gui-de/ja/zh-tw).
New tests, with the zone held in UTC+8 and in UTC-5:
- One ask per Beijing day, at the set time, with no day skipped.
- A press goes ahead of the time.
- A vendor whose day turns at 10:00 gets one ask a day at 20:00.
- Save refuses 25:00.
Broken by hand:
- The gate off: the Beijing 09:00, New York 23:30, press and vendor-day
cases went red.
- The row not drawn: checkin-at 0 of 40.
Not tried:
- Real vendor accounts.
- The real Linux app.
- The whole GUI suite; the full Go suite runs after the tag.
|
||
|
|
5dfbca6274 |
cli: magpie settings list|get|set|reset, through the window's own save (#4745)
Stage 1 of #4745 (StringKe): every setting POST /api/settings saves can be read and set from the terminal. - internal/settingsapi holds the save the handler made: Merge (the carry of keys a page leaves out, moved verbatim from api.go, plus upstream's RouterNote line), the vision/imageGen/searcher checks, settings.Save's own checks, catalog.Touched. POST /api/settings and `magpie settings` both call settingsapi.Apply, so a value is checked and saved one way. It sits outside internal/gui so the nogui build has it. - `magpie settings` (list, the default, with value, default and choices; get; set; reset to settings.Defaults()), --json on list and get. Body sends the whole file with one key changed, so a key the save keeps when absent (noBird, refusalRetries, ...) is set even to off. A flag where a key or value goes, an unknown key (with near matches named) or a refused value writes nothing and exits 1; --help prints usage. - Parity guards: TestKeysAreWhatTheSaveWrites (each Settings field sent changed on its own; what the save takes must equal Keys), TestSettingsCLISetsWhatTheWindowSaves (every key the page's prefsKeep and savePrefs send is a key), TestEveryRouteHasACommandOrIsNamed (each /api route has a command or a reason in notYet, which later stages shrink; 36 have one now). - Item 3 of the stage (per-provider CLI-only fields in the window) is left for stage 2. - The open app's in-process follow-ups (fonts, Dock, tray menu, alerts, language, update re-check) run only from the window's save: #4752. Run (mote, at the pushed head |