Skip to content

Add slot swap controls to dashboard editor#656

Merged
multiplex55 merged 1 commit intomasterfrom
codex/add-swap-functionality-to-dashboard-editor
Jan 8, 2026
Merged

Add slot swap controls to dashboard editor#656
multiplex55 merged 1 commit intomasterfrom
codex/add-swap-functionality-to-dashboard-editor

Conversation

@multiplex55
Copy link
Copy Markdown
Owner

Motivation

  • Allow users to mark a slot as a swap source and swap slot content (widget, settings, and label) between two slots to streamline dashboard editing workflows.
  • Provide a faster UX path to swap with a currently selected_slot and support explicit source/destination swapping via a swap_anchor.
  • Ensure swaps respect existing slot validation rules so swaps do not introduce overlaps or out-of-bounds slots.
  • Clear any conflict warnings when a swap succeeds so the editor state remains consistent.

Description

  • Track a swap source in the editor state by adding swap_anchor: Option<usize> to DashboardEditorDialog and an ensure_swap_anchor helper to keep it valid.
  • Add UI controls to each slot header: a Swap button that toggles/consumes the swap_anchor and a Swap with selected action that swaps with selected_slot when present.
  • Implement swap_slots(first, second, registry) which swaps widget, settings, and id for the two slots, validates both swapped slots via validate_slot, and rolls back on validation failure while clearing blocked_warning on success.
  • Adjust anchor bookkeeping when slots are removed and ensure selected_slot and swap_anchor are kept in sync via ensure_selected_slot and calls to ensure_swap_anchor.

Testing

  • No automated tests were run for this change.

Codex Task

@multiplex55 multiplex55 merged commit c3fcb47 into master Jan 8, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/add-swap-functionality-to-dashboard-editor branch January 9, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant