Repository navigation
Conversation
🎨 Storybook: ❌ FailedDetails⏰ Completed at: 09/24/2026, 12:37:38 PM UTC Links
🎭 Playwright: ⏳ Running...📦 Bundle Size
⚡ Performance
🔬 E2E Coverage
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe asset sidebar adds generated-output filters for all assets, images, videos, and audio. It uses metadata-based media detection, flat output loading in eligible non-cloud environments, paginated filtering, and metadata-based preview handling. ChangesGenerated media asset filtering
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant AssetSidebarTab
participant useFlatOutputAssets
participant getAssetMediaKind
participant AssetGrid
AssetSidebarTab->>useFlatOutputAssets: Load generated output assets
AssetSidebarTab->>getAssetMediaKind: Classify asset metadata
AssetSidebarTab->>AssetGrid: Render assets for selected media kind
AssetSidebarTab->>useFlatOutputAssets: Load another page when no match exists
useFlatOutputAssets-->>AssetSidebarTab: Return additional output assets
Possibly related PRs
Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (5 passed)
Full details: Description checkExplanation The description includes the required Summary, Changes, and Review Focus sections. It clearly explains the generated asset media tabs, fallback behavior, pagination, grouping, and validation performed. Screenshots are not applicable to this UI behavior change. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/sidebar/tabs/AssetsSidebarTab.test.ts`:
- Around line 54-67: Add a test in the AssetsSidebarTab test suite covering
selected-kind pagination: initialize the mocked useFlatOutputAssets media
without a video, set hasMore to true, make loadMore append a video asset, select
Videos, and assert that the video becomes visible. Keep the assertion focused on
observable additional-page loading behavior and update the mock state
accordingly.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 3c188932-6b4f-4827-af43-6bce2a6bbba0
📒 Files selected for processing (5)
src/components/sidebar/tabs/AssetsSidebarTab.test.tssrc/components/sidebar/tabs/AssetsSidebarTab.vuesrc/locales/en/main.jsonsrc/platform/assets/utils/assetMetadataUtils.test.tssrc/platform/assets/utils/assetMetadataUtils.ts
599afca to
9c81084
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/sidebar/tabs/AssetsSidebarTab.test.ts`:
- Around line 238-241: Update the test around the Videos tab interaction to
await Vue’s nextTick() immediately after userEvent.click and before asserting
the filtered assets. Keep the existing visibility assertions unchanged.
In `@src/components/sidebar/tabs/AssetsSidebarTab.vue`:
- Around line 452-465: Update the showLoadingState and showEmptyState computed
conditions so outputAssets.isLoadingMore.value is considered only when
activeTab.value === 'output'. Preserve the existing loading and empty-state
behavior for the Imported tab and other non-output tabs.
In `@src/platform/assets/utils/assetMetadataUtils.test.ts`:
- Around line 152-170: Add a focused test for getAssetMediaKind that uses a
hash-like asset name, an unrecognized MIME type, and filename metadata set to a
video filename such as render.mp4; assert the result is video. Keep the case
behavior-focused and preserve the existing display_name and name fallback tests.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: bb531e5b-2dc6-46b7-a346-d691f0ded61e
📒 Files selected for processing (5)
src/components/sidebar/tabs/AssetsSidebarTab.test.tssrc/components/sidebar/tabs/AssetsSidebarTab.vuesrc/locales/en/main.jsonsrc/platform/assets/utils/assetMetadataUtils.test.tssrc/platform/assets/utils/assetMetadataUtils.ts
9c81084 to
7b9aa95
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Updated onto current |
7b9aa95 to
4f29430
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/sidebar/tabs/AssetsSidebarTab.vue`:
- Around line 527-540: Update ensureGeneratedMediaResults to return early when
outputAssets.isLoadingMore.value is true, alongside its existing guard
conditions, so concurrent loadMore calls cannot overlap. Preserve the watcher
retry behavior after the active request completes, and add a regression test
covering a generated-media tab switch during loadMore().
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d73b388a-b995-4928-b2bf-1d84daf139a2
📒 Files selected for processing (5)
src/components/sidebar/tabs/AssetsSidebarTab.test.tssrc/components/sidebar/tabs/AssetsSidebarTab.vuesrc/locales/en/main.jsonsrc/platform/assets/utils/assetMetadataUtils.test.tssrc/platform/assets/utils/assetMetadataUtils.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/sidebar/tabs/AssetsSidebarTab.test.ts`:
- Around line 315-319: After the loadMore call completes in the test, await
Vue’s nextTick before asserting the audio asset visibility. Add this
synchronization between the loadMore wait and getByText('audio-output.mp3')
assertion, preserving the existing call-count verification.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 334b2b8c-ada3-4c73-8cb4-78ce6f310796
📒 Files selected for processing (2)
src/components/sidebar/tabs/AssetsSidebarTab.test.tssrc/components/sidebar/tabs/AssetsSidebarTab.vue
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #14830 +/- ##
========================================
Coverage 80.90% 80.91%
========================================
Files 1872 1872
Lines 122197 122237 +40
Branches 37896 37457 -439
========================================
+ Hits 98864 98908 +44
+ Misses 22784 22772 -12
- Partials 549 557 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes 🚀 New features to boost your workflow:
|
christian-byrne
left a comment
There was a problem hiding this comment.
Two blocking regressions: stale pagination and lost output grouping.
Full context for agent readers
Reviewed exact head 7be8f108ccab3ed241b059fe7c18bdb33382c6a5. The branch also conflicts with current main; the resolved head should preserve current main's generated-asset subfolder handling and reconcile the overlapping grouping/source work in #12464 and dependent #14831 before re-review.
|
|
||
| while (baseAssets.value.length === 0 && outputAssets.hasMore.value) { | ||
| const previousCount = mediaAssets.value.length | ||
| await outputAssets.loadMore() |
There was a problem hiding this comment.
issue: Pagination survives leaving Generated.
Full context for agent readers
The active-tab/folder/media-kind guards run only before the loop. If this await is pending while the user switches to Imported or enters an empty folder, the resumed loop reads that view's empty baseAssets and can keep loading Generated output pages until exhaustion. Please invalidate the loop when its starting context changes and cover a tab/folder switch during a pending loadMore().
There was a problem hiding this comment.
Addressed in 72e3d12b13. The pagination loop now captures a synchronous context version that changes when the active tab, folder view, or media kind changes, and checks it both in the loop condition and immediately after each awaited loadMore(). Regression tests cover switching to Imported and entering a folder while a page is pending, plus serialized media-filter switches. The related tests and typecheck pass.
| const outputAssets = useAssetsApi('output') | ||
| const outputAssets = | ||
| !isCloud && api.getServerFeature('assets', false) | ||
| ? useFlatOutputAssets() |
There was a problem hiding this comment.
issue: Flat outputs drop job grouping.
Full context for agent readers
The current history provider emits one representative card per job with outputCount and allOutputs; useFlatOutputAssets() exposes each persisted asset row directly. A multi-output job therefore becomes multiple top-level cards and loses its count badge, folder navigation, and grouped actions. Please preserve the existing one-card-per-job contract while changing the persistence source.
There was a problem hiding this comment.
Addressed in 72e3d12b13. useFlatOutputAssetsGrouped now groups persisted rows by job_id in first-seen order, exposes one representative card with outputCount and allOutputs, retains current-main subfolder derivation, and leaves rows without a job independent. Filtering examines every grouped output, so mixed-media jobs keep one card while appearing under each applicable filter. Tests cover multi-output jobs, same-job pagination, mixed media, ordering, and non-mutation.
7be8f10 to
977d9e1
Compare
977d9e1 to
72e3d12
Compare
Summary
Use the persistent local output asset index for the Generated gallery when the server advertises asset support, while preserving one card per job and adding All, Images, Videos, and Audio filters.
Changes
job_idand preservesoutputCount/allOutputs; assets without a job remain independent.mainsubfolder handling and history-backed behavior when the asset API is unavailable.Review Focus
Tests
pnpm typecheckpnpm format:checkpnpm lintpnpm knip