gui: restBack fits app.js's budget again

101775657 (a key's rest that ends on another day says its date) put
app.js at 1,315,507 bytes, 191 over its budget of 1,315,316, and
TestCoreScriptBudget red on main; its body said the budget test passed,
from a run before the rebase that brought app.js up to the line. restBack
is now one line with no comment (the reason is in key-rest-date.test.cjs
and 101775657), and app.js is 1,315,290, with no raise.

Run (mote-run, at this change on origin/main 88e6fb9cf): go test -run
Budget ./internal/gui ok; node --test key-rest-date.test.cjs, Chromium:
10 of 10 (en/zh/zh-TW/ja/de at 1100 and 420px). WebKit not run: a bare
webkit.launch() times out on mote now (#4125).

The full go test ./... that found it ran on the pushed changes: red
otherwise only on #4362's gateway tests and the real-window AppKit tests
(#2645, #4125), plus TestClientPathCoversHandler and
TestRequestDiskNamesItsSource, both of which pass alone at this head (the
suite's copy was taken while this worktree was mid-rebase).
This commit is contained in:
yetone
2026-10-30 15:41:20 +08:00
parent 067e4c4846
commit e94bf7a08e
+1 -7
View File
@@ -20284,13 +20284,7 @@ function refreshAfterSync() {
// hhmm: a time's hours and minutes, in the user's language
const hhmm = (d) => new Date(d).toLocaleTimeString(intlLang(), { hour: "2-digit", minute: "2-digit" });
// restBack: when a key's rest ends, its date too when that isn't today: a
// key out of credit rests days at a time, and "back at 04:10 PM" read as
// this afternoon (PaulT on Discord)
const restBack = (d) => {
const at = new Date(d);
return at.toDateString() === new Date().toDateString() ? hhmm(at) : at.toLocaleDateString(intlLang(), { month: "short", day: "numeric" }) + " " + hhmm(at);
};
const restBack = (d) => ((d = new Date(d)).toDateString() === new Date().toDateString() ? "" : d.toLocaleDateString(intlLang(), { month: "short", day: "numeric" }) + " ") + hhmm(d);
function syncWhen(iso) {
const d = new Date(iso);