You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
caption word chunking and text assembly duplicated across four places #3274
The caption word utilities (caption_text_from_words, the attach-to-previous helpers, normalize_caption_words, caption_word_chunks, and the segment size constants) are copy-pasted in four places and they've already drifted.
crates/project/src/caption_timing.rs (private copy of the attach helpers + caption_text_from_words)
apps/desktop-gpui/src/transcription.rs (same full set again)
apps/desktop-gpui/src/editor_window.rs (another caption_text_from_words with the attach list inlined)
Concrete drift: the weak-word boundary check in captions.rs uses normalized.len() <= 1 (bytes) while transcription.rs uses normalized.chars().count() <= 1. So the unicode fix from #2685 only landed in the gpui backend, a one letter word like "à" still counts as two letters on the Tauri side.
I'd move the whole set into cap-project next to CaptionWord and have everything consume it from there. Happy to send that PR, and there's a second one I'd build on top of it (configurable words per caption, issue coming).
richie said on discord he's fine with PRs for this area.
Activity
linear commentedon Oct 25, 2026
CAP-923
Ker102 commentedon Oct 25, 2026
moved this over to #3290, it went up from the wrong account. sorry for the noise.
refactor: move caption word utilities into cap-project (#3274)
fix: address review notes on the shared chunker (#3274)