fix(imap): address code review feedback on ingestion profiles

- Improve warning log in _resolve_categories_for_profile() to include
  exception type name for better troubleshooting
- Add SQLAlchemy IS NULL comment to imap_profiles.py filter
- Pass default_categories from server to template to avoid hardcoded
  category list in JS (now uses {{ default_categories | tojson }})
- Simplify view profiles query (remove redundant unauthenticated path)
- Update docs: ConfigurationGuide.md and EmailIngestion.md with
  full profiles documentation including category table and API reference

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-12 01:19:32 +00:00
parent c9f554465d
commit 2e087731b9
7 changed files with 79 additions and 25 deletions
+2 -1
View File
@@ -812,6 +812,7 @@ function imapAccountsApp() {
accounts: {{ accounts | tojson }},
profiles: {{ profiles | tojson }},
categories: {{ categories | tojson }},
defaultCategories: {{ default_categories | tojson }},
quota: {
current_count: {{ current_count }},
max_mailboxes: {{ max_mailboxes | tojson }},
@@ -1083,7 +1084,7 @@ function imapAccountsApp() {
allowed_categories: [...profile.allowed_categories],
};
} else {
this.profileForm = { name: '', description: '', allowed_categories: ['pdf', 'office', 'opendocument', 'text', 'web'] };
this.profileForm = { name: '', description: '', allowed_categories: [...this.defaultCategories] };
}
this.profileFormError = null;
this.profileModalOpen = true;