Skip to content

fix: export generated preview and translate studio UI#70

Open
dpakkia wants to merge 1 commit into
nexu-io:mainfrom
dpakkia:fix/export-generated-preview-english-studio
Open

fix: export generated preview and translate studio UI#70
dpakkia wants to merge 1 commit into
nexu-io:mainfrom
dpakkia:fix/export-generated-preview-english-studio

Conversation

@dpakkia

@dpakkia dpakkia commented Jun 26, 2026

Copy link
Copy Markdown

Summary

Fixes Studio single-frame MP4 export so it renders the generated/edited project preview HTML instead of
falling back to the selected template example.

Also translates remaining hard-coded Chinese strings in the Studio English flow.

Changes

  • Prefer project.lastPreviewHtmlPath for single-frame exports when a generated preview exists.
  • Fall back to the selected template only when there is no generated preview.
  • Translate Studio prompt/card labels, progress messages, confirm buttons, form labels, and related hard-
    coded UI text to English.
  • Update format-reply parser tests for the English UI values.

Why

Before this change, a single-frame project could generate a custom preview, but Export MP4 rendered the
selected template source instead. For example, a generated lower-third using the Vignelli template exported
the Vignelli example rather than the generated lower-third HTML.

Verification

Passed:

  • ./node_modules/.bin/tsc -p packages/core/tsconfig.json --noEmit
  • ./node_modules/.bin/tsc -p packages/cli/tsconfig.json --noEmit
  • node --test packages/cli/test/parse-format-reply.test.ts
  • Manual Studio export verified: generated lower-third preview HTML exports instead of the Vignelli
    template source.

Notes:

  • pnpm typecheck and pnpm lint both failed locally with fetch failed from the pnpm wrapper before
    producing package diagnostics.
  • Direct Biome lint on touched files reports existing repo-wide style issues in legacy files, so this PR
    keeps the change focused.

@lefarcen lefarcen requested a review from mrcfps June 26, 2026 08:11
@lefarcen lefarcen added size/L Size L (300-699 LOC) risk/medium Medium risk type/bugfix Bug fix labels Jun 26, 2026
@lefarcen

Copy link
Copy Markdown
Contributor

Heads-up: PR #55 is also open against the same single-frame export path. Both PRs touch packages/core/src/project.ts, packages/cli/src/studio-server.ts, and packages/project-studio/public/app.js, and both appear to address the generated-preview export mismatch around lastPreviewHtmlPath.

This PR also carries the remaining Studio English UI translation work, while #55 includes the duration/export-timing fix. You and @walliai666 might want to compare approaches so effort doesn't get split unnecessarily — we'll sort out which shape lands from the maintainer side.

@itxaiohanglover

Copy link
Copy Markdown

Good fixes! Simplifying the regex to remove the 、 (ideographic comma) from the narration cleanup is more robust for international content. Translating Chinese UI messages to English improves accessibility. The retry message change is clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk/medium Medium risk size/L Size L (300-699 LOC) type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants