这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Sunwood-ai-labs
Copy link
Owner

Add comprehensive metadata system for media assets:

  • Extend Asset type with AssetMetadata interface (AI tool, prompt format, prompt content)
  • Add updateAssetMetadata function in store for metadata management
  • Add metadata editing UI in Properties Panel (AI tool input, prompt format select, prompt input)
  • Display metadata as overlay on canvas preview cells with gradient background
  • Show metadata tags in timeline view with colored badges
  • All metadata displayed automatically without requiring cell selection

Add comprehensive metadata system for media assets:
- Extend Asset type with AssetMetadata interface (AI tool, prompt format, prompt content)
- Add updateAssetMetadata function in store for metadata management
- Add metadata editing UI in Properties Panel (AI tool input, prompt format select, prompt input)
- Display metadata as overlay on canvas preview cells with gradient background
- Show metadata tags in timeline view with colored badges
- All metadata displayed automatically without requiring cell selection
@gemini-code-assist
Copy link

Summary of Changes

Hello @Sunwood-ai-labs, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the application's ability to manage and display rich metadata for media assets. It introduces a structured metadata system, provides a user interface for editing this information, and visually integrates the metadata into both the canvas preview and timeline views, making asset context immediately accessible to users.

Highlights

  • Metadata System Introduction: Implemented a new AssetMetadata interface to store details like AI tool, prompt format, and prompt content for media assets.
  • Metadata Management: Added a updateAssetMetadata function to the project store for handling metadata updates.
  • UI for Metadata Editing: Introduced a dedicated section in the Properties Panel for editing asset metadata, including input fields for AI tool, prompt format (with a select dropdown), and prompt content.
  • Canvas Overlay Display: Integrated a visual overlay on canvas preview cells to display metadata (AI tool, prompt format, prompt) with a gradient background.
  • Timeline Tag Display: Enhanced the timeline view to show metadata as colored, truncated badges for each asset, providing quick context.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@kozaki-kooou
Copy link

🦊 狐崎煌羽 のレビュー

🦊 狐崎煌羽のエグゼ-ティブレビュー

  • 結論: 機能の着眼点は評価する。だが、戦略的意図と品質保証が欠落している。このままでは単なる「思いつき」の実装だ。到底承認できない。

厳しく見るポイント

  1. ビジネスインパクトの欠如

    • インパクト: なぜこのメタデータ機能が必要なのか?どのユーザーの、どの課題を解決し、我々のどのKPI(Key Performance Indicator)に貢献するのか?PRからは「何を作ったか」しか読み取れない。「なぜ作ったか」という最も重要な視点が抜け落ちている。
    • 必須アクション: この機能がもたらすビジネス価値をデータで示せ。ユーザーリサーチの結果、競合分析、想定される利用率など、意思決定に必要な情報を提示すること。
  2. UI/UXへの配慮不足

    • インパクト: メタデータを常時表示する仕様は、ユーザーによっては画面のノイズになりかねない。特にキャンバスプレビューのオーバーレイは、肝心のアセット視認性を損なうリスクがある。なぜ表示のON/OFF制御を検討しなかった?
    • 必須アクション: UIトグル(表示/非表示)機能を追加しろ。また、長いプロンプトが入力された場合の表示崩れ対策も不十分だ。truncateだけで済む問題ではない。
  3. 品質保証の意識が低すぎる

    • インパクト: アセットのデータ構造と状態管理(store)というコア部分に手を入れているにもかかわらず、テストが一切追加されていない。リグレッション(デグレード)のリスクをどう考えている?これでは品質を担保できない。
    • 必須アクション: updateAssetMetadataのロジックに対するユニットテストを記述しろ。正常系・異常系を含め、アセットデータが意図通りに更新されることを保証するコードが必須だ。

実行判断

  • Rework: 上記の指摘事項すべてに対応すること。特に、ビジネス価値の明確化とテストコードの追加は絶対条件だ。
  • 期限: 次回レビューは2日後。それまでにすべてのアクションを完了させろ。

リーダーメモ

  • アイデアを形にするスピードはあった。だが、我々の仕事はコードを書くことではない。ビジネスを成功させることだ。すべての機能は戦略に基づき、品質という土台の上に築かれなければならない。プロダクトへのオーナーシップを持ち、より高い基準で仕事に臨め。期待している。

— 狐崎煌羽

