Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

test(e2e): regression for hidden context_window blocking Start Research (#3909) (#4059)

LearningCircuitd88ba602ca67
diff --git a/tests/puppeteer/test_ui_functionality.js b/tests/puppeteer/test_ui_functionality.js
index 89335b15c4..762f691e45 100644
--- a/tests/puppeteer/test_ui_functionality.js
+++ b/tests/puppeteer/test_ui_functionality.js
@@ -140,6 +140,62 @@ describe('UI Functionality Tests', function() {
console.log(` ✓ Query entered: "${testQuery}"`);
});
+ it('should pass form validation when hidden context_window has a non-step value (#3909 regression)', async () => {
+ // Regression for #3909 / PR #4051: the context_window input lives
+ // inside a display:none container that is only shown for local
+ // providers. Previously the input had step="512", so any stored
+ // value not aligned to that grid (e.g. 25000) failed HTML5
+ // validation. Because the field is hidden, the browser cannot
+ // focus it to surface the error, so the Start Research click
+ // silently no-ops with no log line. We assert via checkValidity()
+ // (no submit) so the test does not consume LLM credits.
+ await page.goto(`${BASE_URL}/`, { waitUntil: 'domcontentloaded' });
+ await delay(500);
+
+ const check = await page.evaluate(() => {
+ const input = document.getElementById('context_window');
+ const container = document.getElementById('context_window_container');
+ const query = document.getElementById('query');
+ const form = document.getElementById('research-form');
+ if (!input || !container || !query || !form) {
+ return { ok: false, reason: 'expected form elements not found' };
+ }
+ // Populate the textarea so query (required-by-JS) is not the
+ // reason validation might fail.
+ query.value = 'regression check for #3909';
+ // The exact stored value from the reporter's issue. 25000 is
+ // not a multiple of 512 from min=512.
+ input.value = '25000';
+ return {
+ ok: true,
+ hiddenForCloudProvider: window.getComputedStyle(container).display === 'none',
+ formValid: form.checkValidity(),
+ inputValid: input.validity.valid,
+ stepMismatch: input.validity.stepMismatch,
+ rangeUnderflow: input.validity.rangeUnderflow,
+ rangeOverflow: input.validity.rangeOverflow,
+ };
+ });
+
+ expect(check.ok, check.reason).to.be.true;
+ expect(
+ check.hiddenForCloudProvider,
+ '#context_window_container should be hidden by default (cloud provider) — the regression scenario'
+ ).to.be.true;
+ expect(
+ check.formValid,
+ 'research-form.checkValidity() must return true with context_window=25000 in a hidden container. ' +
+ `If this fails, the step="512" constraint has been re-added to #context_window — see PR #4051. ` +
+ `Validity flags: ${JSON.stringify({
+ inputValid: check.inputValid,
+ stepMismatch: check.stepMismatch,
+ rangeUnderflow: check.rangeUnderflow,
+ rangeOverflow: check.rangeOverflow,
+ })}`
+ ).to.be.true;
+ console.log(' ✓ Hidden context_window with non-step value does not block submit');
+ });
+
it('should handle research form submission without crashing', async () => {
// Note: We don't actually run a full research (would take too long)
// Just verify the form can be submitted and the UI responds