Skip to content

Reorganise the Switches page around the switch list - #897

Merged
enaboapps merged 3 commits into
mainfrom
887-switches-page
Sep 25, 2026
Merged

enaboapps merged 3 commits into
mainfrom
887-switches-page

Conversation

@enaboapps

@enaboapps enaboapps commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #887. Stacked on #896, tracked in #891.

What changed

  • The section heading reads "Your switches", so it no longer repeats the page title. The section is also used by the setup guide.
  • A toolbar holds the save status and Add switch. Add switch no longer spans the page, and it stays in one fixed position in every state. An earlier draft moved it into the empty state, but the switch data loads after first render, so the button remounted and dropped focus. The existing capture test caught this.
  • The switch list follows the toolbar. Safe switch practice moves below the list as a muted card, with the source select and Test switches on one line.
  • Each row leads with its key badge, enlarged as the row's anchor. The badge moves visually only, so reading and focus order are unchanged: name, then Edit, then Remove. The keyboard icon is hidden when a badge is present, since the row text already says where the switch is. The open row gets a brand outline.
  • The empty state says what to do: choose Add switch, then press the switch.
  • Lone buttons in setting groups and editor fields keep their natural width instead of stretching.

Validation

On this head:

  • npm run lint passed
  • npm test passed: 238 Vitest tests and 5 Node tests
  • npm run build passed
  • cargo fmt --check, cargo clippy --all-targets -D warnings and cargo test passed (566 tests, 1 ignored). No Rust changes in this stack.
  • Rendered the empty state in browser mode. Rendered populated rows, an open editor, an unavailable key and the removal confirmation with a mocked Tauri bridge in headless Chrome, at 920px and 620px, light and dark.

Review follow-up

An independent review of this layer's head raised these points, now addressed:

  • Removed a duplicate empty-state rule and corrected the key-badge comment.

🤖 Generated with Claude Code

Rebase validation (2026-09-25)

Rebased onto current main (7fb8fce, including #881) in stack order. git range-diff shows every commit in this PR is patch-equivalent to its previous head, and the intended parent remains its PR base. On the final stack tip (40c75cc), Node 24.19.0 lint, tests and build passed; Rust 1.97.1 format check, Clippy and tests passed. An independent review of the updated PR heads found no actionable findings. CI is rerunning on each new head.

OwenMcGirr and others added 2 commits September 25, 2026 12:49
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) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@enaboapps
enaboapps marked this pull request as ready for review September 25, 2026 11:49
@enaboapps
enaboapps marked this pull request as draft September 25, 2026 11:50
Base automatically changed from 886-forms to main September 25, 2026 14:44
@enaboapps
enaboapps marked this pull request as ready for review September 25, 2026 14:44
@enaboapps
enaboapps merged commit 5c2ea3a into main Sep 25, 2026
6 checks passed
@enaboapps
enaboapps deleted the 887-switches-page branch September 25, 2026 15:05
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.

Reorganise the Switches page around the switch list

2 participants