Repository navigation
feat(first-run-tour): resolve tour roles from pinned nodes #14142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
119 commits
Select commit
Hold shift + click to select a range
9897739
feat: add product coachmark onboarding tours
pythongosssss cc74e1d
add assets step to app mode tour
pythongosssss 75af043
- change dialog to use standard component
pythongosssss f80deb9
[automated] Apply ESLint and Oxfmt fixes
actions-user f642384
change dash stroke to solid
pythongosssss 5e23f76
fix: address coachmark tour review feedback
pythongosssss c51f963
trim comments
pythongosssss e9729ca
drop blankCanvas tour
pythongosssss f973626
improve test coverage
pythongosssss 5dbb560
refactor + tidy
pythongosssss 88cd848
fix test
pythongosssss fdfa988
feat: make app-mode tour explicit-only and refine assets step
pythongosssss 5118212
feat: auto-open app-mode tour for populated apps
pythongosssss 07356e3
tidy
pythongosssss b65da23
refactor: slim coachmark target tracking and spotlight chrome
pythongosssss 87d0a11
fix: close the coachmark landing on Escape explicitly
pythongosssss a818b7e
test: open the template browser in the coachmark drift guard
pythongosssss 9b8dd27
refactor: gate coachmark tour listeners behind an active-step component
pythongosssss 5383e23
Merge origin/main into pysssss/product-coachmarks
pythongosssss 3f84d4f
test: cover forced tour start, button labels, and spotlight escape
pythongosssss 64d10da
refactor: place coachmark cards with Floating UI
pythongosssss 831813a
fix: stop coachmark spotlight polling once its target settles
pythongosssss ce8b107
fix: correct coachmark tour skip telemetry and one-shot forcing
pythongosssss 2312b21
refactor: address coachmark tour review feedback
pythongosssss 96c2ae1
feat: add landing image to the app-mode tour
pythongosssss 549200a
fix: address coachmark tour stacking, telemetry, and fixture review n…
pythongosssss e97746f
refactor: address coachmark tour PR feedback
pythongosssss e7cdfc8
chore: ignore derived coachmark keys in the unused-i18n check
pythongosssss 9bcfda8
refactor: reconcile v-coachmark from the element's own data-coach-id
pythongosssss 76abe8e
Merge branch 'main' into pysssss/product-coachmarks
pythongosssss bb39a51
fix: narrow the coachmark i18n exemption to derived step keys
pythongosssss 7630cc9
fix: use the generic Skip label on the coachmark tour landing
pythongosssss 61756e9
fix missing modal backdrop
pythongosssss 9a71b54
refactor: move the coachmark tour state machine into a Pinia store
pythongosssss ccb3cd4
fix: restore the coachmark landing's md max-width
pythongosssss 9730850
fix: keep the coachmark tour alive when outputs clear
pythongosssss 25ce1eb
Merge remote-tracking branch 'origin/main' into pysssss/product-coach…
pythongosssss f1f7c53
feat: rework coachmark assets step and add step-back navigation
pythongosssss 7df585e
flush -> nextTick
pythongosssss 3f5b71a
refactor: use reka FocusScope for coachmark focus trapping
pythongosssss cb1be63
decrease padding
pythongosssss 66b9f32
update wording
pythongosssss dff76db
make button grow, match design
pythongosssss 62806d5
Merge branch 'main' into pysssss/product-coachmarks
pythongosssss 13fd072
Merge branch 'main' into pysssss/product-coachmarks
AustinMroz 62bb4d4
Merge remote-tracking branch 'origin/main' into pysssss/product-coach…
MaanilVerma e9caa31
test(onboarding): fix the coachmark drift-guard's assets-tab selector
MaanilVerma fcd151d
feat(onboarding): accept virtual coachmark targets
MaanilVerma b8c7035
feat(onboarding): add step onEnter hooks and async tour resolvers
MaanilVerma daef85f
feat(onboarding): mask-based scrim for interactive steps
MaanilVerma 44a383e
feat(first-run-tour): resolve canvas nodes as coachmark targets
MaanilVerma 1389a48
refactor(first-run-tour): drop the unused canvas union rect
MaanilVerma 76d612c
refactor(onboarding): spotlight one target, drop the unused extra mas…
MaanilVerma 0f93f63
refactor(first-run-tour): map canvas targets with litegraph's own camera
MaanilVerma 3f20384
refactor(persistence): return a startup outcome instead of routing on…
MaanilVerma 35267ba
feat(first-run-tour): add the onboarding tour feature flag
MaanilVerma 71dd832
fix(tab): merge a caller's class into TabList
MaanilVerma 4a59f74
feat(first-run-tour): decide the first-run entry surface at startup
MaanilVerma a661971
feat(first-run-tour): add the Getting Started screen
MaanilVerma 6e852a7
feat(first-run-tour): resolve template roles from pinned nodes
MaanilVerma 69aa9aa
chore(first-run-tour): drop an unused Getting Started string
MaanilVerma 3143aa9
feat(first-run-tour): build the step sequence from resolved roles
MaanilVerma 7dff28b
test(first-run-tour): clear the teleported screen between tests
MaanilVerma 386812b
test(first-run-tour): guard the role pins against template drift
MaanilVerma edf4363
fix(first-run-tour): centre the Getting Started screen
MaanilVerma db7ad16
test(first-run-tour): fail the drift guard on the templates the grid …
MaanilVerma 2b4516e
Merge main
AustinMroz 613ab51
Merge branch 'pysssss/product-coachmarks' into feat/tour-engine-canva…
MaanilVerma e48f50b
Merge branch 'feat/tour-engine-canvas-targets' into feat/getting-star…
MaanilVerma 108d529
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma d221753
test(first-run-tour): let the drift guard tolerate a lagging backend
MaanilVerma 890f946
Merge branch 'feat/tour-role-resolution' of https://github.com/Comfy-…
MaanilVerma c671e33
Merge main (again)
AustinMroz 45b1e53
refactor(onboarding): follow the camera instead of polling the target
MaanilVerma 1cfccec
refactor(onboarding): position the card from the target itself
MaanilVerma 7bd2325
Merge branch 'feat/tour-engine-canvas-targets' into feat/getting-star…
MaanilVerma 95c7053
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma 7b0893d
refactor(first-run-tour): address review on the Getting Started screen
MaanilVerma dcf4580
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma 9340261
fix(first-run-tour): finish the tutorial thumbnail rotation
MaanilVerma cb3d4df
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma 9a5d2be
refactor(onboarding): target canvas nodes by selector, not camera maths
MaanilVerma 87a840f
Merge branch 'feat/tour-engine-canvas-targets' into feat/getting-star…
MaanilVerma eaec0f9
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma 607d5e9
refactor(onboarding): hold tour progress in one state, not four refs
MaanilVerma 4c2da0c
Merge branch 'feat/tour-engine-canvas-targets' into feat/getting-star…
MaanilVerma b2ad9a8
fix(first-run-tour): mark the tutorial done for users who never see t…
MaanilVerma 55fe4c8
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma 4defd24
refactor(onboarding): derive canvas coachmark targets from layout, no…
MaanilVerma 69a9893
Merge branch 'feat/tour-engine-canvas-targets' into feat/getting-star…
MaanilVerma eed29ee
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma d7379b0
refactor(onboarding): give the tour one transition table
MaanilVerma 7b5610e
Merge branch 'feat/tour-engine-canvas-targets' into feat/getting-star…
MaanilVerma 11a8689
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma 44957e8
style(onboarding): group the Loader import with the local ones
MaanilVerma c96563b
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma 2aa059f
fix(onboarding): release the canvas target's observers with the tour
MaanilVerma 54650a1
Merge branch 'feat/tour-engine-canvas-targets' into feat/getting-star…
MaanilVerma 9319617
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma a2d25ee
Merge remote-tracking branch 'origin/main' into feat/tour-engine-canv…
MaanilVerma 733ed53
Merge branch 'feat/tour-engine-canvas-targets' into feat/getting-star…
MaanilVerma 314fbfd
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma cfde0dd
test(onboarding): pin that changing a step's copy moves nothing else
MaanilVerma 7c1f832
Merge branch 'feat/tour-engine-canvas-targets' into feat/getting-star…
MaanilVerma fb2b285
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma 2dbe668
fix(onboarding): identify the step attempt, not just the run
MaanilVerma d8cf085
Merge branch 'feat/tour-engine-canvas-targets' into feat/getting-star…
MaanilVerma adc5cf0
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma 7a7a56e
fix: keep onboarding off restored work and out of a reload dead-end
MaanilVerma d5aa5fc
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma 3619fdf
fix: drop the startup blank canvas instead of skipping persistence
MaanilVerma 1e0c8e1
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma 6fd3f36
test(first-run-tour): close the role-pin coverage gaps
MaanilVerma c722180
fix(first-run-tour): offer fallback templates that actually exist
MaanilVerma 85110b3
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma 157f6d2
fix(first-run-tour): repin the replaced fallbacks and relax the drift…
MaanilVerma bac312b
fix(onboarding): fall back through Skip to the card when a step has n…
MaanilVerma 0b96cdf
Merge branch 'feat/tour-engine-canvas-targets' into feat/getting-star…
MaanilVerma 8e6d25a
Merge branch 'feat/getting-started-screen' into feat/tour-role-resolu…
MaanilVerma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| import { expect } from '@playwright/test' | ||
|
|
||
| import type { | ||
| ExportedSubgraph, | ||
| ISerialisedNode, | ||
| SerialisableGraph | ||
| } from '@/lib/litegraph/src/types/serialisation' | ||
| import { | ||
| MEDIA_KIND_BY_SINK_TYPE, | ||
| TOUR_ROLE_PINS | ||
| } from '@/renderer/extensions/firstRunTour/roles/tourRolePins' | ||
| import type { | ||
| RolePin, | ||
| RolePins | ||
| } from '@/renderer/extensions/firstRunTour/roles/tourRolePins' | ||
| import { templateApiFixture as test } from '@e2e/fixtures/templateApiFixture' | ||
|
|
||
| const baseUrl = process.env.PLAYWRIGHT_TEST_URL || 'http://localhost:8188' | ||
|
|
||
| const pinnedTemplates = Object.entries(TOUR_ROLE_PINS) | ||
|
|
||
| function pinnedRoles(pins: RolePins): [string, RolePin][] { | ||
| const roles = { source: pins.source, prompt: pins.prompt, sink: pins.sink } | ||
| return Object.entries(roles).filter( | ||
| (entry): entry is [string, RolePin] => entry[1] !== undefined | ||
| ) | ||
| } | ||
|
|
||
| /** Subgraph definitions nest, and so does the resolver's host-mapping. */ | ||
| function nodesOf( | ||
| graph: SerialisableGraph | ExportedSubgraph | ||
| ): ISerialisedNode[] { | ||
| return [ | ||
| ...(graph.nodes ?? []), | ||
| ...(graph.definitions?.subgraphs ?? []).flatMap(nodesOf) | ||
| ] | ||
| } | ||
|
|
||
| /** Ids are graph-local, so a nested same-id node would satisfy a match-first lookup. */ | ||
| function matchingNodes(workflow: SerialisableGraph, id: number) { | ||
| return nodesOf(workflow).filter((node) => String(node.id) === String(id)) | ||
| } | ||
|
|
||
| test.describe('first-run tour role pins', { tag: '@workflow' }, () => { | ||
| test('every pinned node still exists with its pinned type', async ({ | ||
| request | ||
| }) => { | ||
| const unserved: string[] = [] | ||
|
|
||
| for (const [templateId, pins] of pinnedTemplates) { | ||
| const url = new URL(`/templates/${templateId}.json`, baseUrl).toString() | ||
| const response = await request.get(url) | ||
| if (!response.ok()) { | ||
| unserved.push(templateId) | ||
| continue | ||
| } | ||
|
|
||
| const workflow = (await response.json()) as SerialisableGraph | ||
| for (const [role, pin] of pinnedRoles(pins)) { | ||
| const matches = matchingNodes(workflow, pin.id) | ||
| expect( | ||
| matches, | ||
| `${templateId} pins its ${role} to node ${pin.id}, which this backend serves ${matches.length} times — a nested same-id node would resolve arbitrarily` | ||
| ).toHaveLength(1) | ||
| expect( | ||
| matches[0]?.type, | ||
| `${templateId} pins its ${role} to node ${pin.id}, which this backend no longer serves as a ${pin.type}` | ||
| ).toBe(pin.type) | ||
| } | ||
|
|
||
| expect( | ||
| MEDIA_KIND_BY_SINK_TYPE[pins.sink.type], | ||
| `${templateId} pins a ${pins.sink.type} sink but claims mediaKind '${pins.mediaKind}', so the result step would preview the wrong medium` | ||
| ).toBe(pins.mediaKind) | ||
| } | ||
| if (unserved.length) | ||
| test.info().annotations.push({ | ||
| type: 'unserved templates', | ||
| description: `pins unverified, not served by this backend: ${unserved.join(', ')}` | ||
| }) | ||
| expect( | ||
| pinnedTemplates.length - unserved.length, | ||
| `only ${pinnedTemplates.length - unserved.length} pinned templates are served, so the grid cannot fill — unserved: ${unserved.join(', ')}` | ||
| ).toBeGreaterThan(2) | ||
| }) | ||
| }) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8 - N >= 4means all four curated templates can 404 and this still passes, as long as the four fallbacks serve — and the curated four are the ones the Getting Started grid prefers. On #14141 I've filed that a catalog missing all eight IDs renders a blank Templates tab with no message and no retry; this guard is what should catch that first.expect(unserved, '…').toEqual([]), which also makes the annotation block above unnecessary.