Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
306ae55
Remove type text from slot
benceruleanlu Jul 21, 2025
fe1b61d
Format slots LR
benceruleanlu Jul 21, 2025
b7144ea
Deduplicate slots/widgets
benceruleanlu Jul 21, 2025
a5e2b45
Remove node body padding
benceruleanlu Jul 24, 2025
3748cf4
Add slots
benceruleanlu Jul 24, 2025
d0f70bc
Make node body gap consistent
benceruleanlu Jul 24, 2025
b0c35bc
Add slots UI
benceruleanlu Jul 24, 2025
7190b78
Strict height
benceruleanlu Jul 24, 2025
e72d29c
Add larger hitbox
benceruleanlu Jul 24, 2025
ac8af8b
nit
benceruleanlu Jul 24, 2025
d02d7aa
Update constant name
benceruleanlu Jul 24, 2025
b35a621
Add feature flag sync
benceruleanlu Jul 24, 2025
d8e5a5c
Temp tsc silencer
benceruleanlu Jul 24, 2025
a29f65c
Add event forwarding
benceruleanlu Jul 24, 2025
4d8a1cf
Hide "No Widgets" text
benceruleanlu Jul 25, 2025
a94a1fc
pr-1.5 to widgets
benceruleanlu Jul 25, 2025
4ee0a39
Fix slot visibility on widgets
benceruleanlu Jul 25, 2025
f959de7
nit
benceruleanlu Jul 25, 2025
8541800
Rename to vueNodesMode
benceruleanlu Jul 25, 2025
a099d9b
Disable DOM widgets in vue nodes mode
benceruleanlu Jul 25, 2025
9ebc97a
Merge to feature flag
benceruleanlu Jul 25, 2025
f2260d3
Add node header boilerplate test
benceruleanlu Jul 25, 2025
bf89129
feat: Add escape key support to EditableText component
benceruleanlu Jul 25, 2025
94f4479
Add test fixtures
benceruleanlu Jul 26, 2025
e44c6ae
Add data-testid to vue node header
benceruleanlu Jul 26, 2025
38292bb
Add vue node header tests
benceruleanlu Jul 26, 2025
692c77d
Fix handles node collapsing test
benceruleanlu Jul 26, 2025
b3d8182
Fix MARKDOWN => TEXTAREA test
benceruleanlu Jul 28, 2025
cd84802
Comment out misleading test expectation
benceruleanlu Jul 28, 2025
432bc4e
Squashed 'src/lib/litegraph/' content from commit f0f8e9e66
benceruleanlu Jul 28, 2025
14571ba
Merge commit '432bc4eea4ac3daaff0fda20b8ce875324b90f41' as 'src/lib/l…
benceruleanlu Jul 28, 2025
b732ed7
Add TypeScript path mapping for local litegraph subtree
benceruleanlu Jul 28, 2025
12c10cc
Remove @comfyorg/litegraph npm dependency
benceruleanlu Jul 28, 2025
86e7a14
Exclude litegraph from ESLint
benceruleanlu Jul 28, 2025
38acfbe
Remove litegraph-specific config files
benceruleanlu Jul 28, 2025
dc80e48
Configure litegraph as TypeScript composite project
benceruleanlu Jul 29, 2025
ba8f186
Revert "Add TypeScript path mapping for local litegraph subtree"
benceruleanlu Jul 29, 2025
44d80e0
Fix TypeScript errors in Rectangle.ts
benceruleanlu Jul 29, 2025
d6025b5
Fix imports
benceruleanlu Jul 29, 2025
11174de
Remove unused eslint
benceruleanlu Jul 29, 2025
cb5e8de
Remove duplicated/unused packages
benceruleanlu Jul 29, 2025
1e307e8
Fix pre-commit hook to use vue-tsc --build
benceruleanlu Jul 29, 2025
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
21 changes: 21 additions & 0 deletions src/lib/litegraph/.cursor/rules/unit-test.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
description: Creating unit tests
globs:
alwaysApply: false
---

# Creating unit tests

- This project uses `vitest` for unit testing
- Tests are stored in the `test/` directory
- Tests should be cross-platform compatible; able to run on Windows, macOS, and linux
- e.g. the use of `path.resolve`, or `path.join` and `path.sep` to ensure that tests work the same on all platforms
- Tests should be mocked properly
- Mocks should be cleanly written and easy to understand
- Mocks should be re-usable where possible

## Unit test style

- Prefer the use of `test.extend` over loose variables
- To achieve this, import `test as baseTest` from `vitest`
- Never use `it`; `test` should be used in place of this
62 changes: 62 additions & 0 deletions src/lib/litegraph/.github/workflows/dev-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Create Dev Release
description: Create a nightly-style npm package for a development / experimental branch. Do not use "latest" tag. This will not have a GitHub release / tag by default.

on:
workflow_dispatch:
inputs:
tag:
description: "npm tag (`ni pacakge@tag`)"
required: true
default: "subgraph"
gh-release:
description: "Draft a GitHub release"
type: boolean
required: false
default: false

jobs:
create-release:
runs-on: ubuntu-latest
if: inputs.gh-release == true
steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Get current version
id: current_version
run: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT

- name: Create release
id: create_release
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.current_version.outputs.version }}
draft: true
prerelease: true
generate_release_notes: true
make_latest: "false"

