Skip to content

feat: spam and quarantine scenario preset (#215)#1268

Open
Tijesunimi004 wants to merge 1 commit into
Stellar-Mail:mainfrom
Tijesunimi004:feat/spam-quarantine-scenario-preset-215
Open

feat: spam and quarantine scenario preset (#215)#1268
Tijesunimi004 wants to merge 1 commit into
Stellar-Mail:mainfrom
Tijesunimi004:feat/spam-quarantine-scenario-preset-215

Conversation

@Tijesunimi004

Copy link
Copy Markdown

Summary

  • Add spamQuarantineScenarioPreset as a new PresetScenario registered in PRESET_SCENARIOS, covering spam auto-detection, blocked senders, policy mismatch quarantine, repeat offenders, and false-positive resolution
  • Add quarantineEntries fixture (5 entries across all QuarantineEntryStatus states)
  • Add blockedPersonas fixture (3 blocked sender personas with category and reason)
  • Add spamWarningLabels fixture (5 warning labels: Spam, Blocked, Quarantine, Review-Pending, Cleared)
  • Add getQuarantineSummary and validateSpamQuarantinePreset helpers
  • Register "spam-quarantine" in PresetId union type
  • Tests in src/features/demo-admin-dashboard/__tests__/spamQuarantinePreset.test.ts and tests/unit/demo-admin-dashboard/spamQuarantinePreset.test.ts (CI path)

All demo data is fake, deterministic, and uses only *stealth.demo / @example.com addresses. No files outside src/features/demo-admin-dashboard/ are changed except the tests/unit/demo-admin-dashboard/ test directory.

Closes #215

Test plan

  • bun run test passes (covers tests/unit/demo-admin-dashboard/spamQuarantinePreset.test.ts)
  • bun x tsc --noEmit passes (no type errors)
  • Existing presets.test.ts now asserts "spam-quarantine" is in PRESET_SCENARIOS
  • validateSpamQuarantinePreset() returns no errors for the default fixture

Add spamQuarantineScenarioPreset to the demo admin dashboard, covering
spam auto-detection, blocked senders, policy mismatch quarantine, repeat
offenders, and false-positive resolution.

New types: QuarantineEntryStatus, QuarantineEntry, BlockedPersona, SpamWarningLabel
New helpers: getQuarantineSummary, validateSpamQuarantinePreset
Registers "spam-quarantine" in PresetId and PRESET_SCENARIOS
Tests added in both __tests__/ and tests/unit/ for CI coverage
Copilot AI review requested due to automatic review settings June 25, 2026 12:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

Create spam and quarantine scenario preset

2 participants