* ## ✅ Batch 1 Complete
Successfully fixed all 6 warnings in batch 1 (message boundaries & streams):
### Changes made:
**[bridge.ts](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/19c9-resolve-frontend/frontend/src/vscode/bridge.ts)** - 5 fixes:
- Replaced `(window as any).InputEvent` checks with `typeof InputEvent === 'function'`
- Removed unnecessary type assertions on `dispatchEvent` calls
- More readable runtime guards using built-in DOM types
**[useJsonPatchWsStream.ts](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/19c9-resolve-frontend/frontend/src/hooks/useJsonPatchWsStream.ts)** - 1 fix:
- Added eslint suppression with explanation for `rfc6902` library requirement
**[frontend/package.json](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/19c9-resolve-frontend/frontend/package.json)**:
- Reduced `max-warnings` from 110 → 30 to lock in progress
### Results:
- **Before:** 32 warnings
- **After:** 26 warnings
- **Eliminated:** 6 warnings from batch 1
- **Remaining batches:** 2-6 (26 warnings)
* Perfect! ✅ The solution works without any `eslint-disable` comments.
## What we changed:
1. **Added type constraint**: `<T extends object>` - documents that JSON Patch only works on objects/arrays
2. **Used local variable narrowing**: `const current = dataRef.current` narrows `T | undefined` to `T`
3. **Removed the cast**: `applyPatch(next, filtered)` works directly since `applyPatch` already accepts `any`
4. **Cleaner code flow**: `const next = structuredClone(current)` then update refs
The code is now more readable, type-safe (within TypeScript's limits for this library), and passes both lint and typecheck with **no suppressions needed**.