Skip to content

Fix search navigation button initial states#1301

Closed
Copilot wants to merge 1 commit intodevelopfrom
copilot/sub-pr-1300
Closed

Fix search navigation button initial states#1301
Copilot wants to merge 1 commit intodevelopfrom
copilot/sub-pr-1300

Conversation

Copy link
Contributor

Copilot AI commented Mar 24, 2026

Swift 6 language mode no longer triggers didSet observers for property assignments inside defer blocks during initialization. The original defer { isEnabled = false } pattern in RoundedButtonGroup.init relied on this undocumented Swift 5 behavior to propagate disabled state to child buttons.

// Swift 5: didSet fires → buttons updated ✓
// Swift 6: didSet suppressed → buttons stay enabled ✗
defer { isEnabled = false }
  • Extract button state propagation into updateAppearance(), called from both didSet and explicitly at end of init
  • Remove defer trick, set default value to false directly
  • Call updateAppearance() explicitly after init setup completes

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix search navigation button initial states Fix search navigation button initial states Mar 24, 2026
Copilot AI requested a review from cyanzhong March 24, 2026 14:25
@cyanzhong cyanzhong closed this Mar 24, 2026
@cyanzhong cyanzhong deleted the copilot/sub-pr-1300 branch March 24, 2026 14:37
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.

2 participants