Skip to content

feat(media): fold single-file quick ops into a dialog in Media Studio#92

Merged
lyfuci merged 1 commit into
mainfrom
feat/media-quick-ops
Jun 7, 2026
Merged

feat(media): fold single-file quick ops into a dialog in Media Studio#92
lyfuci merged 1 commit into
mainfrom
feat/media-quick-ops

Conversation

@lyfuci

@lyfuci lyfuci commented Jun 2, 2026

Copy link
Copy Markdown
Owner

What

Re-surfaces the former single-file operations (which were removed from the page when the timeline became the primary view in #91) as a 「快速工具」/ Quick tools dialog. The timeline stays the main editor; one-shot edits are one click away in the header.

How

  • src/components/media/QuickToolsDialog.tsx — pick one file → choose an op → run → download. Self-contained state; never touches the timeline project. Reuses the unit-tested media-ops builders + the shared ffmpeg run helper.
  • Ops: compress (CRF), convert (MP4/WebM/MOV/MKV), GIF (two-pass palette), extract audio (MP3/AAC/FLAC/WAV), loudnorm (EBU R128), resize, mute, rotate/flip, frame grab.
  • Media.tsx — a "Quick tools" button in the header opens the dialog (available even on the empty drop screen).
  • i18n media.quick.* in en + zh-CN, keys identical across locales.

This closes the "deferred: fold the old 9 single-file ops into export" item noted in #91.

Verification

  • pnpm typecheck / pnpm lint / pnpm build clean; 388 tests green.
  • Headless-Chrome: opened the dialog from the header, uploaded a file, selected Mute, ran it end-to-end → produced A_muted.mp4 (13 KB), "Done" toast, zero page errors. (Screenshot in chat.)

🤖 Generated with Claude Code

Re-surfaces the former single-file operations (removed from the page when the
timeline became primary) as a "Quick tools" dialog, so the timeline stays the
main view but one-shot edits are one click away.

- src/components/media/QuickToolsDialog.tsx: pick one file → choose an op →
  run → download. Ops: compress (CRF), convert (MP4/WebM/MOV/MKV), GIF
  (two-pass palette), extract audio (MP3/AAC/FLAC/WAV), loudnorm (EBU R128),
  resize, mute, rotate/flip, frame grab. Reuses the unit-tested media-ops
  builders + the shared ffmpeg `run` helper; self-contained state, never
  touches the timeline project.
- Media.tsx: a "Quick tools" button in the header opens the dialog (available
  even on the empty drop screen).
- i18n: media.quick.* (title/description/ops/hints) in en + zh-CN, keys
  identical across locales.

Verified: typecheck/lint/build clean; 388 tests green; headless-Chrome opened
the dialog, uploaded a file, ran Mute end-to-end → produced A_muted.mp4
(13 KB), "Done" toast, no errors (screenshot in PR).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lyfuci lyfuci merged commit 800db15 into main Jun 7, 2026
2 checks passed
@lyfuci lyfuci deleted the feat/media-quick-ops branch June 7, 2026 16:05
lyfuci added a commit that referenced this pull request Jun 7, 2026
…MediaCard (#93)

- src/i18n/zh-CN.json: pages.dns.status / answers / noAnswers / noDirect were
  left in English, so the Chinese DNS tool showed English labels/messages.
  Translated all four (状态 / {{n}} 条记录 / 无记录 / 无直接答案;授权服务器:…).
- src/components/media/MediaCard.tsx: deleted. It was the single-file card from
  the pre-timeline media tool and has had zero imports since the timeline
  rewrite (#91).

Verified: typecheck / lint / build clean; 388 tests green; DNS zh parity check
now reports no untranslated strings. (media-ops.ts is intentionally kept — it
backs the Quick-tools dialog from #92.)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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