Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c24afa2
feat(ui): add Home and Apps to the sidebar with a Generated Files gal…
PabloWiedemann Nov 10, 2026
569fb3a
fix(ui): load Cloud assets once and use the design system's radio items
PabloWiedemann Nov 10, 2026
f92273f
Merge main and move Generated Files to its own Assets page
PabloWiedemann Nov 11, 2026
6fdd847
fix(assets): harden asset listing and clear stale workspace assets
PabloWiedemann Nov 12, 2026
ffa3846
fix(assets): read local assets from the output folders on disk
benceruleanlu Nov 13, 2026
aaf09b0
fix(assets): show the label on the Log in to Comfy Cloud button
benceruleanlu Nov 13, 2026
a470efd
Merge remote-tracking branch 'origin/main' into PabloWiedemann/sideba…
benceruleanlu Nov 13, 2026
3b75073
Merge remote-tracking branch 'origin/main' into HEAD
PabloWiedemann Nov 13, 2026
340b5d8
fix(assets): keep one page of Comfy Cloud assets
PabloWiedemann Nov 13, 2026
10baaee
fix(assets): show the original file when a thumbnail is slow
benceruleanlu Nov 13, 2026
735dc71
test(assets): make the slow-thumbnail test independent of runner spee…
benceruleanlu Nov 13, 2026
5cdaae5
Merge review fixes into PabloWiedemann/sidebar-tabs-assets
PabloWiedemann Nov 13, 2026
ed91d55
fix(assets): place each masonry card under the shortest column
benceruleanlu Nov 13, 2026
ba22cb5
refactor(assets): lay out the gallery with TanStack Virtual
benceruleanlu Nov 13, 2026
be1fd5a
feat(assets): build the gallery cards to Mar's Assets frame
benceruleanlu Nov 13, 2026
f2a91c8
Merge remote-tracking branch 'origin/main' into pr-1981
benceruleanlu Nov 13, 2026
38c7100
test(assets): check a video in the output folder keeps its shape and …
benceruleanlu Nov 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions e2e/assets.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { copyFile, mkdir, mkdtemp, rm } from 'node:fs/promises'
import os from 'node:os'
import path from 'node:path'
import { test, expect } from '@playwright/test'
import { launchApp, type AppContext } from './launchApp'

const SIDEBAR_ASSETS = '[data-testid="app-sidebar-assets"]'
const ASSETS_GRID = '[data-testid="assets-grid"]'
const SAMPLE_IMAGE = path.resolve('src/renderer/src/assets/sidebar/hills-sunset.jpg')
const SAMPLE_VIDEO = path.resolve('src/renderer/public/install-showcase-scene/Assets/earpods.webm')
const SAMPLE_VIDEO_SHAPE = 714 / 530

let ctx: AppContext
let outputDir: string

test.describe.configure({ mode: 'serial' })

test.beforeAll(async () => {
outputDir = await mkdtemp(path.join(os.tmpdir(), 'comfy-assets-output-'))
await mkdir(path.join(outputDir, 'landscapes'), { recursive: true })
await copyFile(SAMPLE_IMAGE, path.join(outputDir, 'landscapes', 'ComfyUI_00001_.jpg'))
await copyFile(SAMPLE_VIDEO, path.join(outputDir, 'ComfyUI_00002_.webm'))
ctx = await launchApp(
{ settings: { firstUseCompleted: true, telemetryEnabled: false, outputDir } },
{ stayOnHome: true }
)
})

test.afterAll(async () => {
await ctx.cleanup()
await rm(outputDir, { recursive: true, force: true })
})

test('Assets shows the images in the output folder with no build running and no login @windows @macos @linux', async () => {
expect(await ctx.panel.click(SIDEBAR_ASSETS)).toBe(true)

await ctx.panel.waitForVisible(ASSETS_GRID)
await expect
.poll(
() =>
ctx.panel.evaluate<boolean>(
`(() => {
const img = document.querySelector('${ASSETS_GRID} img')
return !!img && img.complete && img.naturalWidth > 0
})()`
),
{ message: 'the first image from disk loads', timeout: 20_000 }
)
.toBe(true)
const src = await ctx.panel.evaluate<string>(
`document.querySelector('${ASSETS_GRID} img').getAttribute('src')`
)
expect(src.startsWith('comfy-output://file/')).toBe(true)
expect(decodeURIComponent(src)).toContain('ComfyUI_00001_.jpg')
})

