- Extract TaskCard into components/tasks/task-card.tsx (full-featured)
- Client tasks API now includes policy, policyGroup, taskNotes
- client-detail replaces inline render with shared TaskCard
- Features now consistent: status dropdown, complete/NA/edit actions,
inline notes panel, carrier info, policy group popover, due date
urgency colors, priority dot
- Client count: Shape/Shape2 designation only
- Policy count: active Shape policies (excludes dead statuses)
- Task count: open tasks on Shape clients (excludes NA/CANCELLED)
- Completion rate: excludes NA/CANCELLED from denominator
- /api/metrics intentionally left as system-wide (Prometheus)
- teamMembers query now scoped to Shape clients + active tasks only
- TeamMembersByDepartment overdue calc uses overdueWindowDays window (default 7d)
- Workload API per-user fetch now only loads active tasks (massive perf win)
- Remove Completed/Completion% columns from workload table (no longer meaningful)
- overdueWindowDays passed through page -> client -> component chain
- Default 7 days: overdue tasks shown only within last N days
- New /api/admin/manager-settings endpoint (GET/PUT, AppSetting key)
- Workload API reads setting and applies to both summary count and per-user table
- Overdue card now shows 'past due within Nd' context label
- Admin > System Settings: new Manager Dashboard card with day input
- setupQueueCount: add policies: { some: {} } filter (match setup-queue API)
- recentTasks: scope to Shape clients, order by updatedAt not createdAt
- Workload API: scope all metrics to Shape clients only
- Workload API: filter tasks by task.department not assignee department
- Workload API: exclude NA/CANCELLED from totalTasks and completion rate denominator
- Workload API: scope userAssignments filter to match department/client scope
- Removed ±40 day window restriction that caused prior-cycle tasks to miss their group/policy
- Now finds nearest group/policy by absolute date proximity for any cycle
- Deleted 310 client-level orphans created by previous import runs
- Historical reset: removed policyGroupId: null filter from policy loop, use level POLICY only
- Gap fill: same fix - all active future policies get POLICY-level tasks
- BOTH-level templates remain on groups (for grouped) or policies (for ungrouped)
- ~3500 grouped policies were missing their POLICY tasks (loss runs, mod factor, etc)
- Add resolvePolicyLink() to find closest policy group or policy by effectiveDate window
- Include template level in DbTemplate interface and loadDbState query
- New tasks created by import now carry correct policyId or policyGroupId
- Delete all 492 orphaned POLICY/RENEWAL_GROUP tasks (no policy link)
- Deletes tasks where POLICY/RENEWAL_GROUP template has no policy_id/policy_group_id
- Gap Fill creates missing tasks per group/policy/client without overwriting existing ones
- Existence check within 5-day window prevents duplicates
- Gap Fill button added to shape-import admin panel with inline result summary
- Parent companies show a violet badge with subsidiary count, clickable to open modal
- Modal lists each subsidiary with policy count, task count, and claims advocate, click to navigate
- Child companies show a blue badge with parent name, clickable to navigate to parent page
- Both badges update reactively with state