feat: expanded smart folder category coverage (Gaming, RideSharing, FoodDelivery, SeasonalSales, Wellness, Shopping)
- Added 6 new EmailCategory enum values - HeuristicClassifier rewritten with domain and subject-keyword rules: - RideSharing: Uber, Lyft, Bolt, Free Now, Grab etc. - FoodDelivery: DoorDash, Uber Eats, Deliveroo, Just Eat, Grubhub etc. - Gaming: Steam, Epic, EA, Xbox, PlayStation, Nintendo, Blizzard, Riot etc. - Shopping: Amazon, eBay, Etsy, ASOS, Zalando, Shein etc. - SeasonalSales: subject keywords (sale, % off, promo, black friday etc.) - Wellness: Strava, Garmin, Peloton, MyFitnessPal, Headspace, Nike etc. + subject hints - Priority ordering prevents ride-share/food receipts misclassifying as Finance - SidebarCounts maps all new slugs to their EmailCategory - frontend folderToRequest() and CAT_SLUG map all new categories - Existing emails will pick up new categories on next sync Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -167,16 +167,16 @@ public class AnalyticsService : IAnalyticsService
|
||||
|
||||
var smartFolders = new Dictionary<string, int>
|
||||
{
|
||||
["automated"] = Cat(EmailCategory.Notification),
|
||||
["finance"] = Cat(EmailCategory.Finance),
|
||||
["social"] = Cat(EmailCategory.Social),
|
||||
["shopping"] = Cat(EmailCategory.Promotional),
|
||||
["noreply"] = 0,
|
||||
["gaming"] = 0,
|
||||
["sales"] = 0,
|
||||
["ridesharing"] = 0,
|
||||
["food"] = 0,
|
||||
["wellness"] = 0,
|
||||
["automated"] = Cat(EmailCategory.Notification),
|
||||
["finance"] = Cat(EmailCategory.Finance),
|
||||
["social"] = Cat(EmailCategory.Social),
|
||||
["shopping"] = Cat(EmailCategory.Shopping) + Cat(EmailCategory.Promotional),
|
||||
["noreply"] = Cat(EmailCategory.Notification),
|
||||
["gaming"] = Cat(EmailCategory.Gaming),
|
||||
["sales"] = Cat(EmailCategory.SeasonalSales),
|
||||
["ridesharing"] = Cat(EmailCategory.RideSharing),
|
||||
["food"] = Cat(EmailCategory.FoodDelivery),
|
||||
["wellness"] = Cat(EmailCategory.Wellness),
|
||||
};
|
||||
|
||||
return new SidebarCountsDto(inbox, allMail, unread, starred, sent, drafts, trash, spam, large, old, smartFolders);
|
||||
|
||||
Reference in New Issue
Block a user