auto-assign filter priority (max+10) on create

New filter rules no longer default to priority 100. Server picks
max(priority)+10 per account when client sends priority=None (or 10
if the account has no rules yet), and the UI pre-fills the input
with the next value instead of a fixed 100. Avoids ambiguous ordering
when multiple rules end up with the same priority.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-31 10:46:52 +02:00
parent b77b192b56
commit 202920b9ef
3 changed files with 23 additions and 6 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ class FilterActionResponse(FilterActionCreate):
class FilterRuleCreate(BaseModel):
name: str
account_id: int
priority: int = 100
priority: int | None = None # None → automatisch ans Ende einsortieren (max+10)
enabled: bool = True
stop_processing: bool = False
source_folder: str = "INBOX"