Repository navigation
feat(desktop-gpui): correct transcript words in place - #4245
Open
richiemcilroy wants to merge 6 commits into
Open
richiemcilroy wants to merge 6 commits into
richiemcilroy wants to merge 6 commits into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
richiemcilroy
marked this pull request as ready for review
November 14, 2026 06:32
|
Sandchest reviewed Sandchest reviews every change for vulnerabilities an attacker could use · 2 credits · Review details |
Member
Author
|
hey @greptileai, please re-review the PR |
This was referenced Nov 14, 2026
This branch was successfully deployed
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.

Double-click a word in the Transcript tab to fix its spelling. The fix lands in the captions, the exported video and every later word cut, and is one undo step.
Screenshots
Linux under Xvfb at 1600x1000, debug build of #4245, #4246 and #4247 combined, on a 52 s recording with a word-timed transcript. The real editor is driven with xdotool and recorded with ffmpeg (probe run). Screen recordings: light, dark. The app logged
transcript word editedin both themes.Light sequence: double-click, type, Tab moves the field to "Thanks", Esc closes it, play shows the fixed caption in the preview, then undo and redo.
A word that starts a soft-wrapped line ("mishurd." above) opens its field on its own line (probe run, light, recording):
macOS still (the transcript hint now mentions double-click to fix a word):
How it works
TranscriptPage.tsxupdateWordText). The GPUI Transcript tab could only cut, restore and search words, so a misheard word stayed wrong in the captions and the export.hello+,,it+'s).word_sources(src/transcript/model.rs) records which caption words each transcript word came from, using the same foldflatten_wordsalready did.replace_word(src/transcript/word_edit.rs:23) swaps those caption words for the typed text, keeping the time the word is spoken at:it'stoit is) reuse each one's own timingword_field,src/transcript/view.rs:399) is the existingui::TextInput, laid over the word at the paragraph's own type size and line height, on the panel surface with an accent ring and the popover shadow. Its position is measured from the paragraph's text layout when it paints, so it stays on the word through scrolling and panel resizes.locate,src/transcript/word_edit.rs), so it stays over the right word and Tab still moves from it.Refined timings
RefinedCaptions(src/transcription/refine.rs) now also matches a word by its boundaries when its text no longer matches: a word that starts where an input word started and ends where an input word ended takes the refined start and end of those words. That covers a respelled word and several caption words corrected into one (it+'sintoits). Boundaries two input words share are ignored, and a word whose times were changed by hand (in the sidebar or on the timeline) does not sit on input boundaries, so it stays where it was put.a_refinement_keeps_caption_edits_made_while_it_rannow expects the correctedyeahto take the refined2.1..2.6: the text edit is still kept, and the word now sits where it is spoken.Decision: double-click edits
transcript_select_from_field). Clicking a paragraph's timestamp still selects the paragraph.Callers checked
flatten_words:TranscriptDoc::build, transcript tests. Same output; the source tracking is only collected byword_sources.transcript_mouse_down: the paragraph's mouse handler only. Shift-click and drag selection are unchanged.TranscriptState::refresh:transcript_refreshand the editor's render path. Only the scroll restore is new.RefinedCaptions::retime_ofreplaces the text-keyed lookup inapply_refined_captions, its only use.RefinementLandingand undo-entry amending go through it unchanged.What could regress
Tests added
src/transcript/tests.rscorrecting_a_word_keeps_its_timing_and_reaches_the_rendered_captionsa_word_with_attached_punctuation_is_replaced_whole_and_keeps_its_spansplitting_a_word_shares_its_span_and_cut_words_stay_cuta_corrected_cut_word_comes_back_with_its_new_text_when_restoredclearing_a_word_drops_it_from_the_captions_but_not_the_videopunctuation_in_the_next_caption_is_replaced_with_its_wordright_to_left_cjk_and_emoji_corrections_keep_their_textan_edited_word_is_found_again_after_its_transcript_movesa_correction_survives_a_refinement_and_the_word_cut_still_followscorrecting_a_word_in_a_two_hour_transcript_is_fast(20,000 words)word_edit_ui(Linux, like the other editor window tests): Tab and Shift-Tab, Tab skipping cut words, Esc, a split word landing on the next word, undo and redo, the field following its word through a rebuild, triple-click from the fieldsrc/transcription.rs:a_refinement_moves_caption_words_corrected_into_one,a_refinement_leaves_a_word_retimed_by_hand_where_it_was_put

Confidence Score: 5/5
The reviewed changes appear safe to merge.Summary
Adds in-place transcript corrections that reach captions and exports without cutting video. The latest change fixes field placement for wrapped words and adds focused layout tests.
Reviews (12) · Last reviewed commit: "fix(desktop-gpui): open the word field o..." · Reviewed by Greptile