Skip to content

fix(ui): round the focus ring on the Settings section headings (#955) - #1022

Merged
Shieldxx merged 1 commit into
mainfrom
fix/955-section-focus-ring
Oct 6, 2026
Merged

Shieldxx merged 1 commit into
mainfrom
fix/955-section-focus-ring

Conversation

@Shieldxx

@Shieldxx Shieldxx commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #955

What does this PR do?

Tabbing to a Settings section heading (ABOUT, CONFIG, ...) drew a square focus ring, while every other focus ring in the app is rounded.

The headings take their ring from the shared button:focus-visible fallback in App.css, and an outline follows the element's own border-radius. These buttons had none. The fallback rule cannot carry a radius, because the same rule also serves round controls, so the fix is rounded-md on the button in SettingsSection.tsx, the radius of the small text button in the Utility Apps section. The heading has no background or border, so nothing changes visually except the ring.

The issue asked to check the fallback's other named consumers too (the wordmark, the profile-menu trigger, the accent swatches). Rather than read them one by one, I measured every visible focusable control on a packaged build of main: the games list, an open profile editor, an open profile menu, and all six Settings sections expanded. Only the six section headings had a zero radius on all corners; the other consumers already carry their own. On this branch the same sweep finds none.

Part 2 of the issue (some controls seem to animate their focus, others snap) is not in this PR. The issue itself says it needs a visual diff and a design decision before any code, so it should move to its own issue.

What the tests prove

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Docs / config

Smoke check

  • Needs no manual check. Reason: one radius class on one button, checked on a packaged build in both the normal theme and forced colors (below). The S6 keyboard traversal passes over these headings anyway, and a square ring would not move the tag.
  • Needs a manual check. What to do, and what a correct result looks like:

Checklist

  • npm run build passes (packaged with electron-builder --dir, unsigned config)
  • npm run typecheck passes
  • npm run format:check passes
  • Tested manually (packaged build, hidden desktop, see below)

Screenshots

PR #1022

Settings with CONFIG focused by Shift+Tab from the first control inside it, so the browser's own keyboard heuristic decides :focus-visible, on packaged builds on a hidden desktop:

  • main (f88592a; SettingsSection.tsx unchanged up to 5d1133e): radius 0px, square ring.
  • This branch (a4b0775): radius 6px, rounded ring. Under forced colors the ring is CanvasText as before, now rounded too.

🤖 Generated with Claude Code

The section disclosure buttons take their ring from the shared
button:focus-visible fallback in App.css. An outline follows the
element's own border-radius and these buttons had none, so they drew
the only square focus ring in the app. The fallback rule cannot carry a
radius because it also serves round controls, so rounded-md goes on the
button, matching the small text button in the Utility Apps section.

A sweep of every visible focusable control on a packaged build (games
list, open profile editor, open profile menu, all six Settings sections
expanded) found these six headings as the only square-cornered ones on
main, and none on this branch.

Closes #955

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: Stashpeak/SimLauncher/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3ce7498b-467a-4347-a5ea-2abce46a00e6
📥 Commits

Reviewing files that changed from the base of the PR and between 5d1133e and a4b0775.

📒 Files selected for processing (2)
  • src/renderer/src/components/settings/SettingsSection.tsx
  • tests/renderer/settingsSectionFocusRing.test.tsx
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@stashpeak-review-bot stashpeak-review-bot Bot 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.

🤖 Review Bot

🏷 bugfix 🕐 ~2-5 min 🐞 0 🔐 0 🧪 0 📏 0

A minimal, correct fix: adds rounded-md to the Settings section disclosure button so the shared button:focus-visible outline follows a rounded border-radius. The class is on the button itself, with a comment explaining why. The accompanying test pins a radius class on the button and mirrors the existing #887 swatch test. No behavioral, security, or contract risks found.

Walkthrough (2 files)
File Note
src/renderer/src/components/settings/SettingsSection.tsx Adds rounded-md to the disclosure button so its focus outline is rounded; the button has no background or border, so there is no other visual change.
tests/renderer/settingsSectionFocusRing.test.tsx New renderer test asserting the disclosure button carries an all-corners radius class, so removing it would fail the test.

Total: $0.0010 (plus subscription)

Full-lane cost

Review bot usage

mode engine model tokens in tokens out cost time comments
full claude-code claude (subscription) 2 318 sub 4815 ms 0
shadow api deepseek/deepseek-v4-flash 3775 2132 $0.0003 40410 ms 0
shadow api xiaomi/mimo-v2.5 3698 896 $0.0006 23281 ms 0
shadow api poolside/laguna-xs-2.1:free 3842 2005 $0.0000 71702 ms 0
shadow api nvidia/nemotron-3-ultra-550b-a55b:free 3817 838 $0.0000 22845 ms 0

@Shieldxx
Shieldxx merged commit 9ba96e5 into main Oct 6, 2026
15 checks passed
@Shieldxx
Shieldxx deleted the fix/955-section-focus-ring branch October 6, 2026 17:00
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.

ui: section headings get a square focus ring, and focus reads as animated on some controls but not others

1 participant