Skip to content

fix: apply default_launch_extras when cwd is the default workspace#374

Merged
bigcat88 merged 1 commit intomainfrom
fix-default-launch-extras-ignored
Mar 13, 2026
Merged

fix: apply default_launch_extras when cwd is the default workspace#374
bigcat88 merged 1 commit intomainfrom
fix-default-launch-extras-ignored

Conversation

@bigcat88
Copy link
Contributor

When a user cd's into their configured default ComfyUI workspace and runs comfy launch, the default_launch_extras setting is silently ignored. This happens because get_workspace_path() detects the cwd as a ComfyUI repo (step 4) and returns CURRENT_DIR before ever checking whether it matches the configured default (step 5). The launch command only applies default_launch_extras when the workspace type is DEFAULT.

The fix adds a check in step 4: when cwd is detected as a ComfyUI repo, compare it against the configured default workspace before deciding the type. If they match, return DEFAULT so the launch extras are applied correctly. The comparison uses os.path.samefile to handle symlinks and case-insensitive filesystems, with a realpath fallback for nonexistent paths.

This is a simpler alternative to #338 — only workspace_manager.py is changed, no modifications to launch.py needed.

Closes #311

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main     #374      +/-   ##
==========================================
+ Coverage   54.51%   54.89%   +0.38%     
==========================================
  Files          32       32              
  Lines        3603     3618      +15     
==========================================
+ Hits         1964     1986      +22     
+ Misses       1639     1632       -7     
Files with missing lines Coverage Δ
comfy_cli/workspace_manager.py 69.41% <100.00%> (+5.83%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bigcat88 bigcat88 force-pushed the fix-default-launch-extras-ignored branch from ce16f8c to f88a4f2 Compare March 13, 2026 08:38
@bigcat88 bigcat88 marked this pull request as ready for review March 13, 2026 08:50
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. bug Something isn't working labels Mar 13, 2026
@bigcat88 bigcat88 force-pushed the fix-default-launch-extras-ignored branch 2 times, most recently from b224f96 to 024b5a8 Compare March 13, 2026 09:35
When a user cd's into their configured default ComfyUI workspace and
runs comfy launch, default_launch_extras were silently ignored because
get_workspace_path returned CURRENT_DIR before checking if cwd matches
the configured default. Now step 4 compares cwd against the default
workspace and returns DEFAULT when they match.

Closes #311
@bigcat88 bigcat88 force-pushed the fix-default-launch-extras-ignored branch from 024b5a8 to f1cd7ef Compare March 13, 2026 09:43
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Mar 13, 2026
@bigcat88 bigcat88 merged commit 0ee7667 into main Mar 13, 2026
14 checks passed
@bigcat88 bigcat88 deleted the fix-default-launch-extras-ignored branch March 13, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

default_launch_extras configuration not being applied when using 'comfy launch'

1 participant