feat: write .comfy_environment marker for desktop builds#1719
feat: write .comfy_environment marker for desktop builds#1719Kosinkadink wants to merge 1 commit into
Conversation
ComfyUI now reads a .comfy_environment file from its install directory and sends the value as the X-Comfy-Deploy-Env header on partner-node API calls (defaults to 'local-git' when missing). Write 'local-desktop' into assets/ComfyUI/.comfy_environment after the ComfyUI clone in scripts/makeComfy.js so the bundled copy ships with the correct identifier. Also extend scripts/verifyBuild.js to require the marker in both Mac and Windows build outputs, so a missing/dropped dotfile fails CI loudly instead of silently regressing to the local-git default. Mirrors the portable build's existing 'local-portable' marker (ComfyUI commit e35348aa). Amp-Thread-ID: https://ampcode.com/threads/T-019e1852-4349-768a-abb0-b78b78475c8d Co-authored-by: Amp <amp@ampcode.com>
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR establishes desktop environment marking by creating a ChangesDeploy Environment Configuration
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Combined into #1718, closing |
Summary
ComfyUI recently added a deploy-environment header (commits e7fbb3c2, 06e416bd, 38e5aac7, e35348aa upstream):
comfy/deploy_environment.pyreads a.comfy_environmentfile from the ComfyUI install directory (next tomain.py) and sends its first line as theX-Comfy-Deploy-Envheader on partner-node API calls. Falls back tolocal-gitwhen missing.The portable build already writes
local-portable. This PR is the equivalent for legacy desktop, writinglocal-desktopso api.comfy.org can distinguish desktop traffic.Changes
scripts/makeComfy.js: writelocal-desktop\ntoassets/ComfyUI/.comfy_environmentimmediately after the ComfyUI clone. The file is gitignored upstream so it does not dirty the cloned working tree.scripts/verifyBuild.js: requireComfyUI/.comfy_environmentin both Mac and Windows build outputs so a missing/dropped dotfile fails CI loudly instead of silently regressing tolocal-git.Why this is safe at runtime
The desktop app runs ComfyUI in place from
<resourcesPath>/ComfyUI/main.py. Per upstream commit 38e5aac7,deploy_environment.pyreads the marker from the install directory (next tomain.py), not from--base-directory-- so the user's chosen base path is irrelevant and no Electron-side code changes are needed.Verification
yarn typecheck-> passesyarn prettier --checkon changed files -> passesyarn eslinton changed files -> passesverify:buildwill assert the file is bundled at the correct path┆Issue is synchronized with this Notion page by Unito