Skip to content

RED-78: Pre-Close Checklist for Project Closure#162

Open
fs21co049adityawaghule wants to merge 10 commits into
mainfrom
feature/RED-78-pre-close-checklist
Open

RED-78: Pre-Close Checklist for Project Closure#162
fs21co049adityawaghule wants to merge 10 commits into
mainfrom
feature/RED-78-pre-close-checklist

Conversation

@fs21co049adityawaghule
Copy link
Copy Markdown
Contributor

Summary

  • Implemented Pre-Close Checklist validation for project closure
  • Validates all child tasks and roadmaps are complete before archiving
  • Supports force archive option for admin override

Changes

Service Layer

  • src/lib/services/preCloseValidator.ts - Core validation logic
    • validateProjectClosure() - Validates project can be closed
    • getProjectCompletionStats() - Returns completion metrics

API Endpoints

  • GET /api/projects/[id]/validate-close - Returns checklist status
  • POST /api/projects/[id]/close - Closes project (with optional force)

UI Component

  • src/components/projects/PreCloseChecklist.tsx - React component
    • Displays checklist items with pass/fail/warning status
    • Shows completion progress bar
    • Actions: Archive, Force Archive, Refresh

Checklist Items

  1. All roadmaps completed
  2. All tasks completed (or skipped)
  3. No blocked tasks
  4. Project has description
  5. Project niche defined

API Usage

# Get validation status
GET /api/projects/[id]/validate-close

# Close project (validates first)
POST /api/projects/[id]/close
{ "status": "ARCHIVED", "force": false }

# Force close (skip validation)
POST /api/projects/[id]/close
{ "status": "ARCHIVED", "force": true }

Example Response

{
  "valid": false,
  "checklist": [
    { "id": "roadmaps-complete", "label": "All roadmaps completed", "status": "pass" },
    { "id": "tasks-complete", "label": "All tasks completed", "status": "fail", "message": "5 pending" },
    { "id": "no-blocked-tasks", "label": "No blocked tasks", "status": "pass" }
  ],
  "errors": ["Not all tasks are completed"],
  "stats": {
    "completionPercentage": 75,
    "completedTasks": 15,
    "pendingTasks": 5
  }
}

Testing

  • TypeScript compiles without errors
  • ESLint passes

Related

  • Closes RED-78

Aditya and others added 10 commits February 18, 2026 14:51
- Added workspaceId to all analytics functions (funnel.ts, validation.ts)
- All SQL queries now scoped by workspace_id
- Added date validation via resolveDateRange (returns 400 on invalid)
- Routes pass session.workspaceId to analytics functions
- Enforced ordered stage progression in funnel paths
- Resolved conflicts with origin/feature/LIN-55-comment-first-mode
- Kept ttfv functionality and dateRange tests
- Redesigned homepage with Problem → Workflow → Proof → CTA hierarchy
- Created modular components: HeroSection, ProblemSection, WorkflowSection, ProofSection, FeaturesSection, CTASection
- Added outcome-first headline: Find Viral Reddit Content in Minutes
- Added SEO metadata (title, description, openGraph)
- Included metrics and testimonials for social proof
- Created PreCloseValidator service with validation logic
- Added validation API endpoint: GET /api/projects/[id]/validate-close
- Added close API endpoint: POST /api/projects/[id]/close
- Created PreCloseChecklist UI component for project settings
- Validates: tasks complete, roadmaps complete, no blocked tasks
- Supports force archive option for admins
@linear
Copy link
Copy Markdown

linear Bot commented Feb 28, 2026

RED-78 RED-78: Pre-close checklist for RED-64

Pre-close checklist for RED-64:nn- [ ] All critical-path issues are Done: RED-67, RED-72, RED-73, RED-74, RED-75.n- [ ] Non-critical children are shipped or explicitly deferred with rationale: RED-65, RED-66, RED-68, RED-69, RED-70, RED-71.n- [ ] Pricing/messaging consistency verified across homepage, onboarding, and in-app gates.n- [ ] Explicit QA evidence attached for cross-surface consistency (homepage, onboarding, in-app upgrade gates): screenshots or checklist artifact linked in RED-64.n- [ ] Baseline vs 14-day post-ship funnel metrics captured in a short summary comment on RED-64.n- [ ] MVP launch date confirmed and due dates aligned in one pass (RED-76 and RED-77 Done).n`nNotes: due date is set slightly after expected post-ship 14-day window and should be retargeted by RED-77 if launch shifts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants