From 51fe8e01dca732744306bc9d46bf6940a3390304 Mon Sep 17 00:00:00 2001 From: Owen McGirr Date: Fri, 25 Sep 2026 11:30:59 +0100 Subject: [PATCH 1/2] Reorganise the Switches page around the switch list The section leads with its save status and Add switch in a toolbar, then the list; the practice tool follows as a quiet card with its source and start button on one line. Add switch keeps one fixed position in every state so focus survives switch data loading. Each row leads with its key badge, visually only, keeping the Edit then Remove order. The empty state tells people what to press, and buttons in setting groups and editor fields keep their natural width. Closes #887 Co-Authored-By: Claude Opus 5.5 (1M context) --- src/settings/SwitchesSection.tsx | 17 ++++++++----- src/ui/app.css | 43 +++++++++++++++++++------------- 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/src/settings/SwitchesSection.tsx b/src/settings/SwitchesSection.tsx index ef000331..368d5852 100644 --- a/src/settings/SwitchesSection.tsx +++ b/src/settings/SwitchesSection.tsx @@ -410,6 +410,7 @@ export function SwitchesSection({ controller, onDraftChange, suspended = false, const remoteRows = slots .map((slot, index) => ({ slot, index })) .filter(({ slot }) => slot.pressAction !== null); + const hasSwitches = settings.bindings.length > 0 || remoteRows.length > 0; const freeSlots = slots .map((slot, index) => (slot.pressAction === null ? index : -1)) .filter((index) => index >= 0); @@ -673,11 +674,10 @@ export function SwitchesSection({ controller, onDraftChange, suspended = false, /> )} - {!draft && } - +

{pending || remote.pending ? "Saving switches..." @@ -685,6 +685,9 @@ export function SwitchesSection({ controller, onDraftChange, suspended = false, ? "Switch assignments have unsaved changes." : "Saved automatically."}

+ {/* One fixed place in every state, so focus survives switches loading. */} + {!draft && } +
{remote.error && (
{remote.error} @@ -713,13 +716,14 @@ export function SwitchesSection({ controller, onDraftChange, suspended = false, )}
)} - {!settings.bindings.length && !remoteRows.length && !draft ? ( + {!hasSwitches && !draft ? (