Skip to content

feat: drag-and-reorder sessions#2

Open
Flowelfox wants to merge 2 commits intomainfrom
feature/rearange-sessions
Open

feat: drag-and-reorder sessions#2
Flowelfox wants to merge 2 commits intomainfrom
feature/rearange-sessions

Conversation

@Flowelfox
Copy link
Copy Markdown
Owner

Summary

  • Add sort_order column to sessions DB model with sparse integer ordering and new Alembic migration
  • New PATCH /api/sessions/{id}/reorder endpoint — move-based API with after_session_id (or null for top)
  • Lightweight session_reorder WebSocket event broadcasts ordered IDs to all clients
  • Client uses ReorderableListView per worker group (ungrouped) and per project group (grouped), making cross-project drag structurally impossible
  • Drag handle icon for pane-split drops coexists with long-press reorder gesture
  • Ctrl/Cmd+Up/Down keyboard shortcuts for reordering single selected session
  • Reordering auto-disabled during search, status filter, or multi-select

Test plan

  • 9 new backend tests for reorder endpoint (move top/middle/bottom, validation, multi-reorder consistency)
  • 1071 existing backend tests pass
  • 188 existing Flutter tests pass
  • Ruff lint + format clean
  • ty type check clean
  • Flutter analyze — no issues
  • Manual: drag session within ungrouped list, verify order persists after refresh
  • Manual: drag session within a project group, verify it cannot leave the group
  • Manual: Ctrl+Up/Down moves selected session
  • Manual: reorder disabled when search/filter/multi-select active
  • Manual: drag handle icon opens pane split (not reorder)

Add sort_order column to sessions table with sparse integer ordering.
New PATCH /api/sessions/{id}/reorder endpoint accepts after_session_id
to place a session after another (or null for top). Lightweight
session_reorder WebSocket event broadcasts ordered IDs to all clients.

Client uses ReorderableListView per worker group (ungrouped) and per
project group (grouped mode), making cross-project drag structurally
impossible. Drag handle icon for pane-split drops coexists with
long-press reorder. Ctrl/Cmd+Up/Down keyboard shortcuts for single
selected session. Reordering disabled during search, filter, or
multi-select.

Backend: 0.35.1 → 0.36.0
Client: 1.37.2+74 → 1.38.0+75
@Flowelfox Flowelfox force-pushed the feature/rearange-sessions branch from 7fde45e to 27e6acb Compare April 9, 2026 22:21
Repository owner deleted a comment from codecov bot Apr 9, 2026
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