Gallery has no 'sort' within a folder (e.g., by name, by stitch count) — user with 30 designs in one folder can only see the default order, no way to sort by date edited or stitches #312
Labels
No labels
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:verify-failed
bug
deferred
feature-request
in-progress
needs-decompose
needs-triage
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/Kimi_Agent_Brother_10_Digitizing_App#312
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Finding
The Gallery has a global sort mode (per the snippet: 'newest', 'oldest', 'recently-edited', 'name-asc', 'name-desc', 'Most stitches'). But the sort is global — it applies to all folders.
grep -rn 'sortByFolder\|perFolderSort' src/pages/Gallery.tsxreturns 0.A user with:
Currently: one sort applies to all. The user has to switch sort to see different orders.
The fix is per-folder sort: each folder remembers its preferred sort.
Where
src/pages/Gallery.tsx(singlesortMode)grep -rn 'perFolderSort' src/returns 0src/components/gallery/FolderNav.tsxSuggested fix shape
sortMode: SortModewithsortModes: Record<string, SortMode>(folder ID → sort mode):Persistence: persist the
sortModesto localStorage so each folder's preference survives a refresh.UI: the sort dropdown shows the current folder's sort mode. The "all" folder has its own sort.
Migration: existing localStorage (which has a single
sortMode) migrates tosortModes['all'].Severity
Low. The user can use the global sort. Power users with many folders notice.
Discovered by
Gap analysis (2026-10-02) of gallery sort.
Related
src/pages/Gallery.tsx.Closed retroactively after fix landed on main in
7cd6dad("Apply changes from kilo-gsd.py run for Mark/Kimi_Agent_Brother_10_Digitizing_App#316"). That commit's patch set also covers #312: src/components/gallery/persistedFilters.ts gainedsortModes: Record<string, SortMode>plus the v1→v2 legacy migration; src/components/workspace/CanvasArea.tsx and src/pages/Gallery.tsx were updated to the per-folder setter (fixes TS2561sortModeshould besortModes); new test file src/components/gallery/issue-312-per-folder-sort.test.ts was added. The kilo-gsd run for #312 hit push-rejected (fetch first) and left a salvage marker; the launcher re-spawned a fresh run, but the fix had already landed via the parallel #316 commit before that. Watcher t_47ebdef4 closing #312 with this comment.