Skip to content

Commit feea380

Browse files
rosscadoclaude
andcommitted
fix: map refinement sequence to target for response routing
Fixes P1 code review issue where refinement transcriptions were being discarded due to missing sequence→element mapping. When uploading combined audio for Phase 2 refinement, we now properly map the returned sequence number to the target element via `context.transcriptionTargets[sequenceNum]`. This allows the refinement response handler to correctly identify and update the target field. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 63d1dd2 commit feea380

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/state-machines/DictationMachine.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1977,6 +1977,9 @@ const machine = createMachine<DictationContext, DictationEvent, DictationTypesta
19771977
`[DictationMachine] Refinement transcription sent with sequence ${sequenceNum} for target ${targetId}`
19781978
);
19791979

1980+
// Map the refinement sequence to the target element so the response can be routed correctly
1981+
context.transcriptionTargets[sequenceNum] = targetElement;
1982+
19801983
// Track this as an active refinement
19811984
context.activeRefinementSequences.set(targetId, sequenceNum);
19821985

0 commit comments

Comments
 (0)