Skip to content

Plugins: keep returned time codes after the frame-mode change tick - #15791

Merged
niksedk merged 1 commit into
mainfrom
claude/plugin-apply-keeps-times
Oct 8, 2026
Merged

niksedk merged 1 commit into
mainfrom
claude/plugin-apply-keeps-times

Conversation

@niksedk

@niksedk niksedk commented Oct 8, 2026

Copy link
Copy Markdown
Member

Problem

Reported by @Triathlon-rally on #15185: after ArteCheck → Apply → OK, opening ArteCheck again (without saving) shows corrections again, every time.

ApplyPluginSubtitle puts 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 to CurrentFrameRate - 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 after UndoDescription) 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

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>
@niksedk
niksedk merged commit f0547d5 into main Oct 8, 2026
1 check passed
@niksedk
niksedk deleted the claude/plugin-apply-keeps-times branch October 8, 2026 04:20
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.

1 participant