Commit 6c76d3d
authored
Implement thread deletion functionality (#1799)
# Implement Thread Deletion Functionality
## Description
This PR implements thread deletion functionality, allowing users to permanently delete threads from the bin. The implementation includes:
1. Replacing the optimistic delete with a real deletion using TRPC mutation
2. Enabling the previously disabled delete button in the thread context menu
3. Adding server-side support for thread deletion from the database
4. Adding folder name normalization to handle 'bin' vs 'trash' naming differences
## Type of Change
- [x] ✨ New feature (non-breaking change which adds functionality)
- [x] 🐛 Bug fix (non-breaking change which fixes an issue)
## Areas Affected
- [x] Email Integration (Gmail, IMAP, etc.)
- [x] User Interface/Experience
- [x] Data Storage/Management
## Testing Done
- [x] Manual testing performed
## Checklist
- [x] I have performed a self-review of my code
- [x] My changes generate no new warnings
## Additional Notes
The implementation now properly deletes threads from the database when the user selects the delete option from the context menu. The UI provides toast notifications to indicate the deletion status.
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._1 parent 101b732 commit 6c76d3d
File tree
3 files changed
+52
-37
lines changed- apps
- mail/components/context
- server/src/routes/agent
3 files changed
+52
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | | - | |
31 | 32 | | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | | - | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
96 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
97 | 101 | | |
98 | 102 | | |
99 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
100 | 106 | | |
101 | 107 | | |
102 | 108 | | |
| |||
141 | 147 | | |
142 | 148 | | |
143 | 149 | | |
| 150 | + | |
144 | 151 | | |
145 | 152 | | |
146 | 153 | | |
147 | 154 | | |
148 | 155 | | |
149 | 156 | | |
150 | | - | |
| 157 | + | |
151 | 158 | | |
152 | 159 | | |
153 | 160 | | |
| 161 | + | |
154 | 162 | | |
155 | 163 | | |
156 | 164 | | |
| |||
305 | 313 | | |
306 | 314 | | |
307 | 315 | | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
320 | 328 | | |
321 | 329 | | |
322 | 330 | | |
| |||
353 | 361 | | |
354 | 362 | | |
355 | 363 | | |
356 | | - | |
357 | 364 | | |
358 | 365 | | |
359 | 366 | | |
| |||
493 | 500 | | |
494 | 501 | | |
495 | 502 | | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
| 503 | + | |
505 | 504 | | |
506 | 505 | | |
507 | 506 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
370 | 380 | | |
371 | 381 | | |
372 | 382 | | |
| |||
384 | 394 | | |
385 | 395 | | |
386 | 396 | | |
387 | | - | |
| 397 | + | |
388 | 398 | | |
389 | 399 | | |
390 | 400 | | |
| |||
432 | 442 | | |
433 | 443 | | |
434 | 444 | | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
439 | 449 | | |
440 | 450 | | |
441 | 451 | | |
| |||
656 | 666 | | |
657 | 667 | | |
658 | 668 | | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
659 | 674 | | |
660 | 675 | | |
661 | 676 | | |
662 | 677 | | |
663 | 678 | | |
664 | 679 | | |
665 | 680 | | |
666 | | - | |
| 681 | + | |
| 682 | + | |
667 | 683 | | |
668 | 684 | | |
| 685 | + | |
669 | 686 | | |
670 | 687 | | |
671 | 688 | | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | 689 | | |
676 | 690 | | |
677 | 691 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
| |||
0 commit comments