Commit Graph

4 Commits

Author SHA1 Message Date
bymyself
3f27e7532d Simplify OS detection to use systemStatsStore only
- Remove navigator fallback since systemStatsStore is the standard
- Default to Windows when OS info not available
- Simplify tests to match new behavior
- More consistent with app architecture
2025-07-19 15:06:07 -07:00
bymyself
939323b563 Fix URL constants tests to match actual implementation
- Update getLocalized tests to expect full URLs with domain instead of paths
- Fix test for empty path to avoid double slashes
- Update allowedDomains regex to handle localhost URLs properly
- Rename test to reflect it validates URLs, not just domain names
2025-07-18 14:41:21 -07:00
bymyself
08daa6f3ef Fix regex patterns in URL constants tests
Remove unnecessary escape characters in regex patterns to satisfy eslint no-useless-escape rule.
2025-07-18 14:14:01 -07:00
bymyself
5faf9e0105 [refactor] centralize hardcoded URLs into organized constants
- Create src/constants/urls.ts with centralized URL constants (COMFY_URLS, GITHUB_REPOS, MODEL_SOURCES, DEVELOPER_TOOLS)
- Move runtime domain config to src/config/comfyDomain.ts to allow forkers to customize via env var
- Rename uvMirrors.ts to mirrors.ts for better naming consistency
- Add platform and locale-aware desktop guide URL generation (matching PR #4471)
- Update 10 components to use centralized URL constants
- Add comprehensive unit and e2e tests for URL constants validation

This refactoring improves maintainability by centralizing 150+ hardcoded URLs found across 50+ files into a single organized structure.
2025-07-18 13:45:32 -07:00