Skip to content

feat: hide the desktop icons during the session - #214

Merged
lippdev merged 5 commits into
mainfrom
feat/hide-desktop-icons
Nov 17, 2026
Merged

lippdev merged 5 commits into
mainfrom
feat/hide-desktop-icons

Conversation

@lippdev

@lippdev lippdev commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Closes #210.

What

PLEXX-DE asked (issue #210) for the desktop icons to be hidden during the session, for a clean console look.

  • System → Hide desktop icons during the session, off by default, next to Put desktop icons back in place.
  • DesktopIcons.SetHidden uses the same documented route as the icon positions (IShellWindows → the desktop's view), through IFolderView2 and FWF_NOICONS: the same switch as right click → View → Show desktop icons. It reports whether it changed anything, so the session only shows again what it hid (icons the user had hidden stay hidden).
  • The session journal records that the icons were hidden (desktopIconsHidden): if the app or the PC goes down mid-session, the next start's recovery shows them again.
  • Strings in the six catalogs, a sentence in the six guides, changelogs, docs/TESTING.md; tests for the default (off) and the journal round trip.

Verified on the owner's PC (no TV: only a virtual display on, nothing hidden or changed)

  • The Explorer part alone (a small harness compiling DesktopIcons.cs): hide → True, hide again → False, show → True, show again → False, with the desktop list view's visibility matching each step.
  • A real session from the debug build (game screen = the one display on, a cmd /c timeout as the custom app): icons visible before, hidden during, visible after Back to the PC.
  • The crash path: the app killed mid-session left them hidden; opening it again recovered the session, logged "Ícones da área de trabalho: visíveis de novo", showed them and deleted the journal.
  • dotnet test: 678 passing. On the TV (icons never showing behind the launcher): pending, owner's checklist.

🤖 Generated with Claude Code

lippdev and others added 2 commits November 16, 2026 10:11
Asked for 2560x1440@60, the owner's LG TV (through NVIDIA) ends up at
@59, the 59.94 Hz "60" of TVs that it lists next to @60. The check wanted
exactly 60, so every session re-applied the mode twice (the TV going
blank each time) and logged "Não foi possível aplicar"; a per-game
profile saved at @60 re-applied it too. DisplayModeMatch.IsSame allows
1 Hz either way; the log now says which mode the screen is in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
System gets "Hide desktop icons during the session" (off by default).
DesktopIcons.SetHidden flips FWF_NOICONS on the desktop's IFolderView2, the
same switch as View -> Show desktop icons, and says whether it changed
anything, so only icons that were showing come back. The session journal
records it, so an interrupted session shows them again on recovery.

Closes #210.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

Two failure paths can leave desktop icons hidden without a durable restore record.

Reviewed changes This review covers the new desktop-icon visibility toggle and its session/recovery integration.

  • Visibility control: Adds an opt-in System setting and changes icon visibility through the desktop shell’s IFolderView2 interface.
  • Session restore: Tracks whether the session hid icons and attempts to show them during normal and interrupted-session recovery.
  • Supporting coverage: Adds the six catalog strings, guide/changelog updates, manual checks, and configuration/journal tests.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6-luna | 𝕏

The icons were hidden before the session journal was written: a crash in
between, a journal that failed to write, or an Explorer call that timed
out and hid them later could leave them hidden with nothing to show them
again. Start now reads whether they show (changing nothing), records the
intent in the journal, and hides them only after it is written; the
restore shows them whenever the journal says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes Reviewed the latest commit's write-ahead handling for desktop-icon visibility and its interaction with the earlier session/recovery logic.

  • Recorded the planned restore before hiding — Added a read-only visibility check, persisted the intended restore state in the session journal, and only then invoked the hide operation. This also keeps timed-out hide workers recoverable.

Pullfrog  | View workflow run | Using gpt-6-luna | 𝕏

# Conflicts:
#	CHANGELOG.en-US.md
#	CHANGELOG.md
#	docs/TESTING.md
# Conflicts:
#	CHANGELOG.en-US.md
#	CHANGELOG.md
#	docs/TESTING.md

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

The refresh-rate tolerance can leave the display in a genuinely different mode than the one explicitly selected.

Reviewed changes Reviewed the changes since the prior Pullfrog review, including the merged TV/session updates and the new display refresh-rate matching behavior.

  • Merged TV updates — Integrated the TV-control and return-command changes from the updated base history.
  • Accepted near refresh rates — Added a shared ±1 Hz comparison used when applying session and per-game display modes, and expanded mode-result logging.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6-luna | 𝕏

{
if (wantedWidth > 0 && width != wantedWidth) return false;
if (wantedHeight > 0 && height != wantedHeight) return false;
return wantedHz <= 0 || Math.Abs(hz - wantedHz) <= 1;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This treats every pair of rates one hertz apart as equivalent, so a saved 60 Hz mode is skipped when the current mode reports 59 Hz even if those are distinct selectable modes. That can leave session startup or a per-game profile at a refresh rate the user did not select.

Technical details
# Preserve distinct requested refresh rates

## Affected sites
- `src/ConsoleMode/Services/DisplayModeMatch.cs:16` — accepts all rates within 1 Hz without distinguishing nominal aliases from distinct modes.
- `src/ConsoleMode/Services/ConsoleEngine.GameProfiles.cs:89` — skips applying the saved mode when the current rate is adjacent.
- `src/ConsoleMode/Services/MonitorService.cs:425` — treats an adjacent rate as a successful application and stops retrying.

## Required outcome
- Treat only genuinely equivalent nominal refresh-rate values as the same mode; preserve application of a separately selectable requested rate.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Right for a rate picked on purpose: a screen at @60 counted as in a @59 mode chosen from the list. Fixed in #215: only the rate asked for or the video rate just under it (60→59, 24→23…) counts now, so @60 → @59 (the NVIDIA case #212 fixed) still doesn't re-apply, and @59 with the screen at @60 does.

@lippdev
lippdev merged commit c577b5d into main Nov 17, 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.

Hide Desktop Icons when starting gaming mode

1 participant