Skip to content

Fix settings window is minimized when re-opened.#4341

Merged
VictoriousRaptor merged 2 commits into
devfrom
fix-settings-window-issue
Mar 10, 2026
Merged

Fix settings window is minimized when re-opened.#4341
VictoriousRaptor merged 2 commits into
devfrom
fix-settings-window-issue

Conversation

@VictoriousRaptor
Copy link
Copy Markdown
Contributor

@VictoriousRaptor VictoriousRaptor commented Mar 10, 2026

Currently if settings window is closed when minimized, it stays minimized the next time you open it. It's a bad UX design.


Summary by cubic

Prevents the Settings window from reopening minimized. We stop saving the minimized state and normalize it to Normal on reopen for better UX.

  • Summary of changes
    • Changed: Window_StateChanged no longer saves WindowState.Minimized to _settings.SettingWindowState.
    • Added: UpdatePositionAndState converts a saved Minimized state to Normal when reopening.
    • Removed: Behavior where the Settings window could persist and restore a minimized state.
    • Memory: No impact. Only conditional logic changes; no new allocations.
    • Security: No risks. UI state logic only.
    • Tests: No unit tests added. Verified manually by reopening after minimize/close.

Written for commit 121084f. Summary will update on new commits.

@prlabeler prlabeler Bot added the bug Something isn't working label Mar 10, 2026
@github-actions github-actions Bot added this to the 2.2.0 milestone Mar 10, 2026
@gitstream-cm
Copy link
Copy Markdown

gitstream-cm Bot commented Mar 10, 2026

🥷 Code experts: Jack251970

Jack251970 has most 👩‍💻 activity in the files.
Jack251970 has most 🧠 knowledge in the files.

See details

Flow.Launcher/SettingWindow.xaml.cs

Activity based on git-commit:

Jack251970
MAR
FEB
JAN
DEC
NOV
OCT 1 additions & 8 deletions

Knowledge based on git-blame:
Jack251970: 100%

✨ Comment /gs review for LinearB AI review. Learn how to automate it here.

@gitstream-cm
Copy link
Copy Markdown

gitstream-cm Bot commented Mar 10, 2026

Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 10, 2026

📝 Walkthrough

Walkthrough

Modifies window state persistence in SettingWindow.xaml.cs to prevent saving and restoring minimized window states. The window state is now only persisted when loaded and not minimized, with minimized states converted to normal when applying saved settings.

Changes

Cohort / File(s) Summary
Window State Persistence
Flow.Launcher/SettingWindow.xaml.cs
Modified Window_StateChanged event handler to add a condition checking if the window is loaded before persisting state, and prevent persistence when minimized. Updated UpdatePositionAndState method to convert Minimized state to Normal when restoring saved window state.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Flow.Launcher/Flow.Launcher#3204 — Related window-state handling modification that also treats Minimized as Normal to avoid persisting and displaying minimized states on startup.

Suggested reviewers

  • jjw24
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main bug being fixed: preventing the settings window from reopening in a minimized state.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly explains the UX issue being fixed: preventing the Settings window from reopening minimized. It provides specific details about the changes made and their rationale.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-settings-window-issue

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 and usage tips.

@VictoriousRaptor VictoriousRaptor added the kind/ux related to user experience label Mar 10, 2026
@Jack251970
Copy link
Copy Markdown
Member

LGTM👍

@VictoriousRaptor
Copy link
Copy Markdown
Contributor Author

Trying to let Mr.Copilot to fix another related issue. Let's see.

@VictoriousRaptor VictoriousRaptor merged commit 8d042d2 into dev Mar 10, 2026
19 checks passed
@VictoriousRaptor VictoriousRaptor deleted the fix-settings-window-issue branch March 10, 2026 14:50
@jjw24 jjw24 modified the milestones: 2.2.0, 2.1.2 May 9, 2026
jjw24 pushed a commit that referenced this pull request May 9, 2026
* Fix settings window is minimized when re-opened

* Don't save minimized state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working kind/ux related to user experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants