Repository navigation
Complete EventBus cleanup and fix TypeScript errors from service deletion (#558) - #600
Conversation
## Issues Fixed 1. **Deleted broken test file**: `live-select-multi-client.test.ts` - Imported from deleted `$lib/services/event-bus` - Test was added in PR #594 but referenced deleted services - The test tested old event-bus architecture, not needed for LIVE SELECT 2. **Fixed `optimistic-operation-manager.test.ts`**: - Added missing `edgeType: 'child'` property to all 19 `__testOnly_addChild` calls - EdgeEventData type requires edgeType field 3. **Fixed `optimistic-operation-manager.svelte.ts`**: - Updated import path from `$lib/services/event-types` to `$lib/types/event-types` 4. **Added `PersistenceFailedEvent` type to `$lib/types/event-types.ts`**: - Type was missing after event-types.ts was deleted and replaced with minimal version - Added with correct fields matching implementation: - failureReason: 'timeout' | 'foreign-key-constraint' | 'database-locked' | 'unknown' - affectedOperations with error field - optional metadata field ## Results - svelte-check: 0 errors (was 52) - Tests: 2 pre-existing failures, 1425 passing (no new failures) Related to #558 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
This commit completes the cleanup from Issue #558 (LIVE SELECT migration) by removing all remaining eventBus references and dead code: Deleted Files (21 skipped/broken test files): - 19 integration tests testing deleted event-bus functionality - 2 service tests for deleted services - All used describe.skip or imported deleted services Source File Changes: - reactive-node-service.svelte.ts: Remove 5 dead emit functions and 10+ emit calls - content-processor.ts: Already clean (verified) - shared-node-store.ts: Remove "(eventBus removed)" comments from debug logs - performance-monitor.ts: Remove window.eventBus fallback code blocks - test-helpers.ts: Remove NodeSpaceEvent type, eventBus stub, and all EventBus testing utilities - base-node-viewer.svelte: Update TODO comment to reference toast system - mcp-integration.test.ts: Update docstring, remove stale comment Test Fixes: - shared-node-store.test.ts: Remove empty "Node Filtering" describe block - split-pane-isolation.test.ts: Fix hierarchy setup using structureTree Result: - Zero eventBus references in codebase - All 1427 tests passing - Zero lint/type errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Code Review: PR #600 - Delete 15 obsolete services replaced by LIVE SELECTReview ModeInitial Review - No prior reviews found Overall AssessmentAPPROVE - This PR is a strong net positive for codebase health. This change completes the EventBus cleanup from the LIVE SELECT migration (Issue #558). The implementation is well-executed, removing 2,185 lines of dead code while maintaining full test coverage (1,427 tests passing). The approach follows the project's "pre-release development" philosophy correctly - no backward compatibility cruft, clean deletion of obsolete patterns. Requirements ValidationIssue #558 Acceptance Criteria
Note: The PR title references "Delete 15 obsolete services" but the actual work completed is the EventBus cleanup phase. The PR description should be updated to better reflect the actual changes. FindingsCritical IssuesNone identified. Suggested Improvements[Improvement] PR Title MismatchThe PR title "Delete 15 obsolete services replaced by LIVE SELECT" doesn't accurately describe the changes. The commits show:
Recommendation: Update PR title to something like:
[Improvement]
|
| Check | Result |
|---|---|
bun run test |
1,427 passed |
bun run quality:fix |
0 errors, 0 warnings |
| EventBus references remaining | 0 files |
Security Considerations
No security concerns identified. This change only removes code and does not introduce new attack surfaces.
Final Verdict
APPROVED
The changes are well-implemented and align with the project's development philosophy. The codebase is cleaner, more maintainable, and the test suite remains healthy. The minor improvements suggested are not blocking.
Reviewed by: Principal Engineer AI Reviewer
Review Framework: Pragmatic Quality
malibio
left a comment
There was a problem hiding this comment.
Code review complete. This PR is a strong net positive - clean removal of 2,185 lines of dead EventBus code while maintaining full test coverage. See detailed review comment for minor improvement suggestions. Recommendation: APPROVE
- Updated shared-node-store.ts comments to remove EventBus references - Updated mock-reactive-node-service.ts comment to reference ReactiveStructureTree - Updated test-constants.ts comments to remove EventBus references Addresses code cleanup as part of EventBus removal.
- Add comprehensive JSDoc for invalidateReferenceCache() explaining when external callers should invoke cache invalidation - Improve constructor comment to explain singleton pattern enforcement Addresses reviewer recommendations from PR #600 code review.
Review Feedback AddressedSummary
Changes MadeCommit 1:
Commit 2:
Skipped Recommendations (with justification)
VerificationFeedback addressed by Implementation Agent |
…tion (#558) (#600) * Fix 52 TypeScript errors from incomplete service deletion refactoring ## Issues Fixed 1. **Deleted broken test file**: `live-select-multi-client.test.ts` - Imported from deleted `$lib/services/event-bus` - Test was added in PR #594 but referenced deleted services - The test tested old event-bus architecture, not needed for LIVE SELECT 2. **Fixed `optimistic-operation-manager.test.ts`**: - Added missing `edgeType: 'child'` property to all 19 `__testOnly_addChild` calls - EdgeEventData type requires edgeType field 3. **Fixed `optimistic-operation-manager.svelte.ts`**: - Updated import path from `$lib/services/event-types` to `$lib/types/event-types` 4. **Added `PersistenceFailedEvent` type to `$lib/types/event-types.ts`**: - Type was missing after event-types.ts was deleted and replaced with minimal version - Added with correct fields matching implementation: - failureReason: 'timeout' | 'foreign-key-constraint' | 'database-locked' | 'unknown' - affectedOperations with error field - optional metadata field ## Results - svelte-check: 0 errors (was 52) - Tests: 2 pre-existing failures, 1425 passing (no new failures) Related to #558 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove legacy eventBus code and skipped tests This commit completes the cleanup from Issue #558 (LIVE SELECT migration) by removing all remaining eventBus references and dead code: Deleted Files (21 skipped/broken test files): - 19 integration tests testing deleted event-bus functionality - 2 service tests for deleted services - All used describe.skip or imported deleted services Source File Changes: - reactive-node-service.svelte.ts: Remove 5 dead emit functions and 10+ emit calls - content-processor.ts: Already clean (verified) - shared-node-store.ts: Remove "(eventBus removed)" comments from debug logs - performance-monitor.ts: Remove window.eventBus fallback code blocks - test-helpers.ts: Remove NodeSpaceEvent type, eventBus stub, and all EventBus testing utilities - base-node-viewer.svelte: Update TODO comment to reference toast system - mcp-integration.test.ts: Update docstring, remove stale comment Test Fixes: - shared-node-store.test.ts: Remove empty "Node Filtering" describe block - split-pane-isolation.test.ts: Fix hierarchy setup using structureTree Result: - Zero eventBus references in codebase - All 1427 tests passing - Zero lint/type errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Clean up outdated comments referencing EventBus and HierarchyService - Updated shared-node-store.ts comments to remove EventBus references - Updated mock-reactive-node-service.ts comment to reference ReactiveStructureTree - Updated test-constants.ts comments to remove EventBus references Addresses code cleanup as part of EventBus removal. * Address code review feedback: improve documentation and comments - Add comprehensive JSDoc for invalidateReferenceCache() explaining when external callers should invoke cache invalidation - Improve constructor comment to explain singleton pattern enforcement Addresses reviewer recommendations from PR #600 code review. --------- Co-authored-by: Claude <[email protected]>
…tion (#558) (#600) * Fix 52 TypeScript errors from incomplete service deletion refactoring ## Issues Fixed 1. **Deleted broken test file**: `live-select-multi-client.test.ts` - Imported from deleted `$lib/services/event-bus` - Test was added in PR #594 but referenced deleted services - The test tested old event-bus architecture, not needed for LIVE SELECT 2. **Fixed `optimistic-operation-manager.test.ts`**: - Added missing `edgeType: 'child'` property to all 19 `__testOnly_addChild` calls - EdgeEventData type requires edgeType field 3. **Fixed `optimistic-operation-manager.svelte.ts`**: - Updated import path from `$lib/services/event-types` to `$lib/types/event-types` 4. **Added `PersistenceFailedEvent` type to `$lib/types/event-types.ts`**: - Type was missing after event-types.ts was deleted and replaced with minimal version - Added with correct fields matching implementation: - failureReason: 'timeout' | 'foreign-key-constraint' | 'database-locked' | 'unknown' - affectedOperations with error field - optional metadata field ## Results - svelte-check: 0 errors (was 52) - Tests: 2 pre-existing failures, 1425 passing (no new failures) Related to #558 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove legacy eventBus code and skipped tests This commit completes the cleanup from Issue #558 (LIVE SELECT migration) by removing all remaining eventBus references and dead code: Deleted Files (21 skipped/broken test files): - 19 integration tests testing deleted event-bus functionality - 2 service tests for deleted services - All used describe.skip or imported deleted services Source File Changes: - reactive-node-service.svelte.ts: Remove 5 dead emit functions and 10+ emit calls - content-processor.ts: Already clean (verified) - shared-node-store.ts: Remove "(eventBus removed)" comments from debug logs - performance-monitor.ts: Remove window.eventBus fallback code blocks - test-helpers.ts: Remove NodeSpaceEvent type, eventBus stub, and all EventBus testing utilities - base-node-viewer.svelte: Update TODO comment to reference toast system - mcp-integration.test.ts: Update docstring, remove stale comment Test Fixes: - shared-node-store.test.ts: Remove empty "Node Filtering" describe block - split-pane-isolation.test.ts: Fix hierarchy setup using structureTree Result: - Zero eventBus references in codebase - All 1427 tests passing - Zero lint/type errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Clean up outdated comments referencing EventBus and HierarchyService - Updated shared-node-store.ts comments to remove EventBus references - Updated mock-reactive-node-service.ts comment to reference ReactiveStructureTree - Updated test-constants.ts comments to remove EventBus references Addresses code cleanup as part of EventBus removal. * Address code review feedback: improve documentation and comments - Add comprehensive JSDoc for invalidateReferenceCache() explaining when external callers should invoke cache invalidation - Improve constructor comment to explain singleton pattern enforcement Addresses reviewer recommendations from PR #600 code review. --------- Co-authored-by: Claude <[email protected]>
…tion (#558) (#600) * Fix 52 TypeScript errors from incomplete service deletion refactoring ## Issues Fixed 1. **Deleted broken test file**: `live-select-multi-client.test.ts` - Imported from deleted `$lib/services/event-bus` - Test was added in PR #594 but referenced deleted services - The test tested old event-bus architecture, not needed for LIVE SELECT 2. **Fixed `optimistic-operation-manager.test.ts`**: - Added missing `edgeType: 'child'` property to all 19 `__testOnly_addChild` calls - EdgeEventData type requires edgeType field 3. **Fixed `optimistic-operation-manager.svelte.ts`**: - Updated import path from `$lib/services/event-types` to `$lib/types/event-types` 4. **Added `PersistenceFailedEvent` type to `$lib/types/event-types.ts`**: - Type was missing after event-types.ts was deleted and replaced with minimal version - Added with correct fields matching implementation: - failureReason: 'timeout' | 'foreign-key-constraint' | 'database-locked' | 'unknown' - affectedOperations with error field - optional metadata field ## Results - svelte-check: 0 errors (was 52) - Tests: 2 pre-existing failures, 1425 passing (no new failures) Related to #558 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove legacy eventBus code and skipped tests This commit completes the cleanup from Issue #558 (LIVE SELECT migration) by removing all remaining eventBus references and dead code: Deleted Files (21 skipped/broken test files): - 19 integration tests testing deleted event-bus functionality - 2 service tests for deleted services - All used describe.skip or imported deleted services Source File Changes: - reactive-node-service.svelte.ts: Remove 5 dead emit functions and 10+ emit calls - content-processor.ts: Already clean (verified) - shared-node-store.ts: Remove "(eventBus removed)" comments from debug logs - performance-monitor.ts: Remove window.eventBus fallback code blocks - test-helpers.ts: Remove NodeSpaceEvent type, eventBus stub, and all EventBus testing utilities - base-node-viewer.svelte: Update TODO comment to reference toast system - mcp-integration.test.ts: Update docstring, remove stale comment Test Fixes: - shared-node-store.test.ts: Remove empty "Node Filtering" describe block - split-pane-isolation.test.ts: Fix hierarchy setup using structureTree Result: - Zero eventBus references in codebase - All 1427 tests passing - Zero lint/type errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Clean up outdated comments referencing EventBus and HierarchyService - Updated shared-node-store.ts comments to remove EventBus references - Updated mock-reactive-node-service.ts comment to reference ReactiveStructureTree - Updated test-constants.ts comments to remove EventBus references Addresses code cleanup as part of EventBus removal. * Address code review feedback: improve documentation and comments - Add comprehensive JSDoc for invalidateReferenceCache() explaining when external callers should invoke cache invalidation - Improve constructor comment to explain singleton pattern enforcement Addresses reviewer recommendations from PR #600 code review. --------- Co-authored-by: Claude <[email protected]>
Closes #558