Skip to content

Unify topic folder routing and add manual INBOX re-sort trigger#3

Draft
Jastroger with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-separated-emails
Draft

Unify topic folder routing and add manual INBOX re-sort trigger#3
Jastroger with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-separated-emails

Conversation

Copilot AI commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Emails from the same topic could be split across near-duplicate folders when AI returned slight naming variants. Users also needed a way to re-run sorting after a cycle had already finished.

  • Folder normalization to prevent semantic duplicates

    • Extended AiClassificationService.NormalizeFolderName to resolve AI folder outputs against existing folders using a comparable key (case-insensitive, separator/punctuation-insensitive, accent-insensitive).
    • If exactly one existing folder matches the normalized key, that folder is reused instead of creating a new one.
  • Manual re-sort entry point in UI

    • Added Korrekturen → INBOX erneut sortieren in MainForm.
    • Action reuses existing “mark INBOX unread” behavior and wakes the worker immediately so users can trigger correction runs on demand, even after prior processing completed.
  • Focused behavior coverage

    • Added a classification test proving AI output variants (e.g. IT Entwicklung) map back to an existing folder (e.g. IT & Entwicklung) rather than creating a new folder.
var uniqueComparableMatch = TryFindUniqueComparableFolder(candidate, availableFolders);
if (!string.IsNullOrWhiteSpace(uniqueComparableMatch))
{
    return uniqueComparableMatch;
}

Copilot AI linked an issue Jun 1, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix issue with separated e-mails in folders Unify topic folder routing and add manual INBOX re-sort trigger Jun 1, 2026
Copilot AI requested a review from Jastroger June 1, 2026 05:05
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.

Separated E-Mails

2 participants