Skip to content

fix(studio): preserve authored caption groups on import - #3900

Open
AksharP5 wants to merge 1 commit into
heygen-com:mainfrom
AksharP5:fix/caption-group-import
Open

fix(studio): preserve authored caption groups on import#3900
AksharP5 wants to merge 1 commit into
heygen-com:mainfrom
AksharP5:fix/caption-group-import

Conversation

@AksharP5

Copy link
Copy Markdown
Contributor

What

Opening existing captions in Studio silently moved words between groups. Seven words authored as 5 + 2 became 4 + 3, so editing and regenerating captions used the wrong boundaries.

Fixes #3899.

Caption group Before import Current main This fix
1 We asked what you needed. We asked what you We asked what you needed.
2 Forty-seven percent needed. Forty-seven percent Forty-seven percent

How

Read each outer caption group's word count instead of averaging all words and groups. Nested layout lines do not count twice. Incomplete DOM falls back to the existing five-word grouping without dropping transcript words.

Both import paths share the existing model construction, preserving segment IDs, word IDs, timing, and defaults. No UI changes or dependencies.

Verification

  • Regression suite reproduced seven failures before the fix; all nine new cases now pass. Covers 5 + 2, 2 + 4 + 1, alternate class names, nested lines, incomplete DOM, and generated-HTML re-import.
  • All 69 caption tests pass.
  • Chromium check using generated caption HTML, real iframe DOM, and GSAP preserves both groups and word metadata through import, regeneration, and re-import.
  • Workspace build, final Studio build and typecheck, lint, formatting, and fallow audit pass. Pre-commit checks pass.

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.

Studio changes authored caption group boundaries on import

1 participant