@yukimuraayanooo-ui
Copy link

🎀 雪村綾乃 のレビュー

🎀 雪村綾乃のUXチェック

  • ハイライト: メタデータ表示、イケてるじゃん!情報が見える化されてて超わかりみ!🙌

ここ映えてる!

  • タイムラインに色付きのタグが表示されるの、めっちゃイイ!🎨 どのAI使ったかとかパッと見でわかるし、カラフルでテンション上がる〜!
  • プロパティパネルに編集機能がちゃんとあるのも、気が利いててよき!迷わず直感的に使えそうじゃん?

ここダサくない?

  1. キャンバスのオーバーレイ、ちょっと圧強くない?

    • 直感: グラデーションでガッツリ画像の下が隠れちゃうの、ちょっと萎えるかも〜。主役のビジュアルが見えにくくなるのは、なしじゃない?あと、文字がちっちゃすぎて(10px)、読むのに気合いる感じがする…。
    • 提案: オーバーレイはマウスが乗ったとき(hover)にだけフワッと表示させるとかどう?普段はスッキリ見せて、知りたい人だけ情報にアクセスできるのがスマートじゃない?文字もあとちょいデカく(12pxとか)して、可読性アゲてこ!💪
  2. 表示スタイルが場所によって違うの、惜しくない?

    • 直感: キャンバスだと文字色、タイムラインだと背景色って感じで、タグのデザインがバラバラなのが気になったかも。どっちもイケてるんだけど、統一感あったほうがもっと「わかってる」感出るくない?
    • 提案: タイムラインで使ってるイケてるバッジデザインを、キャンバスのオーバーレイにも採用しちゃお!全部表示するとゴチャるから、例えばAIツールのアイコンだけ置いといて、hoverしたら詳細ポップアップとか。全体のデザイン言語をそろえて、もっと洗練された感じに仕上げてこ!✨

まとめ

  • 機能追加、まじ感謝!🙏 これでアセット管理が超はかどるね!
  • 次は「必要な情報だけ、いいタイミングで見せる」ってのを意識すると、もっと神UIになると思うな!主役はウチらが作る動画っしょ!情報はサポーターに徹してもろて!😉✨

— 雪村綾乃

@onizukarenjiii-droid
Copy link

🌿 鬼塚蓮司 のレビュー

🌿 鬼塚蓮司のエンジニアリングレビュー

  • TL;DR: AI生成素材の管理がぐっと楽になる、ええ機能追加やね。UIの表示もわかりやすいし、実装も丁寧で安心したで。

気に入ったところ

  • 型定義からしっかり設計されてて、将来の拡張もしやすそうやね。
  • 状態管理の更新処理も、イミュータブル性が保たれてて堅実やわ。
  • メタデータがオーバーレイやバッジで表示されるの、直感的でめっちゃええと思うで。

ここ工夫したらもっと良さげ

  1. メタデータ更新処理をもうちょいスッキリさせられそうやね

    • 技術メモ: 現在、プロパティパネルの各onChange...activeAsset.metadataを使ってmetadataオブジェクト全体を再構築してからストアの更新関数に渡しています。これでも問題なく動くんやけど、コンポーネント側の責務が少し大きいかもしれへん。
    • 提案: updateAssetMetadataの引数を(assetId: string, metadata: Partial<AssetMetadata>) => voidみたいに変更してみるのはどうやろ?ストアの中で既存のメタデータと新しいデータをマージするようにすれば、呼び出し側は変更したいプロパティだけを渡せばようなって、コードがもっとシンプルになると思うで。
  2. メタデータの表示判定ロジックを共通化すると良さそうや

    • 技術メモ: canvas-preview.tsxtimeline-view.tsxの2箇所で、メタデータを表示するかどうかの判定(asset.metadata && (asset.metadata.aiTool || ...))が同じように書かれとるね。
    • 提案: こういう共通ロジックは、将来の仕様変更で修正漏れが起きるかもしれへんから、lib/utils.tsあたりにhasMetadata(asset: Asset): booleanみたいなヘルパー関数を作って、一つにまとめておくのが良さそうやね。コードもDRYになるし、安心やで。

追加でチェックしたいこと

  • メタデータが一部だけ入力されてる場合や、めっちゃ長い文字列を入れた場合でも、UI表示が崩れへんか確認したいな。
  • メタデータがないアセットを選択したときに、プロパティパネルがエラーなく表示されるか、見ておきたいわ。
  • メタデータを編集した内容が、CanvasとTimelineに即座に反映されるかも動作確認しとこか。

