Skip to content

fix(theme): regenerate once when the matugen scheme or monitor changes - #3793

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
Conava:matugen-single-regen
Oct 15, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
Conava:matugen-single-regen

Conversation

@Conava

@Conava Conava commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes matugen running twice when the Matugen Palette or the target monitor changes.

Both settings declare the regenSystemThemes onChange hook, which set() already runs. Their setters also called Theme.generateSystemThemesFromCurrentTheme() themselves, so the second request queued behind the first and the whole theme was generated twice per change. I removed the direct calls, plus a comment in setMatugenSourceMode that pointed out this redundancy. I checked the other onChange hooks for the same pattern and found none.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

None.

Screenshots / video

Checklist

Tested by hand on Hyprland: switching the palette now logs one "Setting desired theme" per change instead of a second queued run, and the colors still update. No new strings, no docs needed. All pre-commit hooks passed; I didn't run make lint-qml for this one.

matugenScheme and matugenTargetMonitor declare the regenSystemThemes
onChange hook, which set() already runs. Their setters also called
Theme.generateSystemThemesFromCurrentTheme() themselves, so the second
request queued behind the first and matugen ran twice per change.
Drop the direct calls and the comment that pointed out the redundancy.
@bbedward

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Claude review

Looks good: the removed calls duplicated the regenSystemThemes onChange hook that set() already dispatches.

No issues found.
Checked: setMatugenScheme, setMatugenSourceMode and setMatugenTargetMonitor in SettingsData.qml, where Spec.set calls the regenSystemThemes hook for matugenScheme and matugenTargetMonitor in SettingsSpec.js, and Theme.generateSystemThemesFromCurrentTheme debouncing. Model: claude-opus-5-5.

@bbedward
bbedward merged commit d14f80e into duxlabs-dev:master Oct 15, 2026
2 checks passed
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