fix(web): use segmented controls for mode switches - #9781
Merged
Conversation
Contributor
ApprovabilityVerdict: 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. |
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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:
built with
gpt-5.6-solthrough the codex harness.Note
Low Risk
Mostly visual and component wiring; behavior is preserved, though any
ToggleGroupthat relied on the old implicitdefaultvariant would now look segmented.Overview
Standardizes mode switches across the web app by making segmented
ToggleGroupthe shared pattern instead of one-off button rows, ghost toggles, and custom radio styling.ToggleGroupnow defaults tovariant="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
RadioGroupsemantics but renders options withtoggleVariants({ variant: "segmented" }). The unusedproviderSettingsTabClassNamehelper is removed in favor ofTogglestyling.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
ToggleGroupsegmented controls in DiffPanel.tsx, GitActionsControl.tsx, PullRequestCodeTab.tsx, PullRequestMarkdownEditor.tsx, DiagnosticsSettings.tsx, ProviderSettingsPanel.tsx, ResourceTelemetryDiagnostics.tsx, and ThemeEditorPanel.tsxproviderSettingsTabClassNamehelper in providerSettingsTabs.tsToggleGroupin toggle-group.tsx now defaults to thesegmentedvariant and its associated size when both variant and size are omitted, changing rendering for any other consumers that relied on the previous default variantMacroscope summarized a879bfa.