[PR #765] [MERGED] feat: add empty address cleanup feature #751

Closed
opened 2026-02-26 21:32:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/765
Author: @dreamhunter2333
Created: 11/13/2025
Status: Merged
Merged: 11/13/2025
Merged by: @dreamhunter2333

Base: mainHead: feature/email


📝 Commits (3)

  • 5f3b640 feat: add empty address cleanup feature
  • e8da2b2 chore: update dependencies
  • 7e15902 docs: update CHANGELOG for empty address cleanup feature

📊 Changes

12 files changed (+1239 additions, -1267 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 frontend/package.json (+1 -1)
📝 frontend/pnpm-lock.yaml (+332 -346)
📝 frontend/src/views/admin/Maintenance.vue (+16 -0)
📝 pages/package.json (+1 -1)
📝 vitepress-docs/package.json (+2 -2)
📝 vitepress-docs/pnpm-lock.yaml (+359 -383)
📝 worker/package.json (+6 -6)
📝 worker/pnpm-lock.yaml (+504 -528)
📝 worker/src/common.ts (+7 -0)
📝 worker/src/models/index.ts (+2 -0)
📝 worker/src/scheduled.ts (+7 -0)

📄 Description

User description

Summary

Add functionality to clean up email addresses that have never received any emails and were created more than N days ago in the maintenance page.

Changes

Backend

  • Models (worker/src/models/index.ts): Added enableEmptyAddressAutoCleanup and cleanEmptyAddressDays to CleanupSettings type
  • Core Logic (worker/src/common.ts): Implemented emptyAddress cleanup type that deletes addresses with no emails older than N days
  • Scheduler (worker/src/scheduled.ts): Added auto-cleanup support for empty addresses in cron job

Frontend

  • UI (frontend/src/views/admin/Maintenance.vue): Added new form item with:
    • Auto-cleanup checkbox
    • Days input field (default: 30)
    • Manual cleanup button
  • i18n: Added translations for English and Chinese

Features

  • Manual Cleanup: Admin can immediately delete empty addresses older than specified days
  • Auto Cleanup: Enable checkbox to run cleanup automatically via daily cron job
  • Data Integrity: Uses batchDeleteAddressWithData() for safe cascade deletion of all related data

Test Plan

  • Build worker successfully
  • Build frontend successfully
  • Test manual cleanup in maintenance page
  • Test auto-cleanup settings persistence
  • Verify empty addresses are correctly identified and deleted

🤖 Generated with Claude Code


PR Type

Enhancement, Tests


Description

  • Added empty address cleanup feature for unused email addresses.

  • Updated frontend UI to support manual and auto cleanup.

  • Enhanced backend logic to handle empty address cleanup.

  • Updated dependencies and version to v1.1.0.


Changes walkthrough 📝

Relevant files
Enhancement
4 files
Maintenance.vue
Added UI controls for empty address cleanup.                         
+16/-0   
common.ts
Implemented backend logic for empty address cleanup.         
+7/-0     
index.ts
Extended CleanupSettings model for empty address cleanup.
+2/-0     
scheduled.ts
Integrated empty address cleanup into scheduled tasks.     
+7/-0     
Documentation
1 files
CHANGELOG.md
Updated changelog for version v1.1.0.                                       
+2/-0     
Dependencies
4 files
package.json
Updated frontend dependencies and version to v1.1.0.         
+4/-4     
package.json
Updated pages dependencies and version to v1.1.0.               
+2/-2     
package.json
Updated vitepress-docs dependencies and version to v1.1.0.
+2/-2     
package.json
Updated worker dependencies and version to v1.1.0.             
+4/-4     

Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.

  • 🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

    ## 📋 Pull Request Information **Original PR:** https://github.com/dreamhunter2333/cloudflare_temp_email/pull/765 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 11/13/2025 **Status:** ✅ Merged **Merged:** 11/13/2025 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/email` --- ### 📝 Commits (3) - [`5f3b640`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/5f3b640b450062266d7219ba75d71bcd8357ac80) feat: add empty address cleanup feature - [`e8da2b2`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/e8da2b2598c0d0b4d3e8c8283a8ddc934ee1c367) chore: update dependencies - [`7e15902`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/7e159020d020de1e5217c9e9e6314b7f44d67229) docs: update CHANGELOG for empty address cleanup feature ### 📊 Changes **12 files changed** (+1239 additions, -1267 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `frontend/package.json` (+1 -1) 📝 `frontend/pnpm-lock.yaml` (+332 -346) 📝 `frontend/src/views/admin/Maintenance.vue` (+16 -0) 📝 `pages/package.json` (+1 -1) 📝 `vitepress-docs/package.json` (+2 -2) 📝 `vitepress-docs/pnpm-lock.yaml` (+359 -383) 📝 `worker/package.json` (+6 -6) 📝 `worker/pnpm-lock.yaml` (+504 -528) 📝 `worker/src/common.ts` (+7 -0) 📝 `worker/src/models/index.ts` (+2 -0) 📝 `worker/src/scheduled.ts` (+7 -0) </details> ### 📄 Description ### **User description** ## Summary Add functionality to clean up email addresses that have never received any emails and were created more than N days ago in the maintenance page. ## Changes ### Backend - **Models** (`worker/src/models/index.ts`): Added `enableEmptyAddressAutoCleanup` and `cleanEmptyAddressDays` to `CleanupSettings` type - **Core Logic** (`worker/src/common.ts`): Implemented `emptyAddress` cleanup type that deletes addresses with no emails older than N days - **Scheduler** (`worker/src/scheduled.ts`): Added auto-cleanup support for empty addresses in cron job ### Frontend - **UI** (`frontend/src/views/admin/Maintenance.vue`): Added new form item with: - Auto-cleanup checkbox - Days input field (default: 30) - Manual cleanup button - **i18n**: Added translations for English and Chinese ## Features - **Manual Cleanup**: Admin can immediately delete empty addresses older than specified days - **Auto Cleanup**: Enable checkbox to run cleanup automatically via daily cron job - **Data Integrity**: Uses `batchDeleteAddressWithData()` for safe cascade deletion of all related data ## Test Plan - [x] Build worker successfully - [x] Build frontend successfully - [ ] Test manual cleanup in maintenance page - [ ] Test auto-cleanup settings persistence - [ ] Verify empty addresses are correctly identified and deleted 🤖 Generated with [Claude Code](https://claude.ai/code) ___ ### **PR Type** Enhancement, Tests ___ ### **Description** - Added empty address cleanup feature for unused email addresses. - Updated frontend UI to support manual and auto cleanup. - Enhanced backend logic to handle empty address cleanup. - Updated dependencies and version to v1.1.0. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>4 files</summary><table> <tr> <td><strong>Maintenance.vue</strong><dd><code>Added UI controls for empty address cleanup.</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/765/files#diff-68808e9c7bcf8b34a2d45265cca130c547b77e75a97350ea7d16682e69922ae4">+16/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>common.ts</strong><dd><code>Implemented backend logic for empty address cleanup.</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/765/files#diff-fcc08fd5aa3c190d0d45c7e3dd208e5ee831d360b272fdd5869607cf472c5eb1">+7/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>index.ts</strong><dd><code>Extended CleanupSettings model for empty address cleanup.</code></dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/765/files#diff-430bcc4ffa98738e7419c774a53ba2ce8b5127a36b3741e89bf36b95a56f02bc">+2/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>scheduled.ts</strong><dd><code>Integrated empty address cleanup into scheduled tasks.</code>&nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/765/files#diff-32db4dd84c910f05f07a8a392340ce79b637bcb01d929f6df09f3ba94acfa9b7">+7/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>CHANGELOG.md</strong><dd><code>Updated changelog for version v1.1.0.</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/765/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed">+2/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>4 files</summary><table> <tr> <td><strong>package.json</strong><dd><code>Updated frontend dependencies and version to v1.1.0.</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/765/files#diff-da6498268e99511d9ba0df3c13e439d10556a812881c9d03955b2ef7c6c1c655">+4/-4</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>package.json</strong><dd><code>Updated pages dependencies and version to v1.1.0.</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/765/files#diff-74314f72f6616d400be4cb0d161867d8148f23c22d4c12c7188aedb129c00c59">+2/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>package.json</strong><dd><code>Updated vitepress-docs dependencies and version to v1.1.0.</code></dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/765/files#diff-3adbfbfaa65ecc60f48c8d009a52c697d4c80d61ee887799df22407fcb73f380">+2/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>package.json</strong><dd><code>Updated worker dependencies and version to v1.1.0.</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/765/files#diff-89dc6f41a53ce13f2da5a00dd34868762e6cd0df46eddc9f5c3c4510b1493870">+4/-4</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr></tr></tbody></table> ___ > <details> <summary> Need help?</summary><li>Type <code>/help how to ...</code> in the comments thread for any questions about PR-Agent usage.</li><li>Check out the <a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> for more information.</li></details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
    kerem 2026-02-26 21:32:48 +03:00
    Sign in to join this conversation.
    No milestone
    No project
    No assignees
    1 participant
    Notifications
    Due date
    The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

    No due date set.

    Dependencies

    No dependencies set.

    Reference
    starred/cloudflare_temp_email#751
    No description provided.