Skip to content

fix(web): use segmented controls for mode switches - #9781

Merged
maria-rcks merged 5 commits into
pingdotgg:mainfrom
maria-rcks:fix/segmented-controls
Sep 4, 2026
Merged

fix(web): use segmented controls for mode switches#9781
maria-rcks merged 5 commits into
pingdotgg:mainfrom
maria-rcks:fix/segmented-controls

Conversation

@maria-rcks

@maria-rcks maria-rcks commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

compact mode switches used several different styles across settings and panels. this makes the existing segmented control the shared default and applies it to machines, diagnostics periods, theme appearance, diff layouts, markdown write/preview, and publish protocol selection while preserving their actions and disabled states.

the toolbar prerequisite landed in #9769; this pr now contains only the segmented-control rollout. verified with 39 focused tests, web typecheck, targeted lint and formatting, plus real-app checks at 1280px and 640px in dark and light appearances.

before and after, same diagnostics view:

diagnostics resource timeline before segmented controls

diagnostics resource timeline after segmented controls

machine selector beside refresh status

diagnostics history selector

theme editor appearance selector in light mode

built with gpt-5.6-sol through the codex harness.


Note

Low Risk
Mostly visual and component wiring; behavior is preserved, though any ToggleGroup that relied on the old implicit default variant would now look segmented.

Overview
Standardizes mode switches across the web app by making segmented ToggleGroup the shared pattern instead of one-off button rows, ghost toggles, and custom radio styling.

ToggleGroup now defaults to variant="segmented" (with matching segmented sizing), so new callers get the compact pill control without extra props. Diff toolbars (stacked/split), PR markdown Write/Preview, diagnostics history windows, provider device tabs, theme Light/Dark, and publish SSH/HTTPS all use labelled segmented groups while keeping the same handlers, validation, and disabled behavior.

Publish protocol keeps RadioGroup semantics but renders options with toggleVariants({ variant: "segmented" }). The unused providerSettingsTabClassName helper is removed in favor of Toggle styling.

Reviewed by Cursor Bugbot for commit a879bfa. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Replace mode switches with segmented controls across web components

Macroscope summarized a879bfa.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 4, 2026
Comment thread apps/web/src/components/settings/ProviderSettingsPanel.tsx
@macroscopeapp

macroscopeapp Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR broadly restyles existing customer-facing mode controls and changes the default variant of the shared ToggleGroup primitive from standard to segmented. The implementation is otherwise bounded and non-sensitive, but the product-default change requires human review.

You can add or adjust custom eligibility rules. Learn more.

Comment thread apps/web/src/components/GitActionsControl.tsx Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 28c3ae7. Configure here.

Comment thread apps/web/src/components/GitActionsControl.tsx Outdated
Comment thread apps/web/src/components/GitActionsControl.tsx
@maria-rcks
maria-rcks merged commit 5a2f3eb into pingdotgg:main Sep 4, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant