Repository navigation
fix: uniform window cards, real app icons and a clearer close confirmation in the session menu - #135
Conversation
…ation in the session menu Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
ℹ️ One architecture-specific fallback issue inline.
Reviewed changes This review covers the session-menu window-card sizing, icon loading and pixel conversion, and the redesigned close confirmation.
- Window icons Adds package-tile, executable, and window-icon resolution plus premultiplied pixel handling.
- Close confirmation Reworks the modal presentation and removes the repeated title from localized body text.
- Tests and manual checks Adds
IconPixelstests and documents Windows-only visual/controller checks.
gpt-6-luna | 𝕏
| [DllImport("user32.dll")] private static extern uint GetWindowThreadProcessId(nint hwnd, out uint processId); | ||
| [DllImport("user32.dll", EntryPoint = "SendMessageTimeoutW")] | ||
| private static extern nint SendMessageTimeout(nint hwnd, uint message, nint wParam, nint lParam, uint flags, uint timeoutMs, out nint result); | ||
| [DllImport("user32.dll", EntryPoint = "GetClassLongPtrW")] private static extern nint GetClassLongPtr(nint hwnd, int index); |
There was a problem hiding this comment.
This direct import does not cover the x86 target: Microsoft documents GetClassLongPtr as a header macro that maps to GetClassLong in 32-bit builds. If both WM_GETICON requests fail, the missing entry point aborts FromWindow, so Load catches it and the taskbar-icon fallback is skipped.
Technical details
# Keep the taskbar-icon fallback working on x86
## Affected sites
- `src/ConsoleMode/Native/WindowIcons.cs:195` — imports `GetClassLongPtrW` directly; the x86 API is `GetClassLongW`.
- `src/ConsoleMode/Native/WindowIcons.cs:97-100` — this lookup is reached after `WM_GETICON` returns no icon; the thrown entry-point exception prevents trying the next class-icon index.
## Required outcome
- Read class icons through the correct API entry point on x86 as well as x64/ARM64.
## Suggested approach
- Select the `GetClassLongW` entry point for x86 and `GetClassLongPtrW` for pointer-sized targets (or use an equivalent architecture-aware wrapper).
## Reference
- [Microsoft: GetClassLongPtrW](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getclasslongptrw) documents that 32-bit builds map the macro to `GetClassLong`.Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
ℹ️ No new issues found in this incremental change.
Reviewed changes Reviewed the beta.4 release preparation added since the prior Pullfrog review.
- Beta.4 metadata Updated the project version and recorded the session-menu fixes in the Portuguese and English changelogs.
gpt-6-luna | 𝕏

What
Session menu (Select + Y), the "Windows" grid and its close confirmation.
Buttonshrank to its text, so a short title made a smaller card. It now fills its 250×178 cell.WindowIcons: the package's tile logo for Store apps (throughshell:AppsFolder), else the exe's icon extracted at the size asked for, else the icon the window shows on the taskbar. The generic glyph in a circle is drawn only while there is no icon (it used to stay behind the icon).Pixel handling (premultiplying, mask for old icons without alpha) is in the pure
IconPixels, linked into the test project with tests.Verification
docs/TESTING.md.🤖 Generated with Claude Code