Repository navigation
Plugins: keep returned time codes after the frame-mode change tick - #15791
Merged
Merged
Conversation
A structured plugin response was put in the grid as new rows without an undo baseline, so the next change tick treated every line as edited and snapped it to CurrentFrameRate (EBU STL is always in frame mode). ArteCheck returns 25 fps time codes; with an STL30 file or a 30/29.97/23.976 fps video they were moved to other frames, and the next ArteCheck run found the same corrections again. Apply structured responses as a tool step (one undo step named after the plugin's UndoDescription), and skip identical responses. Based on #15738. Co-Authored-By: Ralph Junglas <junglas@web.de> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
Reported by @Triathlon-rally on #15185: after ArteCheck → Apply → OK, opening ArteCheck again (without saving) shows corrections again, every time.
ApplyPluginSubtitleputs a structured response in the grid as new rows (new paragraph ids) with no undo baseline. The next change tick (OnChangeDetected→FrameModeTimeSnapper.SnapChangedLines) treats every line as edited and snaps it toCurrentFrameRate- and EBU STL is always in frame mode. ArteCheck returns 25 fps time codes (40 ms grid), so with an STL30 file or a 30/29.97/23.976 fps video they moved to other frames (e.g. 520 ms → 533.33 ms at 30 fps), and the next run found the same frame/gap errors again. At 25 fps the snap is a no-op, which is why it did not reproduce earlier.Fix
Ralph's change from #15738 (closed too early - #15739 fixed the import race, not this): structured responses go through
BeginToolApply/EndToolApply, so the result is recorded as one undo step (named afterUndoDescription) before change detection can snap it. Identical responses are skipped. Manual edits still snap as before.Tests
PluginToolLifecycleTests(from #15738) plus a new 30 fps case with ArteCheck-shaped 25 fps times, checking the next plugin request gets exactly the returned times. 4 of the 8 tests fail on main, all pass with the fix.Co-authored with @Triathlon-rally.
🤖 Generated with Claude Code