[PR #958] [MERGED] [Refactor] Improve AppState public interface #1235

Closed
opened 2026-10-31 22:20:42 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/desktop/pull/958
Author: @webfiltered
Created: 2/19/2025
Status: ✅ Merged
Merged: 2/19/2025
Merged by: @webfiltered

Base: main ← Head: app-state-locator


📝 Commits (5)

  • 7387aec [Refactor] Improve AppState public interface
  • ef79e7c [Test] Remove old tests
  • 1c3ce1a [Test] Add AppState tests
  • 1d3eed1 Use app state locator directly in class initializers
  • 5dc488a Update test

📊 Changes

9 files changed (+197 additions, -31 deletions)

View changed files

📝 src/desktopApp.ts (+4 -5)
➕ src/infrastructure/appStartError.ts (+9 -0)
📝 src/main-process/appState.ts (+26 -4)
📝 src/main-process/appWindow.ts (+3 -2)
📝 src/main.ts (+3 -3)
📝 tests/unit/desktopApp.test.ts (+4 -16)
➕ tests/unit/main-process/appState.test.ts (+134 -0)
📝 tests/unit/main-process/appWindow.test.ts (+1 -1)
📝 tests/unit/setup.ts (+13 -0)

📄 Description

  • Throws on invalid usage
  • Ensures singleton
  • Adds service locator useAppState()
  • Adds missing tests

┆Issue is synchronized with this Notion page by Unito


🔄 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/Comfy-Org/desktop/pull/958 **Author:** [@webfiltered](https://github.com/webfiltered) **Created:** 2/19/2025 **Status:** ✅ Merged **Merged:** 2/19/2025 **Merged by:** [@webfiltered](https://github.com/webfiltered) **Base:** `main` ← **Head:** `app-state-locator` --- ### 📝 Commits (5) - [`7387aec`](https://github.com/Comfy-Org/desktop/commit/7387aec1eed991b3891161ead26c57da02e3a793) [Refactor] Improve AppState public interface - [`ef79e7c`](https://github.com/Comfy-Org/desktop/commit/ef79e7c19fbdd053425e8bbfd30b5bf4225a3535) [Test] Remove old tests - [`1c3ce1a`](https://github.com/Comfy-Org/desktop/commit/1c3ce1a43e4131b05a9b498e25defa7763df267d) [Test] Add AppState tests - [`1d3eed1`](https://github.com/Comfy-Org/desktop/commit/1d3eed16968ae927f0911951ed242b4710c1dd7b) Use app state locator directly in class initializers - [`5dc488a`](https://github.com/Comfy-Org/desktop/commit/5dc488a04f65d190c38ce6fe3ef2cd127aea5362) Update test ### 📊 Changes **9 files changed** (+197 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `src/desktopApp.ts` (+4 -5) ➕ `src/infrastructure/appStartError.ts` (+9 -0) 📝 `src/main-process/appState.ts` (+26 -4) 📝 `src/main-process/appWindow.ts` (+3 -2) 📝 `src/main.ts` (+3 -3) 📝 `tests/unit/desktopApp.test.ts` (+4 -16) ➕ `tests/unit/main-process/appState.test.ts` (+134 -0) 📝 `tests/unit/main-process/appWindow.test.ts` (+1 -1) 📝 `tests/unit/setup.ts` (+13 -0) </details> ### 📄 Description - Throws on invalid usage - Ensures singleton - Adds service locator `useAppState()` - Adds missing tests ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-958-Refactor-Improve-AppState-public-interface-19f6d73d36508170b327de6cf95f1e89) by [Unito](https://www.unito.io) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 22:20:42 +00: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
Comfy-Org/desktop#1235
No description provided.