Skip to content

fix: preserve web upload auto frame titles#16

Open
CircleCrop wants to merge 1 commit into
mainfrom
codex-71g12o
Open

fix: preserve web upload auto frame titles#16
CircleCrop wants to merge 1 commit into
mainfrom
codex-71g12o

Conversation

@CircleCrop

Copy link
Copy Markdown
Member

Motivation

  • The scanner/fallback logic previously overwrote frame.title when showing fallback/full m2ts titles, losing the original automatic title; the UI must be able to switch presentation without mutating the upload plan.
  • Provide a non-destructive way to show either the compact automatic title or a fuller m2ts-based title in the pairing preview and workbench.

Description

  • Add a view-model title mode and separate title fields by introducing UploadPlanTitleDisplayMode and exposing autoTitle and fullTitle on FramePreviewRow, while leaving WebUploadFramePlan.title unchanged (files changed: web-upload-view-model.ts).
  • Extend buildPlanView to accept a titleDisplayMode param and populate title, autoTitle, and fullTitle accordingly (option A implemented at view-model layer).
  • Keep the workbench planRef immutable and store the current titleDisplayMode in React state; toggling rebuilds the PlanView from the original WebUploadPlan rather than mutating it (file changed: web-upload-workbench.tsx).
  • Add a toggle button in PairingPreviewPanel with mode-aware copy that switches between 使用完整 m2ts-帧号 and 恢复自动帧号 and wired it to the workbench toggle handler (file changed: web-upload-pairing-preview.tsx).
  • Add a regression test to web-upload-view-model.test.ts verifying switching to full titles and restoring back preserves the original automatic frame.title.

Testing

  • Ran the focused unit tests with pnpm --filter @magic-compare/internal-site test -- web-upload-view-model.test.ts and fixed an initial parse mismatch; after the fix the test file passed.
  • Ran the full internal-site test suite via pnpm --filter @magic-compare/internal-site test and all tests passed (120 passed).
  • Ran lint (pnpm --filter @magic-compare/internal-site lint), typecheck (pnpm --filter @magic-compare/internal-site typecheck) and applied formatting with prettier; those checks completed without errors.

Codex Task

Copilot AI review requested due to automatic review settings July 15, 2026 05:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants