ytptube/ui/app/composables
Jesse Bate 0cb3a95a41 perf: batch item_updated WebSocket events into a single per-tick payload
The per-download 500ms throttle still scales linearly with concurrency:
N active downloads produce up to 2N item_updated frames per second, each
with its own serialization pass and per-client send.

Add an ItemBatcher at the WebSocket boundary that coalesces dirty items
by _id (last write wins) and emits one item_updated frame per 500ms
tick whose payload is always a list of items, even for a single update.
Leading-edge emits keep isolated updates (e.g. renames via the API)
instant, and a trailing flush at most 500ms later delivers the rest.
Pending items are flushed on shutdown before clients disconnect.

Emitter call sites, the EventBus, and the StatusTracker throttle are
unchanged; the batcher only changes the wire format. The frontend now
types item_updated as StoreItem[] and iterates the array.

BREAKING CHANGE: the item_updated WebSocket event payload (data) is now
always an array of items instead of a single item object.
2026-06-10 23:38:27 +09:30
..
useAppSocket.ts perf: batch item_updated WebSocket events into a single per-tick payload 2026-06-10 23:38:27 +09:30
useBrowser.ts refactor: drop pinia stores 2026-04-21 20:51:47 +03:00
useConditions.ts refactor: replace notify with useNotification for error/success handling in composables 2026-02-20 23:27:54 +03:00
useConfirm.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
useConsoleSession.ts refactor: update terminal api 2026-04-29 22:25:39 +03:00
useDiagnostics.ts feat: add system diagnostics endpoint. 2026-05-26 19:22:36 +03:00
useDialog.ts refactor: use plain text for multi-line messages ni confirm dialog 2026-04-18 20:18:41 +03:00
useDirtyCloseGuard.ts feat: add form guards to prevent accidental data loss 2026-04-15 00:37:12 +03:00
useDirtyState.ts feat: add form guards to prevent accidental data loss 2026-04-15 00:37:12 +03:00
useDlFields.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
useDocs.ts refactor: minor fixes for better mobile view. 2026-03-26 19:12:40 +03:00
useExpandableMeta.ts refactor: minor fixes to overall design. 2026-04-14 23:43:48 +03:00
useHistoryState.ts feat: add rename to history items. 2026-05-04 20:29:34 +03:00
useKeyboardShortcuts.ts refactor: improve video player rendering 2026-05-05 23:01:50 +03:00
useMediaQuery.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
useNotification.ts refactor: drop pinia stores 2026-04-21 20:51:47 +03:00
useNotificationCenter.ts refactor: drop pinia stores 2026-04-21 20:51:47 +03:00
useNotifications.ts refactor: switch from pnpm to bun 2026-02-20 22:46:30 +03:00
usePlayerShortcutHelp.ts feat: custom video player with direct ssa rendering 2026-05-04 09:21:43 +03:00
usePlayerShortcuts.ts refactor: improve video player rendering 2026-05-05 23:01:50 +03:00
usePlayerSubtitles.ts fix: new video player subtitle files were missing folder arg 2026-05-04 21:53:13 +03:00
usePresetEditor.ts feat: add form guards to prevent accidental data loss 2026-04-15 00:37:12 +03:00
usePresetOptions.ts refactor: drop pinia stores 2026-04-21 20:51:47 +03:00
usePresets.ts refactor: update presets UI to follow same rules as other pages. 2026-04-22 19:38:35 +03:00
useQueueState.ts refactor: seperate history from queue 2026-04-21 21:48:38 +03:00
useTaskDefinitions.ts refactor: replace notify with useNotification for error/success handling in composables 2026-02-20 23:27:54 +03:00
useTasks.ts fix: flakey test 2026-05-15 19:00:06 +03:00
useYtpConfig.ts perf: lazy-load folders on demand; remove queue from config endpoint 2026-06-10 20:07:19 +09:30