+ ` : nothing}
+
+ `;
+}
+```
+
+**7. Wire sort toolbar into the render method:**
+
+In the `render()` method, insert the sort toolbar between the header `` and the search indicator / create form. Specifically, after the `importError` block (after line 2124), add:
+```typescript
+${this.renderSortToolbar()}
+```
+
+**8. Replace `filteredEntries` with `sortedEntries` in the rendering path:**
+
+In `renderPlaylistList()`, change line 2459 from:
+```typescript
+const visible = this.filteredEntries;
+```
+to:
+```typescript
+const visible = this.sortedEntries;
+```
+
+Also update the `originalIndex` lookup on line 2488-2489. Since `sortedEntries` may reorder entries, `this.entries.indexOf(entry)` still works correctly since it finds the entry in the original `this.entries` array — the reference identity is preserved because `sortedEntries` spreads `filteredEntries` which filters `this.entries`. VERIFY this is the case. If `filteredEntries` creates new objects (it does NOT — it just filters), then `indexOf` will still work.
+
+**IMPORTANT:** The direction button should ALWAYS be visible (unlike track-list which hides it when no sort is active), since playlist sort always has an active field (no "Default" option — "Recent" is the default).
+
+
+ cd frontend && npx tsc --noEmit
+
+ Playlist view has a sort toolbar below the header with four options (Recent, Name, Date Created, Track Count), a direction toggle button, dropdown opens/closes correctly, sort preference saved to localStorage, playlists reorder when sort changes. Default is "Recent" descending (matching current behavior).
+
+
+
+
+
+1. `cd backend && go build ./... && go vet ./...` — backend compiles
+2. `cd frontend && npx tsc --noEmit` — frontend type-checks
+3. Manual: Open playlist view, verify sort dropdown appears, try each sort option, toggle direction, verify playlists reorder correctly
+4. Manual: Switch away from playlist view and back — sort preference persists
+
+
+
+- Sort dropdown visible in playlist view header area
+- Four sort options: Recent (default), Name, Date Created, Track Count
+- Ascending/descending toggle works
+- Playlists visually reorder when sort or direction changes
+- Sort preference persists in localStorage across view switches
+- Backend compiles, frontend type-checks
+- Default sort (Recent, desc) matches the existing behavior (updated_at DESC from DB)
+
+
+