feat(coord): add due_at field to coord_todos

Migration 20260526_150000 adds nullable due_at datetime column. Model, schemas
(create/update/response), and sync.sh display updated. Sync output now shows
due:YYYY-MM-DDTHH:MM alongside any todo with a due date.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 08:05:00 -07:00
parent 4be89035cc
commit 1c038c7c2c
4 changed files with 36 additions and 2 deletions

View File

@@ -60,6 +60,11 @@ class CoordTodo(Base, UUIDMixin, TimestampMixin):
doc="Status: pending / done / cancelled"
)
due_at: Mapped[Optional[datetime]] = mapped_column(
DateTime,
doc="When the item is due"
)
completed_at: Mapped[Optional[datetime]] = mapped_column(
DateTime,
doc="When the item was marked done"

View File

@@ -19,6 +19,7 @@ class CoordTodoCreate(BaseModel):
assigned_to_machine: Optional[str] = Field(None, description="Target hostname", max_length=100)
auto_created: bool = Field(False, description="True when Claude auto-generated this item")
source_context: Optional[str] = Field(None, description="Why Claude auto-created this item")
due_at: Optional[datetime] = Field(None, description="When the item is due")
created_by_user: str = Field(..., description="User creating the item", max_length=50)
created_by_machine: str = Field(..., description="Hostname where the item is created", max_length=100)
@@ -31,6 +32,7 @@ class CoordTodoUpdate(BaseModel):
assigned_to_user: Optional[str] = Field(None, max_length=50)
assigned_to_machine: Optional[str] = Field(None, max_length=100)
project_key: Optional[str] = Field(None, max_length=100)
due_at: Optional[datetime] = Field(None, description="When the item is due")
completed_by: Optional[str] = Field(None, description="Session or user completing the item", max_length=100)
@@ -45,6 +47,7 @@ class CoordTodoResponse(BaseModel):
assigned_to_machine: Optional[str]
auto_created: bool
source_context: Optional[str]
due_at: Optional[datetime]
status: str
completed_at: Optional[datetime]
completed_by: Optional[str]