test('A video in the output folder keeps its shape and shows how long it runs @windows @macos @linux', async () => {
const lengthLabel = `document.querySelector('${ASSETS_GRID} [data-testid="asset-duration"]')`
await expect
.poll(() => ctx.panel.evaluate<string | null>(`${lengthLabel}?.textContent?.trim() ?? null`), {
message: 'the video card shows its length, read from the file',
timeout: 20_000
})
.toBe('0:08')
const shape = await ctx.panel.evaluate<number>(
`(() => { const box = ${lengthLabel}.parentElement.getBoundingClientRect(); return box.width / box.height })()`
)
expect(shape, 'the card has the video shape, not a 16:9 crop').toBeCloseTo(SAMPLE_VIDEO_SHAPE, 1)
})
36 changes: 36 additions & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"builds": "Builds",
"navigation": "Navigation",
"home": "Home",
"assets": "Assets",
"collapse": "Collapse sidebar",
"expand": "Expand sidebar",
"signInTitle": "Log in to Comfy",
Expand All @@ -30,6 +31,41 @@
"crashedWithSignal": "Crashed ({signal})",
"failedToStartReason": "Failed to start: {reason}"
},
"assets": {
"kindLabel": "Asset type",
"kind": {
"all": "All",
"image": "Images",
"video": "Videos",
"3d": "3D",
"audio": "Audio"
},
"refresh": "Refresh assets",
"search": "Search by name...",
"viewOptions": "View options",
"layoutLabel": "Layout",
"layout": {
"masonry": "Masonry",
"grid": "Grid"
},
"sortLabel": "Sort by",
"sort": {
"newest": "Newest first",
"oldest": "Oldest first"
},
"showLabel": "Show",
"showName": "File name",
"showDetails": "File details",
"emptyTitle": "No assets yet",
"emptyBody": "Open an app to make assets.",
"loadFailed": "Couldn't load assets",
"noMatches": "No matching assets",
"noMatchesHint": "Try another type or search.",
"filter": "Filter",
"signedOutTitle": "Log in to see your assets",
"signedOutBody": "Assets that you make in Comfy Cloud show here.",
"signIn": "Log in to Comfy Cloud"
},
"home": {
"title": "Welcome. Let's create!",
"openComfyUI": "Open ComfyUI",
Expand Down
36 changes: 36 additions & 0 deletions locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"builds": "构建",
"navigation": "导航",
"home": "主页",
"assets": "资产",
"collapse": "收起侧边栏",
"expand": "展开侧边栏",
"signInTitle": "登录 Comfy",
Expand All @@ -30,6 +31,41 @@
"crashedWithSignal": "已崩溃({signal})",
"failedToStartReason": "启动失败:{reason}"
},
"assets": {
"kindLabel": "资产类型",
"kind": {
"all": "全部",
"image": "图片",
"video": "视频",
"3d": "3D",
"audio": "音频"
},
"refresh": "刷新资产",
"search": "按名称搜索...",
"viewOptions": "视图选项",
"layoutLabel": "布局",
"layout": {
"masonry": "瀑布流",
"grid": "网格"
},
"sortLabel": "排序方式",
"sort": {
"newest": "最新优先",
"oldest": "最早优先"
},
"showLabel": "显示",
"showName": "文件名",
"showDetails": "文件详情",
"emptyTitle": "暂无资产",
"emptyBody": "打开一个应用来生成资产。",
"loadFailed": "无法加载资产",
"noMatches": "没有匹配的资产",
"noMatchesHint": "试试其他类型或搜索词。",
"filter": "筛选",
"signedOutTitle": "登录以查看你的资产",
"signedOutBody": "你在 Comfy Cloud 中生成的资产会显示在这里。",
"signIn": "登录 Comfy Cloud"
},
"home": {
"title": "欢迎。开始创作吧!",
"openComfyUI": "打开 ComfyUI",
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@
"@xterm/addon-fit": "^0.10.0",
"@xterm/xterm": "^5.5.0",
"electron-updater": "^6.7.3",
"image-size": "^2.0.4",
"music-metadata": "^12.3.2",
"node-pty": "^1.1.0",
"posthog-node": "^5.30.7",
"semver": "^7.7.4",
Expand All @@ -94,6 +96,7 @@
"@pinia/testing": "^1.0.3",
"@playwright/test": "^1.58.2",
"@tailwindcss/vite": "^4.1.8",
"@tanstack/vue-virtual": "^3.13.48",
"@types/node": "^22.19.1",
"@types/semver": "^7.7.1",
"@vitejs/plugin-vue": "^6.0.2",
Expand Down
Loading
Loading