feat: show the source on the video instead of the translation - #105
Merged
Conversation
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.
Summary
The third slice of M2.6, decision 7's second half: the frame draws the translation, and View's new Source on video draws the document being read instead. The first half landed on 2026-09-03, when mpv started reading a shadow copy from Sublore's own cache; this changes which of the two open documents that shadow is written from and nothing else, so neither file on disk is touched and no backup is made by toggling.
SubtitleState::drawn_slotis the only way out of the subtitle module to the source and it is named for drawing, so nothing reaches for it in order to write. It hands back the translation whenever the toggle is on with no source open: a toggle left on when the source closes must not leave an empty frame.The check reads the length of the line mpv reports at the playhead, which is what
preview.spec.jsalready asserts against. Both fixtures' first cues start at zero, so the playhead is inside each of them and the length is the whole of what changes: 21 characters of the edited translation, 34 of the source, and back.Changes
shown,preview_set_source, and a refresh that asks which document to read.drawn_slot, which answers with the source only while there is one.How to verify it by using the app
Verified on Linux: full gate green step by step, and the battery green at 35 spec files of 35 with 288 checks. One mutation, a
drawn_slotthat always answers with the translation, reddened this check and only this one.