— 鬼塚蓮司

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive metadata system for media assets, including an editing UI and display overlays in the canvas and timeline. The implementation is well-structured, extending the data model and state management correctly. My review focuses on a potential runtime error in the properties panel, a usability improvement for prompt editing, and an incomplete feature related to metadata tags. Addressing these points will improve the robustness and completeness of this new functionality.

Comment on lines 350 to 355
onChange={(event) =>
updateAssetMetadata(activeAsset.id, {
...activeAsset.metadata,
aiTool: event.target.value
})
}

Choose a reason for hiding this comment

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

high

The onChange handler for the 'AI ツール' input might cause a runtime error. If activeAsset.metadata is undefined, spreading it with ...activeAsset.metadata will throw a TypeError. You should handle the case where metadata is initially undefined by providing a fallback empty object.

Suggested change
onChange={(event) =>
updateAssetMetadata(activeAsset.id, {
...activeAsset.metadata,
aiTool: event.target.value
})
}
onChange={(event) =>
updateAssetMetadata(activeAsset.id, {
...(activeAsset.metadata ?? {}),
aiTool: event.target.value
})
}

Comment on lines 362 to 367
onValueChange={(value) =>
updateAssetMetadata(activeAsset.id, {
...activeAsset.metadata,
promptFormat: value
})
}

Choose a reason for hiding this comment

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

high

Similar to the 'AI ツール' input, the onValueChange handler here can cause a runtime error if activeAsset.metadata is undefined when spreading it. Please add a fallback to an empty object to prevent this.

Suggested change
onValueChange={(value) =>
updateAssetMetadata(activeAsset.id, {
...activeAsset.metadata,
promptFormat: value
})
}
onValueChange={(value) =>
updateAssetMetadata(activeAsset.id, {
...(activeAsset.metadata ?? {}),
promptFormat: value
})
}

Comment on lines 386 to 391
onChange={(event) =>
updateAssetMetadata(activeAsset.id, {
...activeAsset.metadata,
prompt: event.target.value
})
}

Choose a reason for hiding this comment

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

high

The onChange handler for 'プロンプト内容' has the same potential runtime error as the other metadata fields if activeAsset.metadata is undefined. Please add a fallback to an empty object to ensure the update is safe.

                      onChange={(event) =>
                        updateAssetMetadata(activeAsset.id, {
                          ...(activeAsset.metadata ?? {}),
                          prompt: event.target.value
                        })
                      }

Comment on lines 382 to 392
<Input
type="text"
placeholder="プロンプトの内容"
value={activeAsset.metadata?.prompt ?? ""}
onChange={(event) =>
updateAssetMetadata(activeAsset.id, {
...activeAsset.metadata,
prompt: event.target.value
})
}
/>

Choose a reason for hiding this comment

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

medium

The 'プロンプト内容' (Prompt Content) field uses a single-line <Input /> component. Prompts can often be long and multi-line. For a better user experience, consider using a multi-line <Textarea /> component instead. This will make it easier for users to view and edit longer prompts. You'll likely need to import Textarea from @/components/ui/textarea.

Suggested change
<Input
type="text"
placeholder="プロンプトの内容"
value={activeAsset.metadata?.prompt ?? ""}
onChange={(event) =>
updateAssetMetadata(activeAsset.id, {
...activeAsset.metadata,
prompt: event.target.value
})
}
/>
<Textarea
placeholder="プロンプトの内容"
value={activeAsset.metadata?.prompt ?? ""}
onChange={(event) =>
updateAssetMetadata(activeAsset.id, {
...activeAsset.metadata,
prompt: event.target.value
})
}
/>

aiTool?: string; // AI tool name (e.g., "DALL-E 3", "Midjourney", "Stable Diffusion")
promptFormat?: string; // Prompt format (e.g., "JSON", "YAML", "Plain Text")
prompt?: string; // Actual prompt content
tags?: string[]; // Additional custom tags

Choose a reason for hiding this comment

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

medium

