Repository navigation
Align TypeScript Node Type Interfaces with Rust Backend Serialization - #702
Conversation
- Update TaskNode to flat structure matching Rust backend serialization - Task properties (status, priority, dueDate, assignee) are now top-level fields - Helper functions handle both flat (new) and nested (legacy) formats - Added TaskNodeHelpers.createTaskNode() for creating flat task nodes - Simplify simple node types (remove redundant properties) - CodeBlockNode: Language derived from code fence syntax in content - QuoteBlockNode: No type-specific properties needed - OrderedListNode: No type-specific properties needed - Add missing simple node type wrappers - TextNode: Type guard and helpers for text nodes - HeaderNode: Level derived from # count in content - DateNode: Deterministic ID format (YYYY-MM-DD) with date helpers - Update tests to match new content-based language extraction 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Code Review SummaryReview Type: Initial Review Overall AssessmentThis PR successfully aligns the TypeScript node type interfaces with the Rust backend serialization format as specified in Issue #700. The implementation is well-structured, follows consistent patterns, and includes appropriate test coverage. The code represents a net positive improvement to the codebase. Requirements CheckFrom Issue #700:
Verification Results:
Code Review FindingsStrengths
Suggested Improvements[Improvement]
|
malibio
left a comment
There was a problem hiding this comment.
Review Decision: APPROVE - All acceptance criteria met. TypeScript interfaces correctly align with Rust backend serialization. Tests pass (477 Rust + all frontend), type checks pass (0 errors). Minor improvements suggested in detailed review comment but none are blockers. Ready to merge.
- Remove "Legacy interface" comment from node-viewers.ts (it's not legacy) - Remove "legacy default" and "Phase 1 backward compatibility" comments from update-protocol.ts - Add comprehensive test suite for TaskNode flat structure (36 tests) - Tests verify type guards, getters, setters, and helper functions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
Fixed the backward compatibility violations:
Test results: 1477 tests pass (up from 1441 baseline due to new tests) |
- code-block-node.ts: Update regex to capture c++, c#, objective-c (changed from \w+ to [\w\-+#]+) - quote-block-node.ts: Remove incorrect parentId from JSDoc - ordered-list-node.ts: Remove incorrect parentId from JSDoc Skipped: timezone edge case in date-node.ts - not applicable since date nodes are daily journal entries using YYYY-MM-DD as IDs, not moments in time. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Review Feedback AddressedCommit: e8491c1 ✅ Fixed (3 items)
⏭️ Skipped (1 item)
Test Results
|
…#702) * Align TypeScript node types with Rust backend serialization (#700) - Update TaskNode to flat structure matching Rust backend serialization - Task properties (status, priority, dueDate, assignee) are now top-level fields - Helper functions handle both flat (new) and nested (legacy) formats - Added TaskNodeHelpers.createTaskNode() for creating flat task nodes - Simplify simple node types (remove redundant properties) - CodeBlockNode: Language derived from code fence syntax in content - QuoteBlockNode: No type-specific properties needed - OrderedListNode: No type-specific properties needed - Add missing simple node type wrappers - TextNode: Type guard and helpers for text nodes - HeaderNode: Level derived from # count in content - DateNode: Deterministic ID format (YYYY-MM-DD) with date helpers - Update tests to match new content-based language extraction 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove backward compatibility code and add TaskNode tests (#700) - Remove "Legacy interface" comment from node-viewers.ts (it's not legacy) - Remove "legacy default" and "Phase 1 backward compatibility" comments from update-protocol.ts - Add comprehensive test suite for TaskNode flat structure (36 tests) - Tests verify type guards, getters, setters, and helper functions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Address review feedback: fix language regex and JSDoc mismatches - code-block-node.ts: Update regex to capture c++, c#, objective-c (changed from \w+ to [\w\-+#]+) - quote-block-node.ts: Remove incorrect parentId from JSDoc - ordered-list-node.ts: Remove incorrect parentId from JSDoc Skipped: timezone edge case in date-node.ts - not applicable since date nodes are daily journal entries using YYYY-MM-DD as IDs, not moments in time. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
…#702) * Align TypeScript node types with Rust backend serialization (#700) - Update TaskNode to flat structure matching Rust backend serialization - Task properties (status, priority, dueDate, assignee) are now top-level fields - Helper functions handle both flat (new) and nested (legacy) formats - Added TaskNodeHelpers.createTaskNode() for creating flat task nodes - Simplify simple node types (remove redundant properties) - CodeBlockNode: Language derived from code fence syntax in content - QuoteBlockNode: No type-specific properties needed - OrderedListNode: No type-specific properties needed - Add missing simple node type wrappers - TextNode: Type guard and helpers for text nodes - HeaderNode: Level derived from # count in content - DateNode: Deterministic ID format (YYYY-MM-DD) with date helpers - Update tests to match new content-based language extraction 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove backward compatibility code and add TaskNode tests (#700) - Remove "Legacy interface" comment from node-viewers.ts (it's not legacy) - Remove "legacy default" and "Phase 1 backward compatibility" comments from update-protocol.ts - Add comprehensive test suite for TaskNode flat structure (36 tests) - Tests verify type guards, getters, setters, and helper functions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Address review feedback: fix language regex and JSDoc mismatches - code-block-node.ts: Update regex to capture c++, c#, objective-c (changed from \w+ to [\w\-+#]+) - quote-block-node.ts: Remove incorrect parentId from JSDoc - ordered-list-node.ts: Remove incorrect parentId from JSDoc Skipped: timezone edge case in date-node.ts - not applicable since date nodes are daily journal entries using YYYY-MM-DD as IDs, not moments in time. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
…#702) * Align TypeScript node types with Rust backend serialization (#700) - Update TaskNode to flat structure matching Rust backend serialization - Task properties (status, priority, dueDate, assignee) are now top-level fields - Helper functions handle both flat (new) and nested (legacy) formats - Added TaskNodeHelpers.createTaskNode() for creating flat task nodes - Simplify simple node types (remove redundant properties) - CodeBlockNode: Language derived from code fence syntax in content - QuoteBlockNode: No type-specific properties needed - OrderedListNode: No type-specific properties needed - Add missing simple node type wrappers - TextNode: Type guard and helpers for text nodes - HeaderNode: Level derived from # count in content - DateNode: Deterministic ID format (YYYY-MM-DD) with date helpers - Update tests to match new content-based language extraction 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove backward compatibility code and add TaskNode tests (#700) - Remove "Legacy interface" comment from node-viewers.ts (it's not legacy) - Remove "legacy default" and "Phase 1 backward compatibility" comments from update-protocol.ts - Add comprehensive test suite for TaskNode flat structure (36 tests) - Tests verify type guards, getters, setters, and helper functions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Address review feedback: fix language regex and JSDoc mismatches - code-block-node.ts: Update regex to capture c++, c#, objective-c (changed from \w+ to [\w\-+#]+) - quote-block-node.ts: Remove incorrect parentId from JSDoc - ordered-list-node.ts: Remove incorrect parentId from JSDoc Skipped: timezone edge case in date-node.ts - not applicable since date nodes are daily journal entries using YYYY-MM-DD as IDs, not moments in time. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
Closes #700