The previous commit reads the saved pluginCheckins map before
/api/settings' list, but /api/state has neither the list nor, for a
provider whose own switch was never set, a map entry. Such a plugin follows
the built-in check-in it took over (provider.PluginCheckinOn: traeCheckin
for trae-cn, workbuddyCheckin, minimaxCheckin, qoderCheckin), so a refresh
still drew it off while the scheduler kept checking in. pluginCheckinOn now
falls back to that built-in's switch, from PLUGIN_CHECKIN_INHERITS.
Run: plugin-checkin.test.cjs gains cases for the inherited switch in
/api/state's shape (red with the fallback removed) and a test that the map
names the same ids and settings keys as Go's PluginCheckinOn (red with an
extra entry); plugin-checkin, i18n-keys, gui-zh-tw, gui-ja, gui-de in
Chromium and WebKit: 32 pass. No new strings.
Reported by 1939323749 with a custom provider plugin on Windows. Read the persisted pluginCheckins map before the derived settings-only list, preserving explicit false and the existing default fallback.
Verified plugin-checkin tests in Chromium and WebKit across en, zh, zh-TW, ja and de, plus all three translation GUI suites. The WebKit English Usage-card regression fails without the fix: saved auto check-in stays on after a state refresh (false !== true).
Reviewed and landed from the reporter's branch (755c1f0): with the old
pluginCheckinOn the new refresh assertion fails in WebKit for every
language; with it, plugin-checkin, i18n-keys, gui-zh-tw, gui-ja and gui-de
pass in Chromium and WebKit.
Opening Settings reads the settings twice: the page's own read
(showView), then the window's load() once the state is in. Each read
redraws every row. A test that found a row after the first draw, and
then called scrollIntoViewIfNeeded or boundingBox on it, failed when the
second read landed in between. The errors were "Element is not
attached", or a null box. #1653 fixed the three masking-rules tests and
listed these 37 in #1659.
Each of the 37 now calls watchSettingsReads(page) before every
page.goto, and settingsDrawn(page) right after it. Right after goto is
exact for ?view=settings: at boot, show(view) asks for showView's read
before load() runs. load() sets load.done in the same run that then asks
for its own read, so settingsDrawn's "load.done and every read asked
for drawn" holds only once the second read is drawn. For a test opened
on another page that clicks into Settings later, load is done by then,
the click makes the only read, and the wait passes at once.
watchSettingsReads now watches a page once, however many times it is
opened, since some of these tests open one page several times. The
page is unchanged.
Reproduced with a generic injection (scratchpad inject1659.cjs, loaded
with NODE_OPTIONS=--require). A route added at each goto holds the
page's second GET /api/settings. It lets the read go just as the test
calls scrollIntoViewIfNeeded or boundingBox, or waits on the page with
waitForFunction (which settingsDrawn is), with a 4s timer as a backstop.
This is #1653's injection, made generic.
Before, injected, both engines, all languages:
- 5 files red with the issue's error:
- github-token: null box.
- member-model-setting, searcher-pick, search-first and update-wait:
"Element is not attached to the DOM".
- 4 files red on a check of a row drawn from the first read:
model-suffix-own, otel, readable-focus and warm-at-times.
- 28 green.
After, injected: 36 of the 37 files green, every held read let go by
settingsDrawn's wait. otel stays red in WebKit at 360px. It is red the
same way with no injection, on origin/main's own copy of the test. That
cause is separate (the narrow nav laid out after setViewportSize
returns) and has its own commit next.
Plain (no injection), both engines, all 37 files: 460 cases passed and
2 failed, both otel's WebKit 360px check above.
The 8 files red under injection before, injected again after,
5 rounds: 390 of 390 cases passed.