## Summary
Remove dead code that checks for X-Reconnecting header which is never
actually set anywhere in the codebase.
## Changes
- Remove X-Reconnecting header check in fetchApi() method
- Simplify getAuthHeader() call to not pass unused parameter
## Context
The X-Reconnecting header was being checked but never set, making this
code non-functional. This cleanup removes the confusion and simplifies
the authentication flow.
## Test Plan
- Code builds without errors
- TypeScript validation passes
- Linting passes
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6495-fix-remove-unused-X-Reconnecting-header-check-29e6d73d365081df88faeb46b1789a83)
by [Unito](https://www.unito.io)
## 🐛 Problem
Users were experiencing the following issues during WebSocket
reconnection:
1. Automatic redirect to login page after "Reconnecting" toast message
appears
2. Automatic re-login after a few seconds, returning to the main
interface
3. This cycle repeats, severely degrading user experience
## 🔍 Root Cause Analysis
### 1. Router Guard Catching Too Many Errors
```typescript
// Problematic code
try {
const { getUserCloudStatus, getSurveyCompletedStatus } = await import('@/api/auth')
const userStatus = await getUserCloudStatus()
// ...
} catch (error) {
// All types of errors are caught here
return next({ name: 'cloud-user-check' })
}
```
With dynamic import inside the try block, the following were all being
caught:
- Errors during `@/api/auth` module loading
- Runtime errors from the API singleton
- Actual API call errors
Everything was caught and redirected to `cloud-user-check`.
### 2. Full Page Reload in UserCheckView
```typescript
// Problematic code
window.location.href = '/' // Full page reload!
```
This caused:
- Loss of SPA benefits
- Firebase Auth re-initialization → temporarily null user
- Router guard re-execution → potential for another redirect
## ✅ Solution
### 1. router.ts: Move dynamic import outside try block
```typescript
// After fix
const { getUserCloudStatus, getSurveyCompletedStatus } = await import('@/api/auth')
try {
// Only API calls inside try
const userStatus = await getUserCloudStatus()
// ...
} catch (error) {
// Now only catches pure API call errors
return next({ name: 'cloud-user-check' })
}
```
### 2. UserCheckView.vue: Use SPA routing
```typescript
// After fix
await router.replace('/') // Use Vue Router instead of window.location.href
```
🤖 Generated with [Claude Code](https://claude.ai/code)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6410-fix-prevent-unwanted-login-redirects-during-WebSocket-reconnection-29c6d73d3650818a8a1acbdcebd2f703)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: GitHub Action <action@github.com>
Needs to land after https://github.com/Comfy-Org/cloud/pull/398
## Description
- Adds a postCloudAnalytics method in `api.ts`
- Adds a workflow_loaded event
- The event contains
- the source (not file type, more like workflow format) one of:
- apiJson (I think this is the "prompt" format?)
- graph (the richest type)
- template: don't fully understand this but it works
- The actual data for the workflow, depends on the source type
- If available, missingModels and missingNodeTypes, so we can easily
query those
This talks to a new endpoint on the ingest server that is being added.
## Tests
Tested manually with:
- loading an image from civitAI with missing models
- loading an image from comfy examples with no missing models
- opening a json file in the prompt format (I asked claude to generate
one - this is the format handled by the loadApiJson function)
- opening a template file (claude generated one - this is the format
handled by loadTemplateJson function)
- Testing these for both dragAndDrop and (menu --> open --> open
workflow)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-4966-Add-analytics-for-workflow-loading-24e6d73d36508170acacefb3125b7017)
by [Unito](https://www.unito.io)
- Migrate from object-based to array-based history response format
- Update /history endpoint to /history_v2 with max_items parameter
- Add lazy loading of workflows via /history_v2/:prompt_id endpoint
- Implement comprehensive browser tests for history API functionality
- Add unit tests for API methods and queue store
- Update TaskItemImpl to support history workflow loading
- Add proper error handling and edge case coverage
- Follow established test patterns for better maintainability
This change improves performance by reducing initial payload size
and enables on-demand workflow loading for history items.
The refreshComboInNodes function was only iterating over top-level nodes,
missing nodes inside subgraphs. This caused file lists and combo widget
options to not update properly when new models were added, unless users
created completely new nodes.
Changes:
- Replace graph.nodes iteration with forEachNode() for hierarchical traversal
- Import forEachNode utility from graphTraversalUtil
- Change early continue to early return for callback function
Fixes#5196🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
* [fix] gracefully handle Firebase auth failure
* [test] Add failing tests to reproduce Firebase Auth network issue #4468
Add test cases that demonstrate the current problematic behavior where
Firebase Auth makes network requests when offline without graceful error
handling, causing toast error messages and degraded offline experience.
Tests reproduce:
- getIdToken() throwing auth/network-request-failed instead of returning null
- getAuthHeader() failing to fallback gracefully when Firebase token refresh fails
These tests currently pass by expecting the error to be thrown. After
implementing the fix, the tests should be updated to verify graceful
handling (returning null instead of throwing).
Related to issue #4468: Firebase Auth makes network requests when offline
without evicting token
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
* [test] update firebaseAuthStore tests
They match the behavior of the implemented solution now
* [test] add firebaseAuthStore.getTokenId test for non-network errors
* [chore] code review feedback
* [test] use FirebaseError
Co-authored-by: Alexander Brown <drjkl@comfy.org>
* [fix] remove indentation and fix test
---------
Co-authored-by: snomiao <snomiao@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
* feat: Remove obsolete Kontext Edit Button
Removes the 'Kontext Edit Button' and its associated code, as it has been made obsolete by the new 'Subgraphs + Partial Execution' feature.
Fixes#5093
* Update locales [skip ci]
---------
Co-authored-by: github-actions <github-actions@github.com>
- Updated all imports from '@comfyorg/litegraph' to '@/lib/litegraph/src/'
- Replaced deep dist imports with direct source paths
- Updated CSS import in main.ts
- All imports now use the @ alias consistently