Skip to content

Fix segment ID misalignment (#429)#653

Open
dadukhankevin wants to merge 5 commits intodevfrom
fix/429-segment-id-alignment
Open

Fix segment ID misalignment (#429)#653
dadukhankevin wants to merge 5 commits intodevfrom
fix/429-segment-id-alignment

Conversation

@dadukhankevin
Copy link
Copy Markdown
Contributor

Summary

  • When importing a translation, handleWriteTranslation was using the imported content's newly-generated UUID instead of the matched target cell's existing UUID, breaking source-to-target linkage
  • Changed 2 locations in NewSourceUploaderProvider.ts to use the matched notebook cell's ID (alignedCell.notebookCell.metadata.id) with fallback to imported content ID
  • Added 4 tests for usfmCellAligner verifying correct ID resolution

Test plan

  • 4 new alignment tests pass
  • 238 existing tests pass (full suite)
  • Import same USFM file as both source and target — verify row counts match and no lines missing
  • Click target cells and confirm they highlight the correct source cells

Fixes #429

🤖 Generated with Claude Code

dadukhankevin and others added 4 commits February 19, 2026 19:02
- Pass language code (lang param) to ASR endpoint for better transcription quality
- Include language in getAsrConfig response from extension to webview
- Add "Transcribe All" button alongside per-cell "Transcribe" to encourage batching
- Reuse single WhisperTranscriptionClient across batch to leverage warmed Modal container
- Default batch command to "all untranscribed cells" instead of requiring count
- Show cold-start warning (~45s) in transcription info messages
- Save actual language code instead of "unknown" in transcription metadata

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ignment (#429)

When importing a translation, the cell aligner correctly matches cells by
cellLabel (e.g. "GEN 1:1"), but handleWriteTranslation was using the
imported content's newly-generated UUID instead of the matched target
cell's existing UUID. This broke source-to-target linkage because the
target cells ended up with different IDs than their source counterparts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests confirm the aligner matches by cellLabel and returns existing
target cell IDs, and that the handleWriteTranslation ID resolution
logic correctly prefers the matched notebook cell ID over the imported
content's newly-generated UUID.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dadukhankevin dadukhankevin self-assigned this Feb 20, 2026
@dadukhankevin dadukhankevin changed the base branch from main to dev March 22, 2026 20:54
@BenjaminScholtens BenjaminScholtens changed the base branch from dev-old to dev March 27, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misalignment on source and target files

2 participants