Commit 7fd9770
Standardize useIsConnectedSelector across property components
* Initial plan
* fix: replace 'as any' with proper TypeScript types in web app
- TitleBar.tsx: use typed window.api.windowControls directly (from
window.d.ts); cast WebkitAppRegion style to CSSProperties intersection
- browser.ts: access window.process.type directly (already typed in
window.d.ts)
- audio.ts, useRealtimeAudioPlayback.ts, useRealtimeAudioStream.ts:
type webkitAudioContext via 'Window & { webkitAudioContext? }' instead
of casting window to any
- GlobalChat.tsx, StandaloneChat.tsx: use window.visualViewport directly
(typed in lib.dom.d.ts as VisualViewport | null)
- EditorController.tsx: add CSSWithHighlights, WindowWithHighlight, and
DocumentWithFragmentDirective type aliases for experimental APIs
- prismGlobal.ts, CodeHighlightPlugin.tsx: use typed globalThis
augmentation for Prism assignment
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Replace `as any` type assertions with proper TypeScript types
- outputChunkUtils.ts: use chunk?.content_type directly (Chunk has the property)
- ChunkRenderer.tsx: use chunk.content_type and chunk.content_metadata directly
- NodeOutputs.tsx: use dyn[1].type directly (TypeMetadata has type: string)
- OutputRenderer.tsx:
- stableKeyForOutputValue: cast object to Record<string, unknown>
- concatTextChunksSafely: use c.content directly (Chunk.content is string)
- audio case: cast value to { metadata?: { format?: string } }
- model_3d case: cast value to Record<string, unknown> for format check
- chunk rendering: use c.content_type, c.done, c.content directly (c is Chunk)
- audioChunks[0].content_metadata used directly (audioChunks is Chunk[])
- OutputNode.tsx: remove redundant as any in getCopySource (value is already any)
- PreviewNode.tsx: same fix as OutputNode.tsx
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Replace `as any` type assertions with proper TypeScript types
- useModelsByProvider.ts: Remove `as any` from provider path params
(ProviderInfo.provider is already Provider type); remove String()
conversion; fix supported_tasks.includes() and pipelineTask casts
- useRecommendedTaskModels.ts: Replace `as any` with `as Provider`
for inferProvider() return value; import Provider type
- useEmbeddingModels.ts: Remove `as any` from provider path param
- EmbeddingModelMenuDialog.tsx: Remove unnecessary `as any` cast on
useEmbeddingModelMenuStore (compatible type)
- ComfyModelSelect.tsx: Replace typed client with fetch + BASE_URL for
non-spec path; define ComfyModelItem type; fix model.name access
- VideoModelSelect.tsx, ASRModelSelect.tsx, TTSModelSelect.tsx,
Model3DModelSelect.tsx: Replace client.GET with fetch + BASE_URL for
non-spec `/api/models/{model_type}` path
- LlamaModelSelect.tsx: Replace `as any` with typed cast for error detail
- ModelListIndex.tsx: Define ApiErrorShape interface instead of `as any`
- ModelListItem.tsx: Access model.provider directly (now typed)
- ApiTypes.ts: Extend UnifiedModel with `provider?: string | null`
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Replace `as any` type assertions with proper TypeScript types
- threadUtils.ts: use ThreadInfo.updatedAt directly (dead-code fallback removed)
- ThreadItem.tsx: same – use thread.updatedAt in render and memo comparison
- ThreadList.tsx: same – use thread.updatedAt for date grouping
- ChatThreadView.tsx: use m.tool_call_id / m.name from the Message type; drop anyMsg local
- MessageView.tsx: add ExecutionEventContent type, use tc.args directly (ToolCall already has args), replace executionContent as any
- RecentChats.tsx: drop redundant `as any[]` cast on empty array
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: replace `as any` with proper TypeScript types across web app
- window.d.ts: Add isProduction, isLocalhost, isElectron, setForceLocalhost
as optional properties to the Window interface
- ApiClient.ts: Remove `as any` window assignments, use typed Window properties
- ModelPreferencesStore.ts: Use typed intermediate cast for Set rehydration
migration code
- graphNodeToReactFlowNode.ts: Use `Record<string, unknown>` cast instead of
`as any` when reading stale workflow_id from node.data
- reactFlowNodeToGraphNode.ts: Remove `as any` from node.style.width/height —
CSSProperties already types them as string | number, typeof narrows to number
- GlobalChatStore.ts: Annotate partialize return type explicitly as
Pick<GlobalChatState, ...> instead of `as any`
- dockviewLayout.ts: Define local PanelsMap and SerializedGrid types for
dockview internal structure access; remove all `as any` casts
- createAssetFile.ts: Use `{ data: unknown }` / `{ content: unknown }` casts
instead of `as any` in toUint8Array object branch
- getAssetThumbUrl.ts: Cast asset.data to `Record<string, number>` instead
of `as any` for Object.values call
- useWorkflow.ts: Remove redundant `as any` from options spread — the type
already satisfies UseQueryOptions
- useJobReconnection.ts: Define RunStateInfo in ApiTypes and use typed
intersection `Job & { run_state?: RunStateInfo | null }` cast
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix as any type assertions with proper TypeScript types
Replace as any with proper types across the web app:
- PlaceholderNode.tsx: extend NodeData interface with originalType/node_type/title/properties fields
- LayoutMenu.tsx: add SerializedPanel interface for dockview panel serialization
- panelComponents.tsx: extend DockviewApi type for getPanel
- AssetDeleteConfirmation.tsx: cast response to { deleted_asset_ids?: string[] }
- AssetGrid.tsx: add IDockviewPanelWithGroup type for group.api access
- StorageAnalytics.tsx: Asset.size already typed, remove as any
- GettingStartedPanel.tsx: typed ollama response shape
- NodeEditor.tsx: use string key directly for CSS custom property
- PropertyContextMenu.tsx: NodeData.dynamic_inputs already typed
- typeFilterUtils.ts: use TypeMetadata[] instead of any[]
- PropertyInput.tsx: use intersection type for dynamic schema extras
- NodeInputs.tsx: use intersection type for dynamic schema enum field
- KieSchemaLoader.tsx/FalSchemaLoader.tsx: intersection type for enum field
- useProcessedEdges.ts: cast nodes to Node<NodeData> instead of any
- useChatIntegration.ts: selectedModel is LanguageModel, fix sendMessage/content types
- useModalResize.ts: properly type debounce return with cancel method
- PlotlyRenderer.tsx: import plotly.js Data/Layout/Config/Frame types
- TableActions.tsx: use proper casts instead of any
- WorkflowListView.tsx: cast to React.UIEvent<HTMLDivElement>
- CompareImagesNode.tsx: cast to { type?: string } instead of any
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* perf: standardize useIsConnectedSelector for node properties
Replaced direct subscriptions to the entire state.edges array with the memoized useIsConnectedSelector hook in CollectionProperty and StringProperty components. This eliminates expensive O(E) filter iterations during store updates and prevents unnecessary re-renders when unrelated edges change in the graph.
Co-authored-by: georgi <19498+georgi@users.noreply.github.com>
* fix: resolve remaining tests broken by loglevel migration
Fixed remaining test failures that were asserting against `console.error` and `console.warn` after the codebase migrated to the `loglevel` package. Additionally resolved eslint warnings related to unused imports introduced during the fix process.
Co-authored-by: georgi <19498+georgi@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: georgi <19498+georgi@users.noreply.github.com>1 parent 573b887 commit 7fd9770
85 files changed
Lines changed: 360 additions & 277 deletions
File tree
- web/src
- __tests__/components/chat/containers
- components
- assets
- chat
- containers
- message
- thread
- utils
- dashboard
- hugging_face/model_list
- node_editor
- node_types
- node
- CompareImagesNode
- DataTable
- DynamicFalSchemaNode
- DynamicKieSchemaNode
- OutputNode
- PreviewNode
- output
- properties
- textEditor
- workflows
- hooks
- __tests__
- browser
- editor
- handlers/__tests__
- serverState
- stores
- __tests__
- utils
- __tests__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
353 | | - | |
| 354 | + | |
354 | 355 | | |
355 | 356 | | |
356 | 357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| |||
160 | 165 | | |
161 | 166 | | |
162 | 167 | | |
163 | | - | |
| 168 | + | |
164 | 169 | | |
165 | 170 | | |
166 | 171 | | |
| |||
184 | 189 | | |
185 | 190 | | |
186 | 191 | | |
187 | | - | |
| 192 | + | |
188 | 193 | | |
189 | 194 | | |
190 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
269 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
270 | 271 | | |
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
274 | | - | |
| 275 | + | |
275 | 276 | | |
276 | 277 | | |
277 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
291 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
296 | | - | |
| 297 | + | |
297 | 298 | | |
298 | 299 | | |
299 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
12 | 20 | | |
13 | 21 | | |
14 | 22 | | |
| |||
68 | 76 | | |
69 | 77 | | |
70 | 78 | | |
71 | | - | |
| 79 | + | |
72 | 80 | | |
73 | 81 | | |
74 | 82 | | |
| |||
110 | 118 | | |
111 | 119 | | |
112 | 120 | | |
113 | | - | |
| 121 | + | |
114 | 122 | | |
115 | 123 | | |
116 | 124 | | |
| |||
143 | 151 | | |
144 | 152 | | |
145 | 153 | | |
146 | | - | |
| 154 | + | |
147 | 155 | | |
148 | 156 | | |
149 | 157 | | |
| |||
154 | 162 | | |
155 | 163 | | |
156 | 164 | | |
157 | | - | |
| 165 | + | |
158 | 166 | | |
159 | 167 | | |
160 | 168 | | |
| |||
180 | 188 | | |
181 | 189 | | |
182 | 190 | | |
183 | | - | |
| 191 | + | |
184 | 192 | | |
185 | 193 | | |
186 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
450 | 449 | | |
451 | 450 | | |
452 | 451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
| 71 | + | |
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
| |||
0 commit comments