[PR #1208] [MERGED] Add ComfyUI workflow JSON file import #4983

Closed
opened 2026-10-22 04:12:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1208
Author: @cha1latte
Created: 5/25/2026
Status: ✅ Merged
Merged: 5/25/2026
Merged by: @cha1latte

Base: refactor ← Head: feature/refactor-issue-1150-comfyui-json-file


📝 Commits (1)

  • 796f1f4 Add ComfyUI workflow JSON file import

📊 Changes

1 file changed (+47 additions, -1 deletions)

View changed files

📝 src/features/shell/connections/components/ConnectionEditor.tsx (+47 -1)

📄 Description

Linked issue

Closes #1150

Why this change

  • Large ComfyUI API workflow JSON can be painful to paste into Marinara, especially on Android where clipboard size can make copying the whole workflow unreliable.

What changed

  • Added an Import JSON button above the ComfyUI workflow text area in the connection editor.
  • The picker accepts .json files, reads the selected workflow with the browser File API, validates JSON before replacing the text area, marks the editor dirty, and shows success/error toast feedback.
  • Invalid JSON and non-JSON selections do not overwrite the existing workflow text.

Refactor impact

Primary owner:

Shell connections UI.

Impact areas reviewed:

  • src/features/shell/connections/components/ConnectionEditor.tsx
  • Existing ComfyUI workflow validation and save payload path

Boundary notes:

  • Feature-only React UI change. No engine, shared API, Rust, remote runtime, storage schema, or dependency boundary changes.

Pressure points touched:

  • None. This stays inside the connection editor's existing ComfyUI workflow field.

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

  • Codex ran node scratch\issue-1150-verify-comfyui-import.mjs against local Vite. The script opened the real Connection editor UI with mocked Tauri storage, created an image-generation connection, selected ComfyUI, imported a valid workflow JSON file, confirmed %prompt% appeared in the workflow text area, then imported invalid JSON and confirmed the existing workflow text was not overwritten.
  • Codex ran pnpm check successfully after rebasing onto current upstream/refactor.
  • Codex ran pnpm build successfully after rebasing onto current upstream/refactor. Vite reported existing chunk-size/dynamic-import warnings.
  • Codex ran Bunny review before push: focused one-file diff, no schema/storage/dependency/auth/prompt-pipeline changes, invalid JSON negative control covered, and branch targets refactor.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

Docs/release notes: not changed; this is a focused UI affordance in an existing connection setting.

UI evidence

Codex generated local Playwright screenshots:

  • scratch/issue-1150-before-import.png
  • scratch/issue-1150-after-valid-import.png
  • scratch/issue-1150-after-invalid-import.png

These are local proof artifacts and are not attached to the PR body.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1208 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/25/2026 **Status:** ✅ Merged **Merged:** 5/25/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `feature/refactor-issue-1150-comfyui-json-file` --- ### 📝 Commits (1) - [`796f1f4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/796f1f4dada72ae3d4a91fbc77a217e217eb18b9) Add ComfyUI workflow JSON file import ### 📊 Changes **1 file changed** (+47 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/features/shell/connections/components/ConnectionEditor.tsx` (+47 -1) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue <!-- Every user-facing PR should reference a feature request or issue report when practical. --> Closes #1150 ## Why this change <!-- What user problem, bug, refactor goal, or maintenance need does this solve? --> - Large ComfyUI API workflow JSON can be painful to paste into Marinara, especially on Android where clipboard size can make copying the whole workflow unreliable. ## What changed <!-- List the key changes in this PR. --> - Added an `Import JSON` button above the ComfyUI workflow text area in the connection editor. - The picker accepts `.json` files, reads the selected workflow with the browser File API, validates JSON before replacing the text area, marks the editor dirty, and shows success/error toast feedback. - Invalid JSON and non-JSON selections do not overwrite the existing workflow text. ## Refactor impact Primary owner: <!-- Examples: app shell, catalog, chat mode, roleplay mode, game mode, runtime generation, world-state, shared API, engine generation, Rust storage, imports, remote runtime. --> Shell connections UI. Impact areas reviewed: - `src/features/shell/connections/components/ConnectionEditor.tsx` - Existing ComfyUI workflow validation and save payload path Boundary notes: <!-- Note engine/shared-api/feature/Rust/remote-runtime boundaries. Say "none" only if you checked. --> - Feature-only React UI change. No engine, shared API, Rust, remote runtime, storage schema, or dependency boundary changes. Pressure points touched: <!-- Mention ModeSurface, GameSurface, shared mode UI, src-tauri/src/lib.rs command registration, or import modules if touched. --> - None. This stays inside the connection editor's existing ComfyUI workflow field. ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> - [ ] `pnpm check` passes locally - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app/runtime, step by step. If an AI agent filled this out, verify it yourself before ticking boxes. --> - Codex ran `node scratch\issue-1150-verify-comfyui-import.mjs` against local Vite. The script opened the real Connection editor UI with mocked Tauri storage, created an image-generation connection, selected ComfyUI, imported a valid workflow JSON file, confirmed `%prompt%` appeared in the workflow text area, then imported invalid JSON and confirmed the existing workflow text was not overwritten. - Codex ran `pnpm check` successfully after rebasing onto current `upstream/refactor`. - Codex ran `pnpm build` successfully after rebasing onto current `upstream/refactor`. Vite reported existing chunk-size/dynamic-import warnings. - Codex ran Bunny review before push: focused one-file diff, no schema/storage/dependency/auth/prompt-pipeline changes, invalid JSON negative control covered, and branch targets `refactor`. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims Docs/release notes: not changed; this is a focused UI affordance in an existing connection setting. ## UI evidence <!-- Add before/after screenshots or recordings for visible UI changes. --> Codex generated local Playwright screenshots: - `scratch/issue-1150-before-import.png` - `scratch/issue-1150-after-valid-import.png` - `scratch/issue-1150-after-invalid-import.png` These are local proof artifacts and are not attached to the PR body. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:12:13 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4983
No description provided.