Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
1a76c8d
feat(website): shorten the featured banner on the workflows catalogue
mariana953 Sep 25, 2026
b66bab9
feat(website): the catalogue search sits with the filter and the sort
mariana953 Sep 25, 2026
05caba0
feat(website): one name and one mark on a catalogue card
mariana953 Sep 25, 2026
cb40bee
fix(website): the featured banner grows rather than clipping its copy
mariana953 Sep 25, 2026
4ac80e7
test(website): the compact banner carries the same slide as the tall one
mariana953 Sep 25, 2026
d934f8d
fix(website): a catalogue card says its name once to a screen reader
mariana953 Sep 25, 2026
eedbb9f
test(website): the banner's call to action names where it goes
mariana953 Sep 25, 2026
f36685e
feat(website): show what narrowed the catalogue as chips you can take…
mariana953 Sep 26, 2026
20cf553
feat(website): give the home hub section a workflows tab
mariana953 Sep 26, 2026
66b48ed
fix(website): take PP Formula's centring from the face, not from markers
claude Sep 26, 2026
629d8a3
fix(website): give the filter chips a 24px target and cover both bran…
mariana953 Sep 26, 2026
7249d39
test(website): assert the faces centre without the overrides, not the…
claude Sep 26, 2026
132f69b
refactor(website): give each discovery card its own component
mariana953 Sep 26, 2026
aa246c5
test(website): prove a chip's cross takes off only that chip
mariana953 Sep 26, 2026
1127efb
test(website): cover the workflow row's data and how the page reaches it
mariana953 Sep 26, 2026
7bbbd73
fix(website): lift the workflow card's name off the bottom edge
mariana953 Sep 26, 2026
7a5ed1c
fix(website): keep the discovery marquee continuous across a tab switch
mariana953 Sep 26, 2026
c78dedd
test(website): prove the discovery marquee rewinds on a tab switch
mariana953 Sep 26, 2026
24db6d8
fix(website): drop the PP Formula metric overrides and fix the app's …
claude Sep 26, 2026
85d7eef
test(website): also reject a line-gap-override on a PP Formula face
claude Sep 26, 2026
25a1607
[automated] Update website screenshot expectations
invalid-email-address Sep 26, 2026
1a22ba4
feat(website): the workflow Details tab takes the V2 layout
mariana953 Sep 26, 2026
5ac9fda
test(website): point the workflow e2e at the renamed Details tab
mariana953 Sep 26, 2026
1a0587f
fix(website): a refused workflow run is shown where the reader is loo…
mariana953 Sep 26, 2026
576cbd8
fix(website): one sentence per refusal, and a way out that reaches so…
mariana953 Sep 26, 2026
3dcc7b4
fix(website): a cancelled run says so, where the reader stopped it
mariana953 Sep 26, 2026
2523268
test(website): every state of the output panel, standing up somewhere…
mariana953 Sep 26, 2026
0f96a80
fix(website): a shared word is not a shared meaning
mariana953 Sep 26, 2026
155c43e
Merge branch 'mariana/v2-workflow-refusals' into mariana/v2-workflow-…
mariana953 Sep 26, 2026
5ef2e34
Merge branch 'mariana/v2-workflow-cancelled' into mariana/v2-workflow…
mariana953 Sep 26, 2026
2bc0c61
feat(website): the facts rail says where a workflow runs, what it giv…
mariana953 Sep 26, 2026
204a8df
feat(website): read a workflow template as a picture of itself
mariana953 Sep 26, 2026
731e3dc
Merge branch 'mariana/v2-workflow-graph-reader' into mariana/v2-workf…
mariana953 Sep 26, 2026
80aa203
feat(website): the Details tab draws the graph rather than a picture …
mariana953 Sep 26, 2026
6beac71
feat(website): the API tab says where a run is posted, and where the …
mariana953 Sep 26, 2026
ed6f2a2
fix(website): the catalogue asks once, at the end of the list
mariana953 Sep 26, 2026
d69c6da
fix(website): keep the way to the full-size graph, now under the draw…
mariana953 Sep 26, 2026
c2af889
feat(website): the workflow header stops repeating the rail, and its …
mariana953 Sep 26, 2026
978e6a6
feat(website): the catalogue reads better on a tablet and with a keyb…
mariana953 Sep 26, 2026
8f4e4d0
fix(website): one reader, one account of a refused run
mariana953 Sep 26, 2026
39d925a
fix(website): a code the page has never met is absent, not inherited
mariana953 Sep 26, 2026
acce2e5
Merge branch 'mariana/v2-workflow-refusals' into mariana/v2-workflow-…
mariana953 Sep 26, 2026
ea77195
Merge branch 'mariana/v2-workflow-cancelled' into mariana/v2-workflow…
mariana953 Sep 26, 2026
21b2c90
fix(website): a shelf showing everything stops promising more
mariana953 Sep 26, 2026
2134692
fix(website): video controls stay long enough to use on a phone
mariana953 Sep 26, 2026
e9aec65
test(website): a link is checked at both of its ends
mariana953 Sep 26, 2026
c8551d9
Merge branch 'mariana/v2-workflow-graph-reader' into mariana/v2-workf…
mariana953 Sep 26, 2026
2297d16
test(website): hold both shelves to the See all boundary
mariana953 Sep 26, 2026
41d16c0
test(website): card artwork carries no accessible name
mariana953 Sep 26, 2026
e17c80a
test(website): the eyebrow's shelf leads to that shelf
mariana953 Sep 26, 2026
45a17ad
test(website): the API tab's address is checked in the browser too
mariana953 Sep 26, 2026
2d95263
fix(website): a run Cloud reports failed is said once, by the panel
mariana953 Sep 26, 2026
b05d995
Merge branch 'mariana/v2-workflow-refusals' into mariana/v2-workflow-…
mariana953 Sep 26, 2026
72be62d
Merge branch 'mariana/v2-workflow-cancelled' into mariana/v2-workflow…
mariana953 Sep 26, 2026
16e34dc
test(website): a card's artwork carries no name in the browser either
mariana953 Sep 26, 2026
87ead2e
test(website): a complete shelf stops promising more, in the browser
mariana953 Sep 26, 2026
9f3adc4
test(website): the eyebrow leads back to its shelf, in the browser too
mariana953 Sep 26, 2026
fa0eaa5
test(website): a failed run outranks the error that dropped the conne…
mariana953 Sep 26, 2026
6331dc5
merge: take the refusal precedence test into the cancelled branch
mariana953 Sep 26, 2026
93380eb
merge: take the refusal precedence test into the state stories branch
mariana953 Sep 26, 2026
758553f
fix(website): stop animating a run the page can no longer see
mariana953 Sep 26, 2026
7534967
fix(website): stop a button label reserving height it never uses
claude Sep 26, 2026
1f7a17d
test(website): cover a dropped connection in the browser
mariana953 Sep 26, 2026
3722e76
test(website): make the button label check unable to pass vacuously
claude Sep 26, 2026
cac112d
fix(website): the run button stops spinning with the panel
mariana953 Sep 26, 2026
c42b0e4
refactor(website): name the run button's spinning condition
mariana953 Sep 26, 2026
19fbe09
test(website): cover the run button's spinner next to the component
mariana953 Sep 26, 2026
7f236b3
feat(website): the Apps tab lists the apps that open today
mariana953 Sep 26, 2026
eaf7cd3
fix(website): keep the apps copy in the Apps half's own chunk
mariana953 Sep 26, 2026
9bf1666
feat(website): the Apps tab opens to everyone who sees workflows
mariana953 Sep 26, 2026
800ba6f
feat(website): the workflow header names who made it
mariana953 Sep 27, 2026
1b3dfc5
feat(website): keep the layout-to-review menu off production
mariana953 Sep 27, 2026
b61d54b
feat(website): the workflow playground takes the V2 input panel
mariana953 Sep 27, 2026
947f2ee
feat(website): the catalogue names the Hub and keeps one line under it
mariana953 Sep 27, 2026
99d8fbe
fix(website): production ignores the review layout in the address
mariana953 Sep 27, 2026
b482832
test(website): wait for the workflows half before reading the hero
mariana953 Sep 27, 2026
3534d8a
feat(website): keep the subtitle per tab and name the catalogue Hub
mariana953 Sep 27, 2026
2f3e03f
feat(website): an app card is built like the cards beside it
mariana953 Sep 27, 2026
babf423
fix(models): name the filter after what it filters by
mariana953 Sep 27, 2026
945ea46
Merge remote-tracking branch 'origin/mariana/v2-catalogue-card' into …
mariana953 Sep 27, 2026
43aebda
Merge remote-tracking branch 'origin/mariana/v2-workflow-state-storie…
mariana953 Sep 27, 2026
96cdf10
Merge remote-tracking branch 'origin/mariana/v2-workflow-graph' into …
mariana953 Sep 27, 2026
313998b
feat(website): an app card carries its name and what it makes
mariana953 Sep 27, 2026
49b48a9
test(website): raise the models route JS ceiling to 1.82MB
mariana953 Sep 27, 2026
1cc533b
Merge remote-tracking branch 'origin/main' into mariana/v2-workflow-d…
mariana953 Sep 27, 2026
ef1d9cf
Merge branch 'mariana/v2-workflow-details-tab' into mariana/v2-workfl…
mariana953 Sep 27, 2026
b68bce7
Merge branch 'mariana/v2-workflow-facts' into mariana/v2-workflow-graph
mariana953 Sep 27, 2026
7b31f11
Merge branch 'mariana/v2-workflow-graph' into mariana/v2-workflow-form
mariana953 Sep 27, 2026
0a002b2
Merge remote-tracking branch 'origin/main' into mariana/v2-catalogue-…
mariana953 Sep 27, 2026
ef0a706
test(website): raise the models route JS ceiling to 1.82MB
mariana953 Sep 27, 2026
6648f1f
Merge branch 'mariana/v2-workflow-graph' into mariana/v2-workflow-form
mariana953 Sep 27, 2026
6d7e14a
test(website): raise the models route JS ceiling to 1.82MB
mariana953 Sep 27, 2026
deec3d7
Merge branch 'mariana/v2-workflow-facts' into mariana/v2-workflow-graph
mariana953 Sep 27, 2026
05c389e
Merge branch 'mariana/v2-workflow-graph' into mariana/v2-workflow-form
mariana953 Sep 27, 2026
0ab950b
fix(website): an app card spaces its name and task like a workflow card
mariana953 Sep 28, 2026
029125d
feat(website): Re-shoot gets artwork, the Hub keeps only open apps, a…
mariana953 Sep 28, 2026
fba1b93
fix(website): ship the foundry's own PP Formula woff2
claude Sep 28, 2026
b325da8
Merge remote-tracking branch 'origin/claude/ppformula-metrics' into c…
claude Sep 28, 2026
b2434d3
Merge remote-tracking branch 'origin/main' into claude/ppformula-metrics
claude Sep 28, 2026
842580b
[automated] Update website screenshot expectations
invalid-email-address Sep 28, 2026
c9bdd3c
Merge remote-tracking branch 'origin/claude/ppformula-metrics' into c…
claude Sep 28, 2026
afc2700
Merge remote-tracking branch 'origin/claude/ppformula-metrics' into c…
claude Sep 28, 2026
27e0287
fix(website): preload every PP Formula face rendered above the fold
claude Sep 28, 2026
609e96a
Merge remote-tracking branch 'origin/claude/ppformula-metrics' into c…
claude Sep 28, 2026
d00b968
[automated] Update website screenshot expectations
invalid-email-address Sep 28, 2026
220578a
Merge remote-tracking branch 'origin/claude/ppformula-metrics' into c…
claude Sep 28, 2026
19c96d0
test(website): close two ways the preload case could pass while blind
claude Sep 28, 2026
1d34f7a
Merge remote-tracking branch 'origin/claude/ppformula-metrics' into c…
claude Sep 28, 2026
3371866
Merge Mar PR #19031
benjcooley Sep 28, 2026
cff4cd3
Merge Mar PR #18916
benjcooley Sep 28, 2026
2e1f833
Merge Mar PR #18915
benjcooley Sep 28, 2026
f919f46
Merge Mar PR #19012
benjcooley Sep 28, 2026
ecfdd28
Merge Mar PR #19016
benjcooley Sep 28, 2026
0cc963f
Merge Mar PR #18987
benjcooley Sep 28, 2026
79e23f2
Merge Mar PR #19025
benjcooley Sep 28, 2026
fe9e797
Merge Mar PR #19090
benjcooley Sep 28, 2026
3ff2260
Merge Mar PR #19017
benjcooley Sep 28, 2026
bae24fd
Merge Mar PR #19011
benjcooley Sep 28, 2026
6d09794
Merge Mar PR #19014
benjcooley Sep 28, 2026
ec75cb0
Merge Mar PR #18921
benjcooley Sep 28, 2026
ca67f88
Merge Mar PR #19015
benjcooley Sep 28, 2026
77193df
Merge Mar PR #19009
benjcooley Sep 28, 2026
9440e9b
Merge Mar PR #19004
benjcooley Sep 28, 2026
51e18c8
Merge Mar PR #19005
benjcooley Sep 28, 2026
7a24a28
Merge Mar PR #19006
benjcooley Sep 28, 2026
95458bc
Merge Mar PR #19007
benjcooley Sep 28, 2026
0e13a51
Merge Mar PR #19022
benjcooley Sep 28, 2026
ea9f4cc
Merge Mar PR #18979
benjcooley Sep 28, 2026
f039b8f
Merge Mar PR #19008
benjcooley Sep 28, 2026
38e5842
Merge Mar PR #19010
benjcooley Sep 28, 2026
6ee4926
Merge Mar PR #19029
benjcooley Sep 28, 2026
a742595
Merge remote-tracking branch 'origin/main' into claude/ppformula-metrics
claude Sep 28, 2026
e36e9cc
Merge remote-tracking branch 'origin/claude/ppformula-metrics' into c…
claude Sep 28, 2026
e2714a0
Merge origin/main
benjcooley Sep 28, 2026
ce64a2b
Merge Mar PR #19023 (includes #18988)
benjcooley Sep 28, 2026
21d6226
test(website): one preload case per page, and fetch Regular first
claude Sep 28, 2026
b3b1cec
Merge remote-tracking branch 'origin/claude/ppformula-metrics' into c…
claude Sep 28, 2026
0afb487
Merge Mar PR #19023 (includes #18988) at b3b1cecfd7
benjcooley Sep 28, 2026
6410e89
refactor(website): the Details panel keeps only what it uses
mariana953 Sep 28, 2026
3f7c1c2
feat(website): the workflow names its model once
mariana953 Sep 28, 2026
74919cd
style(website): both workflow panels title themselves the same way
mariana953 Sep 28, 2026
5c8d3fa
test(website): reconcile Hub V2 PRs that first meet here
benjcooley Sep 28, 2026
93f61f3
test(website): the workflow header credits the template and nothing else
mariana953 Sep 28, 2026
8a501c9
Revert "style(website): both workflow panels title themselves the sam…
mariana953 Sep 28, 2026
21e5962
test(website): the header test stops waking the real session
mariana953 Sep 28, 2026
8af847a
Merge latest Mar PR #19004 into Hub V2 bundle
benjcooley Sep 28, 2026
668a243
Merge main into Hub V2 bundle
benjcooley Sep 28, 2026
0aea5d3
Merge latest main after #19275
benjcooley Sep 28, 2026
a87ccd2
fix(website): keep Apps behind its own rollout
benjcooley Sep 28, 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
3 changes: 3 additions & 0 deletions apps/website/e2e/models-catalogue-corrections.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ test('GPT Image generation pages remain discoverable while disabled edit pages a
.getByTestId('workshop-models-grid')
.getByTestId('workshop-model-card')
await expect(cards).toHaveCount(5)
const card = cards.first()
await expect(card).toHaveAccessibleName(/GPT Image/)
await expect(card.getByRole('img', { name: /GPT Image/ })).toHaveCount(0)
await page.getByRole('link', { name: /GPT Image 1\.5/ }).click()
await expect(page).toHaveURL(
/\/models\/openai--gpt-image-1\.5--edit-images\/$/
Expand Down
2 changes: 1 addition & 1 deletion apps/website/e2e/models-performance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ test('catalogue browsing stays within its JavaScript budget', async ({
// a chunk the homepage also loads would pass the delta and still be paid
// for by every visitor to /models/.
const totalBytes = scripts.reduce((total, [, bytes]) => total + bytes, 0)
expect(totalBytes).toBeLessThan(1_815_000)
expect(totalBytes).toBeLessThan(1_820_000)
})

test('video cards load on screen and stop playing when scrolled away', async ({
Expand Down
8 changes: 6 additions & 2 deletions apps/website/e2e/workshop-apps.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test('opens Cinematic Studio on the apps flag alone', async ({
)
})

test('keeps Cinematic Studio closed when only the workflows flag is on', async ({
test('opens Cinematic Studio on the workflows flag alone', async ({
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
page,
context
}) => {
Expand All @@ -52,13 +52,17 @@ test('lists both apps in the catalogue Apps tab, on /models/apps/ pages', async
}) => {
await mockFlags(context, { apps: true, workflows: false })
await page.goto('/models/?type=apps')
const cards = page.getByTestId('apps-list').getByTestId('workshop-model-card')
const shelf = page.getByTestId('app-shelf')
const cards = shelf.getByRole('link')
await expect(cards).toHaveCount(2)
await expect(cards.nth(0)).toHaveAttribute(
'href',
'/models/apps/cinematic-studio/'
)
await expect(cards.nth(1)).toHaveAttribute('href', '/models/apps/reshoot/')
await expect(
page.getByRole('button', { name: /Browse all apps/ })
).toHaveCount(0)
})

test('sends the old studio address to the app page it named', async ({
Expand Down
63 changes: 48 additions & 15 deletions apps/website/e2e/workshop-workflow-runs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const image = readFileSync('e2e/assets/placeholder-1x1.webp')
async function setup(context: BrowserContext) {
let enabled = true
let generation = 0
let reachable = true
await context.route('https://apis.google.com/js/api.js*', (route) =>
route.abort('blockedbyclient')
)
Expand Down Expand Up @@ -93,6 +94,7 @@ async function setup(context: BrowserContext) {
const request = route.request()
const url = new URL(request.url())
const method = request.method()
if (!reachable) return route.abort('failed')
commands.push({
method,
path: url.pathname,
Expand All @@ -115,6 +117,9 @@ async function setup(context: BrowserContext) {
disable() {
enabled = false
},
drop() {
reachable = false
},
cancel() {
current = { ...current, status: 'cancelled', update_time: Date.now() }
}
Expand Down Expand Up @@ -143,7 +148,7 @@ async function signInAndRun(
page.getByRole('button', { name: 'Replace photo.webp' })
).toBeVisible()
await page.getByTestId('workflow-run').click()
await expect(page.getByTestId('workflow-run')).toHaveText('Queued')
await expect(page.getByTestId('workflow-run')).toHaveText('Waiting its turn')
}

test('Cloud upload, refresh, partial delivery and downloads retain one run @mobile', async ({
Expand All @@ -165,25 +170,28 @@ test('Cloud upload, refresh, partial delivery and downloads retain one run @mobi
})

await page.reload()
await expect(page.getByTestId('workflow-run')).toHaveText('Queued')
await expect(page.getByTestId('workflow-run')).toHaveText('Waiting its turn')
expect(cloud.uploads).toHaveLength(1)
expect(submissions()).toHaveLength(1)
await page.getByRole('tab', { name: 'API', exact: true }).click()
// The address a run is posted to, before the snippet that posts to it.
await expect(page.getByTestId('workflow-api-endpoint')).toContainText(
'/api/prompt'
)
await expect(
page.getByRole('link', { name: 'API documentation' })
).toBeVisible()
const snippet = await page.getByTestId('workflow-api-snippet').textContent()
expect(snippet).toContain('/api/prompt')
expect(snippet).toContain('X-API-Key:')
await page.setViewportSize({ width: 320, height: 851 })
await page.getByRole('tab', { name: 'Workflow', exact: true }).click()
await page.getByRole('tab', { name: 'Details', exact: true }).click()
await expect(
page.getByRole('img', { name: 'Workflow', exact: true })
page.getByRole('img', { name: /nodes of this workflow/i })
).toBeVisible()
const panelRight = await page
.getByRole('tabpanel', { name: 'Workflow', exact: true })
.evaluate(
(panel) =>
panel.getBoundingClientRect().right -
parseFloat(getComputedStyle(panel).paddingRight)
)
.getByRole('tabpanel', { name: 'Details', exact: true })
.evaluate((panel) => panel.getBoundingClientRect().right)
const downloadRight = await page
.getByRole('link', { name: 'Download workflow JSON' })
.evaluate((link) => link.getBoundingClientRect().right)
Expand Down Expand Up @@ -303,13 +311,10 @@ test('workflow cancellation survives disabled admission and hides on sign-out',
await page.clock.fastForward(2100)
await expect(page.getByTestId('playground-output')).toHaveAttribute(
'data-state',
'idle'
'cancelled'
)
await expect(
page.getByText(
'Cancellation requested. Check Cloud for the final job status.',
{ exact: true }
)
page.getByText('This run was cancelled before it finished.').first()
).toBeVisible()
await expect(page.getByTestId('workflow-run')).toBeDisabled()
await page.locator('[data-testid="header-account"]:visible').click()
Expand All @@ -321,3 +326,31 @@ test('workflow cancellation survives disabled admission and hides on sign-out',
)
).toHaveLength(1)
})

test('a run the page stops hearing about holds the panel still', async ({
page,
context,
modelsAccount
}) => {
const cloud = await setup(context)
await signInAndRun(page, modelsAccount)
const panel = page.getByTestId('playground-output')
const run = page.getByTestId('workflow-run')
await expect(panel).toHaveAttribute('data-state', 'running')
await expect(panel.getByTestId('run-spinner')).toBeVisible()
await expect(panel.getByTestId('run-elapsed')).toBeVisible()
await expect(run.getByTestId('run-button-spinner')).toBeVisible()

cloud.drop()
await page.clock.fastForward(2100)

await expect(panel.getByRole('status')).toHaveText('Connection interrupted')
await expect(panel).toHaveAttribute('data-state', 'running')
await expect(panel.getByTestId('run-spinner')).toHaveCount(0)
await expect(panel.getByTestId('run-elapsed')).toHaveCount(0)
await expect(run).toHaveText('Connection interrupted')
await expect(run.getByTestId('run-button-spinner')).toHaveCount(0)
await expect(
page.getByRole('button', { name: 'Reconnect to this run' })
).toBeVisible()
})
8 changes: 6 additions & 2 deletions apps/website/e2e/workshop-workflows.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ test('workflow launch groups lead to the existing shared form', async ({
'href',
'/models/workflows/change-material/'
)
await page.getByTestId('browse-all').click()
await page.getByTestId('browse-all-end').click()
await expect(page.getByRole('heading', { level: 1 })).toHaveText(
'All workflows 30'
)
Expand All @@ -88,6 +88,10 @@ test('workflow launch groups lead to the existing shared form', async ({
await expect(
page.getByRole('heading', { name: 'Change a material', exact: true })
).toBeVisible()
// The eyebrow names the shelf this workflow sits on, and leads back to it.
const shelf = page.getByTestId('workflow-use-case')
await expect(shelf).toHaveText('Edit images')
await expect(shelf).toHaveAttribute('href', '/models?useCase=edit-images')
await expect(
page.getByRole('group', { name: 'Your original image' })
).toBeVisible()
Expand All @@ -104,13 +108,13 @@ test('workflow launch groups lead to the existing shared form', async ({
.click()
await page.getByTestId('example-replace-keep').click()
await expect(prompt).toHaveValue('Use the material from the second image.')
await page.getByRole('tab', { name: 'Details', exact: true }).click()
await expect(
page.getByRole('link', { name: 'Try in Cloud' })
).toHaveAttribute(
'href',
'https://testcloud.comfy.org/?template=image_qwen_image_edit_2511'
)
await page.getByRole('tab', { name: 'Workflow', exact: true }).click()
const graphFiles = [
{
link: page.getByRole('link', { name: 'Open full-size workflow preview' }),
Expand Down
28 changes: 27 additions & 1 deletion apps/website/e2e/workshop.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,35 @@ test.describe('Models catalog', () => {
await expect(page.getByTestId('workshop-hero')).toBeVisible()
})

// A row loads eight whatever its total says, so a row holding fewer than
// eight cards is showing its whole shelf and has nothing left to open.
test('a shelf showing everything stops promising more', async ({ page }) => {
await page.goto('/models/')
const sections = page.getByTestId('workshop-sections')
await expect(sections).toBeVisible()
await expect(
sections.getByTestId('workshop-model-card').first()
).toBeVisible()
const shelves = sections
.locator('[data-testid^="section-"]')
.filter({ has: page.getByTestId('workshop-model-card') })
const count = await shelves.count()
expect(count).toBeGreaterThan(1)

let complete = 0
for (let index = 0; index < count; index++) {
const shelf = shelves.nth(index)
if ((await shelf.getByTestId('workshop-model-card').count()) >= 8)
continue
complete++
await expect(shelf.locator('[data-testid$="-see-all"]')).toHaveCount(0)
}
expect(complete).toBeGreaterThan(0)
})

test('the rows listing opens the whole catalogue', async ({ page }) => {
await page.goto('/models/')
await page.getByTestId('browse-all').click()
await page.getByTestId('browse-all-end').click()

await expect(page.getByTestId('workshop-sections')).toHaveCount(0)
const heading = page.getByRole('heading', { level: 1 })
Expand Down
44 changes: 43 additions & 1 deletion apps/website/src/components/common/VideoPlayer.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { render, screen } from '@testing-library/vue'
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, onTestFinished, vi } from 'vitest'
import { nextTick } from 'vue'

import VideoPlayer from './VideoPlayer.vue'

Expand Down Expand Up @@ -96,6 +97,47 @@ describe('VideoPlayer', () => {
}
)

// A pointer that hovers keeps the bar up for as long as it rests on the
// player. A finger cannot: the window after playback starts is the whole of
// the bar's visit, and 800ms was long enough to see the controls and too
// short to hit one.
it.for([
{ hover: true, after: 1000, reachable: false },
{ hover: false, after: 1000, reachable: true },
{ hover: false, after: 5000, reachable: false }
])(
'leaves the bar reachable $reachable $after ms into playback (hover: $hover)',
async ({ hover, after, reachable }) => {
vi.stubGlobal('matchMedia', (query: string) => ({
matches: query === '(hover: hover)' ? hover : false,
media: query,
addEventListener: () => {},
removeEventListener: () => {}
}))
vi.useFakeTimers()
onTestFinished(() => {
vi.useRealTimers()
})
vi.spyOn(HTMLMediaElement.prototype, 'paused', 'get').mockReturnValue(
false
)
render(VideoPlayer, {
props: { src: 'https://example.com/clip.mp4', controlsOnHover: true }
})

// Playback starting is what summons the bar, and the only thing that does
// on a device with no pointer to rest here.
await vi.waitFor(() =>
expect(screen.getByRole('button', { name: 'Pause' })).toBeTruthy()
)
vi.advanceTimersByTime(after)
await nextTick()

const bar = screen.getByTestId('player-control-bar')
expect(bar.className.includes('pointer-events-none')).toBe(!reachable)
}
)

it('shows play and mute for a paused, unmuted video', async () => {
render(VideoPlayer, {
props: { src: 'https://example.com/clip.mp4', muteOnly: true }
Expand Down
9 changes: 8 additions & 1 deletion apps/website/src/components/common/VideoPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
useFocusWithin,
useFullscreen,
useMediaControls,
useMediaQuery,
useMouseInElement,
whenever
} from '@vueuse/core'
Expand Down Expand Up @@ -119,7 +120,12 @@ watch(
// Controls fade
const hovering = useElementHover(playerEl)
const { focused } = useFocusWithin(playerEl)
const recentActivity = refAutoReset(false, 800)
// A pointer that hovers keeps the bar up for as long as it rests here, so the
// window after it moves can be short. A finger cannot hover: the tap that
// summoned the bar is the whole of its visit, and 800ms was long enough to see
// the controls and too short to hit one.
const canHover = useMediaQuery('(hover: hover)')
const recentActivity = refAutoReset(false, () => (canHover.value ? 800 : 4000))

const controlsVisible = computed(
() =>
Expand Down Expand Up @@ -379,6 +385,7 @@ function toggleFullscreen() {
<!-- Bottom control bar -->
<div
v-if="src && !minimal && !hideControls && !muteOnly"
data-testid="player-control-bar"
:class="
cn(
'absolute inset-x-0 bottom-0 flex items-center gap-3 p-4 transition-opacity duration-300 lg:px-6 lg:py-5',
Expand Down
35 changes: 35 additions & 0 deletions apps/website/src/components/home/DiscoveryProviderCard.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<script setup lang="ts">
import { ref } from 'vue'

import type { DiscoveryProvider } from '../../data/modelDiscovery'
import StaticFrame from '../workshop/StaticFrame.vue'

const { provider } = defineProps<{ provider: DiscoveryProvider }>()

// The preview is fetched the first time this card is pointed at or focused, so
// a looping row of them costs nothing until someone shows interest in one.
const revealed = ref(false)
</script>

<template>
<a @pointerenter="revealed = true" @focus="revealed = true">
<template v-if="revealed && provider.thumbnailUrl">
<StaticFrame
:src="provider.thumbnailUrl"
class="absolute inset-0 size-full object-cover opacity-0 transition-opacity duration-300 group-hover/card:opacity-50 group-focus-visible/card:opacity-50"
/>
<span
class="absolute inset-0 bg-black/60 opacity-0 transition-opacity duration-300 group-hover/card:opacity-100 group-focus-visible/card:opacity-100"
aria-hidden="true"
/>
</template>
<span
class="relative size-9 bg-current mask-contain mask-center mask-no-repeat"
:style="{ maskImage: `url(${provider.logo})` }"
aria-hidden="true"
/>
<span class="relative flex flex-col gap-0.5">
<span class="text-base/tight font-medium">{{ provider.name }}</span>
</span>
</a>
</template>
26 changes: 26 additions & 0 deletions apps/website/src/components/home/DiscoveryWorkflowCard.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<script setup lang="ts">
import type { DiscoveryWorkflow } from '../../data/modelDiscovery'
import StaticFrame from '../workshop/StaticFrame.vue'

// A provider stands for a body of work and says so with its mark; a workflow
// stands for one finished job, so it leads with the job.
const { workflow } = defineProps<{ workflow: DiscoveryWorkflow }>()
</script>

<template>
<a>
<StaticFrame
:src="workflow.thumbnailUrl"
class="absolute inset-0 size-full object-cover transition-transform duration-300 group-hover/card:scale-105"
/>
<span
class="absolute inset-0 bg-linear-to-t from-black/80 to-transparent"
aria-hidden="true"
/>
<!-- The card has a side inset and no vertical one, so the name has to
carry its own or it sits on the bottom edge. -->
<span class="relative mt-auto w-full pb-5 text-base/tight font-medium">
{{ workflow.name }}
</span>
</a>
</template>
Loading
Loading