test+style: fix 2 full-suite regressions from the channel edits

- test_api_timeout: assert the updates/check call keeps timeoutMs:60000 in its
  new _checkBody form (functionally identical; still the 60s override)
- panels.js: reword two // comments to drop apostrophes — the smooth-text-fade
  brace-matcher test treats ' in a comment as a string delimiter and lost
  loadSettingsPanel's closing brace (node --check confirms the JS was always valid)
This commit is contained in:
t committed 2026-07-08 20:18:10 +00:00
1 parent 99bd2930cc
commit 43afc498b8
2 files changed
+5 -3

No files matched your search

+2 -2
View File
@@ -9152,7 +9152,7 @@ async function loadSettingsPanel(){
// update banner still gates the actual apply behind "Update Now".
_schedulePreferencesAutosave();
if(typeof checkUpdatesNow==='function'){
// Pass the just-selected channel EXPLICITLY so the re-check can't race
// Pass the just-selected channel EXPLICITLY so the re-check cannot race
// the debounced autosave PUT and answer for the previous channel.
const _picked=updateChannelSel.value;
setTimeout(function(){try{checkUpdatesNow(_picked);}catch(e){}},400);
@@ -11763,7 +11763,7 @@ async function checkUpdatesNow(channelOverride){
try {
// Pass the channel explicitly when the caller has one (e.g. the dropdown
// just switched) so the check can't race the debounced settings autosave
// just switched) so the check cannot race the debounced settings autosave
// and answer for the previous channel. Omit otherwise → server uses the
// saved setting. (Fable UX gate.)
const _checkBody={force:true};
+3 -1
View File
@@ -211,7 +211,9 @@ def test_update_flows_keep_explicit_longer_timeouts():
"""Legitimately long update flows should not inherit the generic 30s guard."""
src = _source(UI_JS)
panels = _source(PANELS_JS)
assert "api('/api/updates/check',{method:'POST',body:JSON.stringify({force:true}),timeoutMs:60000})" in panels
# /api/updates/check builds its body in a _checkBody var (to optionally add
# an explicit channel), but must still carry the 60s timeout override.
assert "api('/api/updates/check',{method:'POST',body:JSON.stringify(_checkBody),timeoutMs:60000})" in panels
assert "api('/api/updates/summary',{method:'POST',body:JSON.stringify({updates:scopedUpdates,target:target||null}),timeoutMs:60000})" in src
assert "api('/api/updates/apply',{method:'POST',body:JSON.stringify({target}),timeoutMs:120000})" in src
assert "api('/api/updates/force',{method:'POST',body:JSON.stringify({target}),timeoutMs:120000})" in src