publish:
runs-on: ubuntu-latest
if: inputs.tag != 'latest'
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: lts/*
registry-url: "https://registry.npmjs.org"

- run: npm ci
- run: npm run build
- run: npm publish --access public --tag ${{ inputs.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
62 changes: 62 additions & 0 deletions src/lib/litegraph/.github/workflows/github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Create GitHub Release
description: Automatically creates a release when a PR is merged that both that changes package.json and has the Release label.

on:
pull_request:
types: [closed]
branches:
- main
- master
paths:
- "package.json"

jobs:
create-release:
runs-on: ubuntu-latest
if: >
github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'Release')
steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Get current version
id: current_version
run: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT

- name: Create release
id: create_release
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.current_version.outputs.version }}
draft: false
prerelease: false
generate_release_notes: true
make_latest: "true"

publish:
runs-on: ubuntu-latest
if: >
github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'Release')
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: lts/*
registry-url: "https://registry.npmjs.org"

- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
60 changes: 60 additions & 0 deletions src/lib/litegraph/.github/workflows/release-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release a New Version
description: Creates a PR to increment the version. When the PR is merged, it will automatically create a release.

on:
workflow_dispatch:
inputs:
version_type:
description: Version increment type
required: true
default: patch
type: choice
options: [patch, minor, major, prepatch, preminor, premajor, prerelease]
pre_release:
description: Pre-release ID (suffix)
required: false
default: ""
type: string

jobs:
bump-version:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: "npm"

- name: Bump version
id: bump-version
run: |
npm version ${{ github.event.inputs.version_type }} --no-git-tag-version
NEW_VERSION=$(node -p "require('./package.json').version")
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT

- name: Format PR string
id: capitalised
run: |
CAPITALISED_TYPE=${{ github.event.inputs.version_type }}
echo "capitalised=${CAPITALISED_TYPE@u}" >> $GITHUB_OUTPUT

- name: Create Pull Request
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
with:
token: ${{ secrets.PR_GH_TOKEN }}
commit-message: "[Release] Increment version to ${{ steps.bump-version.outputs.NEW_VERSION }}"
title: ${{ steps.bump-version.outputs.NEW_VERSION }}
body: |
${{ steps.capitalised.outputs.capitalised }} version increment to ${{ steps.bump-version.outputs.NEW_VERSION }}
branch: version-bump-${{ steps.bump-version.outputs.NEW_VERSION }}
base: master
labels: |
Release
115 changes: 115 additions & 0 deletions src/lib/litegraph/.github/workflows/test-comfyui-frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# This action should be kept in sync with
# https://github.com/Comfy-Org/ComfyUI_frontend/blob/main/.github/workflows/test-ui.yaml

name: Test ComfyUI Frontend

on:
workflow_dispatch:
inputs:
frontend-branch:
description: "Frontend branch"
required: true
default: "main"

push:
branches: [main, master]
paths-ignore:
- ".cursor/**"
- ".husky/**"
- ".vscode/**"
- ".github/ISSUE_TEMPLATE/**"
- "test/**"

pull_request:
branches: [main, master]
paths-ignore:
- ".cursor/**"
- ".husky/**"
- ".vscode/**"
- ".github/ISSUE_TEMPLATE/**"
- "test/**"

jobs:
test-comfyui-frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout litegraph
uses: actions/checkout@v4
with:
path: "litegraph"

- name: Checkout ComfyUI
uses: actions/checkout@v4
with:
repository: "comfyanonymous/ComfyUI"
path: "ComfyUI"
ref: master

- name: Checkout ComfyUI_frontend
uses: actions/checkout@v4
with:
repository: "Comfy-Org/ComfyUI_frontend"
path: "ComfyUI_frontend"
ref: ${{ inputs.frontend-branch }}

- name: Checkout ComfyUI_devtools
uses: actions/checkout@v4
with:
repository: "Comfy-Org/ComfyUI_devtools"
path: "ComfyUI/custom_nodes/ComfyUI_devtools"

- uses: actions/setup-node@v4
with:
node-version: lts/*

- uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install -r requirements.txt
pip install wait-for-it
working-directory: ComfyUI

- name: Build litegraph
run: |
npm ci
npm run build
working-directory: litegraph

- name: Install updated litegraph in ComfyUI_frontend
run: |
npm ci
npm install ../litegraph
npm run build
working-directory: ComfyUI_frontend

- name: Start ComfyUI server
run: |
python main.py --cpu --multi-user --front-end-root ../ComfyUI_frontend/dist &
wait-for-it --service 127.0.0.1:8188 -t 600
working-directory: ComfyUI

- name: Run UI tests
run: |
npm run test:component
npm run test:unit
working-directory: ComfyUI_frontend

- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps
working-directory: ComfyUI_frontend

- name: Run Playwright tests (chromium)
run: npx playwright test --project=chromium
working-directory: ComfyUI_frontend

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: ComfyUI_frontend/playwright-report/
retention-days: 30
35 changes: 35 additions & 0 deletions src/lib/litegraph/.github/workflows/test-lint-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Unit Test, Lint, and Format

on:
push:
branches: [main, master, "dev*"]
pull_request:
branches: [main, master, "dev*"]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Build
run: |
npm ci
npm run build

- name: Run lint
run: |
npm run lint:ci

- name: Run format
run: |
npm run format

- name: Run vitest tests
run: |
npm test -- --reporter=verbose
33 changes: 33 additions & 0 deletions src/lib/litegraph/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
temp/
temp/*
coverage/

# Editors
*.bak
.project

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
*.code-workspace
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
Loading