Comfy-Org / Comfy-Org/ComfyUI_frontend

[RFC] Extract duplicated utilities from `apps/desktop-ui/`

Open
#11,093 0 comments 0 reactions 0 assignees View on GitHub
developer experience Electron refactor
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Problem

`apps/desktop-ui/` duplicates several utilities that already exist in the main `src/` codebase or could be shared:

- Environment utilities
- Tailwind configuration helpers
- Ref utilities

This duplication means bug fixes and improvements must be applied in two places.

## Proposed Fix

1. Audit duplicated utilities between `apps/desktop-ui/` and `src/`
2. Extract shared code to `packages/shared-frontend-utils` (or a new shared package)
3. Both `src/` and `apps/desktop-ui/` import from the shared package

## Migration Plan

- Audit duplications first
- Extract to shared package in a single PR
- Update both consumers

## Testing Strategy

- Both apps' tests pass after migration
- Shared package gets its own unit tests

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11093-RFC-Extract-duplicated-utilities-from-apps-desktop-ui-33e6d73d3650813c8532d54aaeada51b) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.