Merged
Conversation
lavaman131
approved these changes
Nov 12, 2025
lavaman131
pushed a commit
that referenced
this pull request
Feb 15, 2026
- Add 29 tests covering all reducer functions and utilities - Test all built-in reducers: replace, concat, merge, mergeById, max, min, sum, or, and, ifDefined - Cover annotation factory, getDefaultValue, applyReducer - Test state initialization and updates with reducers - Include edge cases: empty arrays, null/undefined, factory functions - Verify state independence and partial updates - Fix TypeScript type errors with proper type annotations - All tests pass with 64% function coverage Related to Task #11
lavaman131
pushed a commit
that referenced
this pull request
Feb 18, 2026
When ESC or Ctrl+C interrupts a streaming workflow, set workflowCleaningUpRef to true before setting wasInterruptedRef. This prevents user messages from racing with Ralph's async cleanup. Changes: - Added workflowState.workflowActive guard in 4 interrupt handlers: 1. Ctrl+C during streaming (line 3982) 2. Ctrl+C with running agents (line 4062) 3. ESC during streaming (line 4225) 4. ESC with running agents (line 4299) The cleanup ref will be cleared when stateUpdate with workflowActive=false is processed (handled by task #11). Completes task #9 from workflow d700a82c Related to #219
lavaman131
pushed a commit
that referenced
this pull request
Feb 18, 2026
Implements task #16 - queue drain unit tests per spec §8.2 Added comprehensive unit tests for queue drain logic that triggers when Ralph's workflow completes: Test Coverage: - Drain triggers on workflow transition from active to inactive - Queue must have pending messages for drain to occur - cleaningUp flag is cleared when drain occurs - Messages are drained in FIFO order - Various edge cases (empty queue, never active, etc.) Implementation: - Created src/ui/chat.queue-drain.test.ts following existing patterns - Extracted queue drain decision logic into testable function - 12 comprehensive test cases covering all scenarios - All tests pass (1345 total, 0 failures) Related Implementation: - Queue drain logic in chat.tsx lines 3651-3659 - Triggered by stateUpdate.workflowActive === false - Works with workflowCleaningUpRef from tasks #9 and #11
lavaman131
pushed a commit
that referenced
this pull request
Feb 18, 2026
…y (task #11) Added 15 new unit tests across 3 test files to fill gaps in coverage for: 1. Background message linkage preservation (Task #8): - 5 tests in chat.completion-parity.test.ts - Verifies backgroundAgentMessageIdRef preservation when background agents remain - Verifies clearing when no background agents remain - Tests interaction with streamingMessageIdRef clearing 2. Lifecycle counter persistence across resets (Tasks #5 + #10): - 4 tests in reset-clearing.test.ts - Verifies counters persist while maps/refs are cleared - Tests reset counter increments correctly - Verifies counter independence 3. Terminal gating edge cases (Task #2): - 6 tests in parallel-agent-background-lifecycle.test.ts - Tests idempotent completion handling - Tests rapid successive events - Tests validation for unknown/interrupted agents Test results: - chat.completion-parity.test.ts: 15 → 20 tests (+5) - reset-clearing.test.ts: 23 → 27 tests (+4) - parallel-agent-background-lifecycle.test.ts: 34 → 40 tests (+6) - All 87 tests passing - All type checks passing All tests are deterministic, focused, and fast (~23ms total).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.