Skip to content

feat: Board List Reorder#328

Merged
sahil-noon merged 4 commits into
mainfrom
260708-a2qd-board-list-reorder
Jul 8, 2026
Merged

feat: Board List Reorder#328
sahil-noon merged 4 commits into
mainfrom
260708-a2qd-board-list-reorder

Conversation

@sahil-noon

Copy link
Copy Markdown
Collaborator

Meta

Change ID Type Confidence Plan Review
a2qd feat 3.9/5.0 20/20 tasks, 21/21 acceptance ✓ ✓ 2 cycles
Impact +/− Net
raw +2111 / −36 +2075
true +1684 / −25 +1659
└ impl +738 / −25 +713
└ tests +946 / −0 +946

excludes fab/, docs/ · generated by fab-kit v2.13.5

Pipeline: intake ✓ → apply ✓ → review ✓ → hydrate ✓ → ship → review-pr

Summary

The board list is hard-sorted alphabetically everywhere (sidebar BoardsSection, Cockpit BOARDS zone, top-bar BoardSwitcher), so users can't surface the boards they use most without renaming them. This mirrors the existing server drag-reorder pattern to let users manually reorder boards, persisting order in ~/.rk/settings.yaml since a board is an emergent cross-server aggregate with no single tmux object to carry a rank.

Changes

  • Backend: persist board order in ~/.rk/settings.yaml (internal/settings)
  • Backend: POST /api/boards/order + rank-aware board sort (api/boards.go)
  • Backend: server-global event: board-order SSE broadcast (api/sse.go)
  • Frontend: order propagation in useBoards (hooks/use-boards.ts, api/boards.ts, contexts/session-context.tsx)
  • Frontend: shared drag-reorder hook on the two named surfaces
  • Frontend: command-palette keyboard path (lib/palette-move.ts + palette wiring)
  • Tests

sahil87 added 2 commits July 8, 2026 12:09
Mirror the server drag-reorder pattern for the board list: persist
board order in ~/.rk/settings.yaml, add POST /api/boards/order with
rank-aware sort, broadcast a server-global board-order SSE event, and
wire drag reordering into the sidebar BoardsSection and Cockpit BOARDS
zone.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements user-controlled board list ordering (instead of hard alphabetical sorting) by persisting a host-global board order in ~/.rk/settings.yaml, exposing a new POST /api/boards/order endpoint, broadcasting a server-global board-order SSE event, and wiring shared drag + command-palette reorder paths across the main board list surfaces.

Changes:

  • Backend: add BoardOrder persistence in settings, apply rank-aware sorting to GET /api/boards, and add POST /api/boards/order plus server-global board-order SSE broadcast + replay-on-connect.
  • Frontend: add setBoardOrder, subscribe to board-order via SessionProvider, and introduce shared useBoardListReorder hook wired into sidebar BoardsSection + Cockpit BOARDS zone, plus palette “Board: Move up/down”.
  • Tests/docs: add Go unit/integration tests, Vitest coverage for the hook/client/palette wiring, and Playwright e2e coverage for endpoint+sort+SSE fanout, plus memory docs updates.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
fab/changes/260708-a2qd-board-list-reorder/plan.md Generated implementation plan and acceptance criteria for board reorder feature.
fab/changes/260708-a2qd-board-list-reorder/intake.md Feature intake/requirements and design decisions for board list reorder.
fab/changes/260708-a2qd-board-list-reorder/.status.yaml Change status/metrics metadata for the fab pipeline.
fab/changes/260708-a2qd-board-list-reorder/.history.jsonl Pipeline stage transition history for the change.
docs/memory/run-kit/ui-patterns.md Documents new UI pattern: board-list drag reorder + palette move actions + e2e filesystem snapshot/restore convention.
docs/memory/run-kit/index.md Updates memory index summary to include new board-order architecture details.
docs/memory/run-kit/architecture.md Documents /api/boards/order, board-order persistence/sorting, and server-global board-order SSE semantics.
app/backend/internal/settings/settings.go Adds BoardOrder parse/serialize + accessors persisted to ~/.rk/settings.yaml.
app/backend/internal/settings/settings_test.go Tests parsing/serialization/round-trip semantics for BoardOrder and coexistence with server colors.
app/backend/api/boards.go Applies rank-aware board sorting and adds POST /api/boards/order handler with validation + SSE broadcast.
app/backend/api/router.go Registers POST /api/boards/order.
app/backend/api/sse.go Adds cached-slot + replay-on-connect + fanout for server-global board-order SSE event.
app/backend/api/sse_test.go Tests board-order fanout to all clients + cached replay + nil normalization.
app/backend/api/boards_test.go Tests sort helper, GET ordering integration, and POST validation/persist+broadcast behavior.
app/frontend/src/api/boards.ts Adds setBoardOrder() client and updates BoardSummary docs to reflect display ordering.
app/frontend/src/api/boards.test.ts Adds MSW tests validating setBoardOrder request/response and error propagation.
app/frontend/src/contexts/session-context.tsx Adds subscribeBoardOrder seam and wires board-order listeners on pool + metrics streams.
app/frontend/src/hooks/use-boards.ts Subscribes to server-global board-order to trigger debounced refetch.
app/frontend/src/hooks/use-board-list-reorder.ts New shared drag-reorder hook for board lists (sidebar + cockpit) with debounce/flush + optimistic override.
app/frontend/src/hooks/use-board-list-reorder.test.ts Vitest coverage for MIME discrimination, splice behavior, reconcile lifecycle, debounce/flush, and self-target acceptance.
app/frontend/src/components/sidebar/boards-section.tsx Wires useBoardListReorder into the sidebar BoardsSection and renders orderedBoards.
app/frontend/src/components/sidebar/boards-section.test.tsx Ensures board rows are draggable and wiring behaves as expected.
app/frontend/src/components/server-list-page.tsx Wires useBoardListReorder into Cockpit BOARDS zone tiles and renders orderedBoards.
app/frontend/src/components/server-list-page.test.tsx Ensures Cockpit board tiles are draggable (wiring test).
app/frontend/src/components/board/board-page.tsx Adds palette “Board: Move up/down” actions using computeMoveOrder + setBoardOrder.
app/frontend/src/lib/palette-move.test.ts Extends coverage for board move semantics via computeMoveOrder.
app/frontend/tests/e2e/board-list-reorder.spec.ts Playwright e2e for endpoint persistence, rank-aware sort, and server-global SSE broadcast; snapshots/restores settings.
app/frontend/tests/e2e/board-list-reorder.spec.md Companion doc describing what the e2e validates and why it avoids synthetic drag simulation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/frontend/tests/e2e/board-list-reorder.spec.ts
Comment thread app/frontend/tests/e2e/board-list-reorder.spec.ts Outdated
@sahil-noon sahil-noon marked this pull request as ready for review July 8, 2026 07:02
@sahil-noon sahil-noon merged commit 7b1836b into main Jul 8, 2026
5 checks passed
@sahil-noon sahil-noon deleted the 260708-a2qd-board-list-reorder branch July 8, 2026 07:03
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.

3 participants