Louis Knight-Webb
21c9a5472c
Refactor TaskWithAttemptStatus (vibe-kanban) (#777)
* ## ✅ Refactoring Complete
Successfully refactored [`TaskWithAttemptStatus`](file:///private/var/folders/m1/9q_ct1913z10v6wbnv54j25r0000gn/T/vibe-kanban/worktrees/vk-f864-refactor-t/crates/db/src/models/task.rs#L32-L41) to eliminate field duplication:
### Changes Made:
1. **Struct refactored** with `#[serde(flatten)]` and `#[ts(flatten)]` to embed `Task`
2. **Database mapping updated** to construct nested `Task` struct
3. **Deref implementation added** for backward compatibility
4. **Call sites fixed** in routes and MCP server
### Verification:
- ✅ All tests pass
- ✅ TypeScript generation produces identical interface structure
- ✅ JSON serialization maintains exact same format for frontend compatibility
The refactoring eliminates 8 duplicated fields while maintaining all existing functionality.
* Fix stream_tasks_raw bug (vibe-kanban d05247f3)
crates/services/src/services/events.rs
The function returns TaskWithAttemptStatus, however an update is not streamed when the non-task fields change:
pub has_in_progress_attempt: bool,
pub has_merged_attempt: bool,
pub last_attempt_failed: bool,
pub executor: String,
2025-09-18 15:41:13 +01:00
..
2025-09-18 15:41:13 +01:00
2025-09-18 08:15:05 +00:00
2025-09-18 15:17:02 +01:00
2025-09-18 15:19:10 +01:00
2025-09-18 15:41:13 +01:00
2025-09-18 15:41:13 +01:00
2025-09-18 13:14:16 +01:00