- 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
- Sort by Date or Priority (asc/desc toggle)
- Hide completed/NA/cancelled tasks by default
- Show Completed toggle button
- Show Archived button for old tasks
- Richer task cards with status badges, priority pills, overdue highlighting
- Tab count shows active tasks only
- Sort by Client, Date, Type (Group/Policy/Client), Level (priority)
- Click to sort asc/desc with arrow indicators
- Filter dropdowns for Type and Level with Clear button
- Applied after card filter and status tab filter
The 'Assigned' tab, overdue count, and card filters were only excluding
COMPLETED tasks. NA and CANCELLED tasks with old due dates were showing
as overdue. Now all three terminal statuses are excluded from active views.
Top-level OR and AND keys on the same where object conflicted — consolidated
all suppression conditions into a single AND array in both the SSR page
query and the /api/tasks route.