Skip to content

feat(gui): add drag-and-drop section reorder#149

Merged
kianwoon merged 4 commits intomainfrom
feat/gui-section-reorder
Apr 2, 2026
Merged

feat(gui): add drag-and-drop section reorder#149
kianwoon merged 4 commits intomainfrom
feat/gui-section-reorder

Conversation

@kianwoon
Copy link
Copy Markdown
Owner

@kianwoon kianwoon commented Apr 2, 2026

Summary

  • Add drag-and-drop reordering for Active Models, Providers, and Recent sections via grip icon (⠿) on section headers
  • Persist custom section order to localStorage across app restarts
  • Right-click section header → "Reset order to default" to restore original layout

Test plan

  • Hover over section headers — grip icon appears
  • Drag a section and drop it above/below another — sections reorder with visual drop indicator
  • Reload the app — custom order persists
  • Right-click a section title → click "Reset order to default" → restores Active Models → Providers → Recent
  • Compact mode still works correctly with custom order

kianwoon added 4 commits April 3, 2026 05:21
Allow users to reorder Active Models, Providers, and Recent sections
by dragging their headers. Order persists via localStorage with a
right-click context menu to reset to default.
Switch from CSS order to insertBefore() to avoid mixing sections with
other flex children (titlebar, stats, app-credit). Replace large
context menu with small ↺ icon in app-credit bar that only appears
when sections have been reordered.
The function was replaced by an IIFE but the old call remained, causing
a ReferenceError that prevented WebSocket/HTTP initialization.
- Replace HTML5 drag API (broken in WKWebView) with mousedown/mousemove/mouseup
- Fix compact mode to use :first-of-type instead of hardcoded section IDs
- Remove unused draggable attributes and placeholder variable
@kianwoon kianwoon merged commit d84dcaf into main Apr 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant