Skip to content

fix(desktop): restore minimized apps from desktop icons - #181

Merged
dailker merged 1 commit into
codehubbers:mainfrom
SamoTech:fix/restore-minimized-app
Dec 4, 2026
Merged

dailker merged 1 commit into
codehubbers:mainfrom
SamoTech:fix/restore-minimized-app

Conversation

@SamoTech

@SamoTech SamoTech commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Closes #173

Double-clicking a minimized app's desktop icon restores and focuses the existing window. Closed apps still launch on double-click.

Verification

The regression test fails before the fix and passes after it. All 419 tests and the production build passed locally.

Screenshots

Before

Calculator stays minimized

After

Calculator is restored

@Ziqian-Huang0607 Ziqian-Huang0607 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Verified the fix and the reasoning.

The change is minimal and correct: OPEN_APP's existing-app branch already sets activeApp and raises the zIndex, so the extra SET_ACTIVE_APP dispatch in AppIcon was redundant, and adding isMinimized: false there restores the window instead of launching a duplicate. The taskbar path uses RESTORE_APP, which is untouched.

I ran the new test locally against current main and it passes. I also confirmed it fails without the AppContext change (the icon double-click left the window minimized), so the regression test is real.

One pre-existing inconsistency I noticed while reading the reducer, not caused by this PR and not blocking: SET_ACTIVE_APP sets minimized: false (wrong key, should be isMinimized). Nothing seems to dispatch SET_ACTIVE_APP for a minimized window today, but it is a trap for the next person. Worth a one-line follow-up issue.

Approve.

@dailker dailker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice, clean fix. Clearing isMinimized in OPEN_APP also fixes the launcher, and dropping the extra SET_ACTIVE_APP is safe since OPEN_APP already sets the active app. Thanks for the test and screenshots.

@dailker
dailker merged commit ce3e230 into codehubbers:main Dec 4, 2026
5 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.

Clicking the on an app icon which is minimized is not responsive.

3 participants