Repository navigation
Description
Problem
22 tests are currently failing across frontend and backend. These represent regressions introduced by recent feature work (schema management, browser test additions, index manager changes).
UPDATE: Now tracking 23 failures (added - SQL parameter error discovered during issue #398 investigation).
Failing Tests Summary
Frontend: 11 failures
Backend: 12 failures (updated from 11)
Total: 23 failures (updated from 22)
Frontend Failures (11 tests)
Browser Positioning Tests (4 failures)
Location: packages/desktop-app/src/tests/browser/
autocomplete-interaction.test.ts- "verifies getBoundingClientRect returns real dimensions"autocomplete-interaction.test.ts- "can calculate dropdown position relative to cursor"slash-dropdown-interaction.test.ts- "verifies getBoundingClientRect for dropdown positioning"slash-dropdown-interaction.test.ts- "can calculate cursor position for dropdown placement"
Error Pattern:
AssertionError: expected 0 to be greater than 0
Root Cause: getBoundingClientRect() returns 0 dimensions in browser test environment.
Textarea Controller Tests (6 failures)
Location: packages/desktop-app/src/tests/components/textarea-controller.test.ts
- "should handle Enter key for new node creation"
- "should handle Tab key for indentation"
- "should handle Shift+Tab for outdentation"
- "should handle Cmd+B for bold formatting"
- "should handle Cmd+I for italic formatting"
- "should handle Ctrl+B for bold formatting (cross-platform)"
Error Patterns:
AssertionError: Target cannot be null or undefined
AssertionError: expected 'text' to be '**text**'
Root Cause: Keyboard event handling or command registry broken in recent changes.
Tab Persistence Test (1 failure)
Location: packages/desktop-app/src/tests/services/tab-persistence-service.test.ts
- "clears pending save timer"
Error Pattern:
AssertionError: expected "setItem" to not be called at all, but actually been called 1 times
Root Cause: Flush timing issue or test expectation incorrect.
Backend Failures (12 tests - updated)
Index Manager Tests (6 failures)
Location: packages/core/src/db/index_manager.rs
test_index_idempotencytest_create_json_path_indextest_list_indexestest_index_isolation_by_typetest_sql_injection_prevention_create_indextest_sql_injection_prevention_list_indexes
Root Cause: Likely introduced by recent schema service or database changes.
MCP Handler Tests (4 failures - updated)
Location: packages/core/src/mcp/handlers/nodes_test.rs
test_get_nodes_batch_with_not_foundtest_concurrent_update_version_conflicttest_get_children_ordered_with_multiple_insertionstest_move_child_to_index_beyond_sibling_count(NEW - added during Investigate SIGABRT/SIGTRAP crash when running full Rust test suite #398 investigation)
Error (new test #4):
MCPError { code: -32603, message: "Operation error: Service error: Query failed: Failed to prepare mentions query: SQLite failure: `bad parameter or other API misuse`" }
Root Cause (new test #4): SQL parameter binding error in mention service query logic. Discovered during SIGABRT crash investigation (#398).
Root Cause (tests 1-3): May be related to OCC or batch operation changes.
Performance Test (1 failure)
Location: packages/core/src/mcp/handlers/nodes_test.rs
test_occ_performance_overhead
Error: Performance exceeds threshold (6.56ms average vs 5ms target).
Root Cause: Flaky performance test - depends on system load and timing conditions.
Container Detection Test (1 failure)
Location: packages/core/src/services/node_service_container_test.rs
test_container_detection_is_null_based_not_type_based
Error: Required field 'status' is missing from task node
Root Cause: Test needs updating for schema validation requirements (task nodes now require status field).
Reproduction
Frontend
bun run test
# 11 failures in browser tests and textarea-controllerBackend
cargo test --lib -p nodespace-core -- --test-threads=4
# 12 failures (11 original + 1 SQL parameter error)Acceptance Criteria
- All 23 failing tests pass (updated from 22)
- Root cause documented for each category of failures
- No new test failures introduced
- Browser positioning tests work in Vitest Browser Mode
- Textarea controller keyboard handling restored
- Index manager tests pass with current schema implementation
- SQL parameter binding fixed in mention service (new)
- All tests pass:
bun run test && cargo test --lib -p nodespace-core -- --test-threads=4
Context
These failures were introduced by recent feature work:
- Schema service improvements
- Index manager implementation
- Browser test infrastructure (Phase 1)
- Textarea controller changes
- Mention service SQL query logic (new - discovered in Investigate SIGABRT/SIGTRAP crash when running full Rust test suite #398)
All tests were passing before these changes, indicating regressions that need investigation.
Related Issues
- Migrate integration tests to Vitest Browser Mode #282
- Investigate SIGABRT/SIGTRAP crash when running full Rust test suite #398
Priority
🔴 HIGH - Failing tests indicate regressions and reduce confidence in codebase.
Technical Specifications
Reference Files
Frontend:
packages/desktop-app/src/tests/browser/autocomplete-interaction.test.tspackages/desktop-app/src/tests/browser/slash-dropdown-interaction.test.tspackages/desktop-app/src/tests/components/textarea-controller.test.tspackages/desktop-app/src/tests/services/tab-persistence-service.test.ts
Backend:
packages/core/src/db/index_manager.rspackages/core/src/mcp/handlers/nodes_test.rs(includes new SQL parameter error)packages/core/src/services/node_service_container_test.rs
Activity
Fix 22 test failures from recent schema and browser test work
Address review: Improve test robustness and add regression context
Fix 23 test failures from recent schema and browser test work (#407)
Fix 23 test failures from recent schema and browser test work (#407)
Fix 23 test failures from recent schema and browser test work (#407)