feat: complete LOW priority code quality improvements
Backend: - LOW-002: Add Query validation with max page size limits (100) - LOW-003: Replace magic strings with TaskStatus.is_done flag - LOW-004: Add 'creation' trigger type validation - Add action_executor.py with UpdateFieldAction and AutoAssignAction Frontend: - LOW-005: Replace TypeScript 'any' with 'unknown' + type guards - LOW-006: Add ConfirmModal component with A11Y support - LOW-007: Add ToastContext for user feedback notifications - LOW-009: Add Skeleton components (17 loading states replaced) - LOW-010: Setup Vitest with 21 tests for ConfirmModal and Skeleton Components updated: - App.tsx, ProtectedRoute.tsx, Spaces.tsx, Projects.tsx, Tasks.tsx - ProjectSettings.tsx, AuditPage.tsx, WorkloadPage.tsx, ProjectHealthPage.tsx - Comments.tsx, AttachmentList.tsx, TriggerList.tsx, TaskDetailModal.tsx - NotificationBell.tsx, BlockerDialog.tsx, CalendarView.tsx, WorkloadUserDetail.tsx 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from pydantic import BaseModel
|
||||
from pydantic import BaseModel, computed_field
|
||||
from typing import Optional, List, Any, Dict
|
||||
from datetime import datetime
|
||||
from decimal import Decimal
|
||||
@@ -79,6 +79,12 @@ class TaskResponse(TaskBase):
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
# Alias for original_estimate for frontend compatibility
|
||||
@computed_field
|
||||
@property
|
||||
def time_estimate(self) -> Optional[Decimal]:
|
||||
return self.original_estimate
|
||||
|
||||
|
||||
class TaskWithDetails(TaskResponse):
|
||||
assignee_name: Optional[str] = None
|
||||
|
||||
@@ -28,9 +28,23 @@ class TriggerCondition(BaseModel):
|
||||
|
||||
|
||||
class TriggerAction(BaseModel):
|
||||
type: str = Field(default="notify", description="Action type: notify")
|
||||
target: str = Field(default="assignee", description="Target: assignee, creator, project_owner, user:<id>")
|
||||
"""Action configuration for triggers.
|
||||
|
||||
Supported action types:
|
||||
- notify: Send notification (requires target, optional template)
|
||||
- update_field: Update task field (requires field, value)
|
||||
- auto_assign: Auto-assign task (requires strategy, optional user_id for specific_user)
|
||||
"""
|
||||
type: str = Field(..., description="Action type: notify, update_field, auto_assign")
|
||||
# Notify action fields
|
||||
target: Optional[str] = Field(None, description="Target: assignee, creator, project_owner, user:<id>")
|
||||
template: Optional[str] = Field(None, description="Message template with variables")
|
||||
# update_field action fields (FEAT-014)
|
||||
field: Optional[str] = Field(None, description="Field to update: priority, status_id, due_date")
|
||||
value: Optional[Any] = Field(None, description="New value for the field")
|
||||
# auto_assign action fields (FEAT-015)
|
||||
strategy: Optional[str] = Field(None, description="Strategy: round_robin, least_loaded, specific_user")
|
||||
user_id: Optional[str] = Field(None, description="User ID for specific_user strategy")
|
||||
|
||||
|
||||
class TriggerCreate(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user