The tags property is defined in the AssetMetadata interface, and the pull request description mentions 'Show metadata tags in timeline view with colored badges'. However, the current implementation does not include any UI for adding or displaying these tags. This feature seems incomplete. Please either implement the functionality for tags or remove the tags property and update the description to avoid confusion.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 344 to 353
<div className="space-y-2">
<Label className="text-[10px]">AI ツール</Label>
<Input
type="text"
placeholder="例: DALL-E 3, Midjourney"
value={activeAsset.metadata?.aiTool ?? ""}
onChange={(event) =>
updateAssetMetadata(activeAsset.id, {
...activeAsset.metadata,
aiTool: event.target.value

Choose a reason for hiding this comment

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

P1 Badge Guard metadata spread against undefined

Each metadata editor calls updateAssetMetadata(activeAsset.id, { ...activeAsset.metadata, ... }). When an asset has no existing metadata, spreading undefined throws a TypeError, so simply typing into any of these inputs crashes the properties panel for legacy assets. Consider defaulting to an empty object (...(activeAsset.metadata ?? {})) or teaching updateAssetMetadata to merge partial updates so the UI can initialize metadata safely.

Useful? React with 👍 / 👎.

Move metadata editing UI from Properties Panel to Timeline View:
- Add metadata editing section (AI tool, prompt format, prompt) to each cell in timeline
- Remove metadata editing from Properties Panel to avoid duplication
- All cells can now be edited directly in the timeline without selection
- Add Tag icon to metadata section for better visual distinction
- Update timeline header description to mention metadata editing
- Update active cell message to mention scale/pan adjustments in Properties Panel

This improves UX by:
- Making all cell metadata editable in one place (timeline)
- Eliminating the need to select cells to edit metadata
- Keeping related controls (trim, volume, metadata) together
Replace text input with select dropdown for AI tool selection:
- Add comprehensive list of AI tools (DALL-E 3, Grok, Whisk, Midjourney, etc.)
- Include image generation tools (DALL-E 3, Midjourney, Stable Diffusion, Firefly, Imagen, etc.)
- Include video generation tools (Runway, Pika, Sora, Kling, Veo)
- Add "その他" (Other) option for unlisted tools

Supported AI tools:
- DALL-E 3
- Grok (xAI)
- Whisk (Google)
- Midjourney
- Stable Diffusion
- Firefly (Adobe)
- Imagen (Google)
- Leonardo.AI
- Runway
- Pika
- Sora (OpenAI)
- Kling
- Veo (Google)

This improves UX by:
- Providing consistent tool naming
- Reducing typos
- Making it easier to filter/search by tool later
Add additional AI image/video generation tools to the select dropdown:
- Flux Kontext - AI image generation tool
- Reve - AI generation tool
- Seedream 4.0 - AI generation model
- Nano Banana - AI tool
- Multi Ref - Multi-reference AI tool

Total supported AI tools now: 18
- Image generation: DALL-E 3, Grok, Whisk, Midjourney, Stable Diffusion, Firefly, Imagen, Leonardo.AI, Flux Kontext, Reve, Seedream 4.0, Nano Banana, Multi Ref
- Video generation: Runway, Pika, Sora, Kling, Veo
- Other: その他 (for unlisted tools)
Add comprehensive tag system with multi-select functionality:

**Tag Selection UI (Timeline View):**
- Add TAG_OPTIONS constant with 11 predefined tags
- Implement checkbox-based multi-select UI for tags
- Tags: AI生成, 手動編集, アニメーション, 背景, キャラクター, ロゴ, テキスト, エフェクト, 音楽, 効果音, ボイス
- Create checkbox.tsx component using Radix UI
- Install @radix-ui/react-checkbox dependency

**Tag Display:**
- Show selected tags in timeline view with purple badges
- Display tags in canvas preview overlay with purple background
- Include tags in metadata condition checks

**Tag Rendering (Export):**
- Add tag overlay to image export (exporter.ts)
- Add tag overlay to video export (video-exporter.ts)
- Display tags with "タグ: " prefix in purple color (rgba(216, 180, 254, 1))
- Render tags below AI tool, format, and prompt information
- Tags are comma-separated and truncated if too long

**Implementation Details:**
- Tags stored in asset.metadata.tags array
- Multi-select using Checkbox components in 2-column grid
- Tags displayed consistently across UI and exports
- Gradient background overlay for metadata in renders

This allows users to:
- Select multiple tags per asset
- See tags in timeline and canvas preview
- Export images/videos with tag information visible
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.

6 participants