fix(archive): מיון תיקי-ארכיב לפי תאריך-ארכוב (server-authoritative) #217
Reference in New Issue
Block a user
Delete Branch "worktree-archive-sort-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
בעיה
דף
/archiveהציג תיקים בסדרupdated_atבמקום לפי תאריך-הארכוב, למרות שעמודת "תאריך ארכוב" סומנה כממוינת (▼). אומת על הנתונים החיים:archived_atמאוכלס ותקין; פונקציית-המיון של TanStack ממיינת נכון — אך ההסתמכות על מיון-בדפדפן לא הבטיחה את הסדר בטעינה.שורש
list_cases()החזיר תמידORDER BY updated_at DESC(db.py), כך שהסדר ההתחלתי שגוי לפני/בלי מיון-לקוח.תיקון
כש-
archived_only=True→ORDER BY archived_at DESC NULLS LAST. הסדר הופך server-authoritative.updated_at DESCכשהיה).cases.py:list_casesאינו מעבירarchived_only→ ללא שינוי התנהגות.NULLS LASTהגנתי —archived_onlyממילא מסנן NULLs.Invariants
list_cases, ORDER BY מותנה.בדיקות
py_compileעובר. אין בדיקות-יחידה ל-list_cases; השינוי מינימלי ומבודד למסלול הארכיב.🤖 Generated with Claude Code