Summary
When createNode() transfers children to the database in the background, failures are logged to console but users are not notified. This can lead to silent data inconsistencies that confuse users.
Current Behavior
In reactive-node-service.svelte.ts, the background child transfer has proper rollback logic but no user notification:
Promise.resolve().then(async () => {
try {
await sharedNodeStore.waitForNodeSaves([nodeId]);
for (const child of children) {
const { moveNode } = await import('$lib/services/tauri-commands');
await moveNode(child.id, nodeId);
}
} catch (error) {
console.error('[createNode] Failed to transfer children to database, rolling back:', error);
for (const child of children) {
structureTree.moveInMemoryRelationship(nodeId, afterNodeId, child.id);
}
// TODO: Emit error event for UI notification (toast/banner)
}
});
Expected Behavior
When child transfer fails:
- Rollback happens (already implemented)
- User sees a toast/banner notification explaining the issue
- User can retry or take corrective action
Acceptance Criteria
Technical Notes
Labels
enhancement, ux, error-handling
Summary
When
createNode()transfers children to the database in the background, failures are logged to console but users are not notified. This can lead to silent data inconsistencies that confuse users.Current Behavior
In
reactive-node-service.svelte.ts, the background child transfer has proper rollback logic but no user notification:Expected Behavior
When child transfer fails:
Acceptance Criteria
Technical Notes
packages/desktop-app/src/lib/services/reactive-node-service.svelte.ts:338-365Labels
enhancement, ux, error-handling