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.

docs: Add explanatory comments for CI test fixes

LearningCircuit18830e1dcf9d
diff --git a/.github/workflows/critical-ui-tests.yml b/.github/workflows/critical-ui-tests.yml
index 51391c447d..ba2f7c4d7b 100644
--- a/.github/workflows/critical-ui-tests.yml
+++ b/.github/workflows/critical-ui-tests.yml
@@ -56,6 +56,10 @@ jobs:
pdm sync -d
pdm run playwright install chromium --with-deps
+ # CRITICAL: LDR_DATA_DIR must be consistent between init and server steps!
+ # Previously, init created DB in ~/.local/share/local-deep-research/ but
+ # server used LDR_DATA_DIR=$PWD/data - a path mismatch that caused
+ # 401 UNAUTHORIZED errors because the pre-created test_admin user wasn't found.
- name: Set up test directories
run: |
# Use consistent path for both init and server
diff --git a/.github/workflows/extended-ui-tests.yml b/.github/workflows/extended-ui-tests.yml
index d1b81aef84..25ba1754a9 100644
--- a/.github/workflows/extended-ui-tests.yml
+++ b/.github/workflows/extended-ui-tests.yml
@@ -78,6 +78,11 @@ jobs:
mkdir -p tests/ui_tests/screenshots
mkdir -p tests/ui_tests/results
+ # Pre-create test_admin user to speed up tests (avoids slow registration).
+ # IMPORTANT: LDR_DATA_DIR must match between this step and "Start server"!
+ # Without this consistency, login fails with 401 because the user's
+ # encrypted database is created in a different directory than where
+ # the server looks for it.
- name: Initialize database with test user
env:
TEST_ENV: true
diff --git a/tests/ui_tests/auth_helper.js b/tests/ui_tests/auth_helper.js
index 0c25ebfd11..3bb95bc03c 100644
--- a/tests/ui_tests/auth_helper.js
+++ b/tests/ui_tests/auth_helper.js
@@ -310,12 +310,16 @@ class AuthHelper {
try {
// In CI, use a simpler and faster approach
+ // NOTE: Previous implementation used a polling loop that called page.evaluate()
+ // 30 times with 10s timeouts each. When the page was navigating, evaluate()
+ // would hang, causing 5+ minute delays ("URL check timeout" x30).
+ // This simpler Promise.all approach completes in seconds.
if (this.isCI) {
console.log(' Using CI-specific login approach');
timer.lap('starting CI login');
- // Use Promise.all with waitForNavigation - the standard approach
- // This is more reliable than polling page.evaluate()
+ // Use Promise.all with waitForNavigation - the standard Puppeteer approach
+ // This is more reliable than polling page.evaluate() which hangs during navigation
try {
await Promise.all([
this.page.waitForNavigation({
diff --git a/tests/ui_tests/test_login_validation.js b/tests/ui_tests/test_login_validation.js
index bcfcaed963..ba8abdc2d9 100644
--- a/tests/ui_tests/test_login_validation.js
+++ b/tests/ui_tests/test_login_validation.js
@@ -59,6 +59,10 @@ async function testLoginValidation() {
}
// Navigate to login page
+ // NOTE: Using 'domcontentloaded' instead of 'networkidle2' because:
+ // networkidle2 waits for no network activity for 500ms, but WebSocket
+ // connections and polling keep the network active, causing infinite hangs.
+ // This was the root cause of "Test 4: Invalid credentials" timing out.
console.log('📄 Navigating to login page...');
await page.goto(`${baseUrl}/auth/login`, {
waitUntil: 'domcontentloaded',