Goal
Centralize visible issue filtering so Board and Projects use the same Done retention and closed-issue behavior.
Problem
Board and Projects currently have different issue visibility behavior. Board defaults to open issues only, while Projects can show completed/Done issues indefinitely. This makes Done inconsistent across views.
Desired behavior
- Open issues are visible by default.
- Recently closed/Done issues are visible for a retention window.
- Default Done retention is 7 days.
- Old closed/Done issues are hidden by default.
- `includeClosed=true` or equivalent can still show more history where supported.
Suggested implementation
- Add a shared helper/query builder for visible issue filtering.
- Example: `buildVisibleIssueWhere({ includeClosed, doneRetentionDays, filters })`.
- Use the helper in Board and Projects.
- Add optional `DISPATCH_DONE_RETENTION_DAYS`, default `7`, if low-risk.
Tests
Add/update tests for:
- open issues are visible
- recently closed issues appear in Done
- old closed issues are hidden by default
- includeClosed behavior still works if present
- Board and Projects use consistent filtering
Acceptance criteria
- Board and Projects share Done retention behavior.
- Done does not appear empty in one view and immortal in another.
- Default retention is 7 days.
- Tests pass.
Validation
Run:
- `npm ci`
- `npx prisma generate`
- `npm run lint`
- `npm run typecheck`
- `npm run test`
- `npm run build`
Do not cut a release in this task.
Goal
Centralize visible issue filtering so Board and Projects use the same Done retention and closed-issue behavior.
Problem
Board and Projects currently have different issue visibility behavior. Board defaults to open issues only, while Projects can show completed/Done issues indefinitely. This makes Done inconsistent across views.
Desired behavior
Suggested implementation
Tests
Add/update tests for:
Acceptance criteria
Validation
Run:
Do not cut a release in this task.