Skip to content

feat(data-retention): workspace-level overrides for retention and PII - #5186

Merged
TheodoreSpeaks merged 4 commits into
stagingfrom
feat/workspace-override-data-retention
Jun 23, 2026
Merged

TheodoreSpeaks merged 4 commits into
stagingfrom
feat/workspace-override-data-retention

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Contributor

Summary

  • Add workspace-level overrides to data retention (previously org-only, enterprise plans).
  • Each workspace can override the org retention hours per field — log retention, soft-delete cleanup, task cleanup — tri-state: inherit / a duration / forever. PII redaction can also be overridden per workspace (or left to inherit).
  • Overrides are stored in the existing organization.dataRetentionSettings JSON (no migration); resolved by a new resolveEffectiveRetentionHours helper in the cleanup dispatcher's per-workspace path. Non-enterprise plans and the cleanup jobs themselves are unchanged.
  • UI: a single Default · all workspaces section (retention + PII) plus a unified Workspace overrides list. Each override opens a Configure modal with a multi-select workspace picker, so one config can be applied to many workspaces at once — each lands as its own editable row.

Type of Change

  • New feature

Testing

  • Tested manually
  • type-check 0 errors, bun run lint 16/16, check:api-validation:strict passed, check:migrations origin/staging (no new migrations)
  • Unit tests: resolveEffectiveRetentionHours (inherit / override / forever / scoping) and the retention-override contract schema (dedup refine, hour bounds) — 21 passing

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Loading
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.

1 participant