Skip to content

Add the start menu mod - #7573

Open
babamohammed2022 wants to merge 4 commits into
ramensoftware:mainfrom
babamohammed2022:patch-86
Open

babamohammed2022 wants to merge 4 commits into
ramensoftware:mainfrom
babamohammed2022:patch-86

Conversation

@babamohammed2022

Copy link
Copy Markdown
Contributor

Changelog

If this pull request updates an existing mod, describe the changes inside the changelog markers:

  • Changelog item 1...
  • Changelog item 2...

Mod authorship

If this pull request introduces a new mod, please complete the section below.

This mod was created by:

    • The submitter, without AI assistance
    • The submitter, with AI assistance
    • Claude
    • ChatGPT
    • Gemini
    • Another AI (please specify):
    • Other (please specify):

Please select the options that best apply. Your selection does not affect the acceptance criteria, but it helps reviewers understand the context of the code and provide relevant feedback.

@windhawk-reviewer windhawk-reviewer Bot added the waiting-for-author The author's turn: request an AI review, or respond to one that was posted. label Nov 17, 2026
@windhawk-reviewer

Copy link
Copy Markdown

Thanks for the pull request! This repository uses a two-stage review: an AI review that you run yourself, followed by a human review.

To get started, comment /ai-review. Once you're happy with the result, comment /ready-for-reviewer to hand it over to a human reviewer.

See the pull request review process for the full details.

@babamohammed2022

Copy link
Copy Markdown
Contributor Author

/ai-review

@windhawk-reviewer windhawk-reviewer Bot added waiting-for-ai-review An AI review was requested and is being prepared. and removed waiting-for-author The author's turn: request an AI review, or respond to one that was posted. labels Nov 17, 2026
@windhawk-reviewer

Copy link
Copy Markdown

Submission review

Note: This review was done by Claude. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding.

Remember: The AI reviewer can be wrong - it may misread code, flag correct code as broken, or suggest changes that make things worse. Treat its findings as suggestions to verify, not instructions to follow blindly. You're responsible for the code you submit, so if a finding doesn't hold up, say so instead of changing working code to satisfy it.

Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them.


A few things to address before this is ready:

1. Substantial overlap with your own win10-1507-start-menu-recreation mod. This is a second custom Start window built the same way as the merged Windows 10 1507 Start Menu Recreation. The two share:

  • the left column (Most used, Recently added, All apps with folders, type-to-search);
  • the tile grid, with the same drag, resize and pin model;
  • the same WH_KEYBOARD_LL/WH_MOUSE_LL way of opening the menu;
  • the same storage values (startMenuLayout, startMenuLaunchCounts, the WHSM2# layout format and the tileLayout import setting).

About 3,900 of this file's 6,500 lines longer than 25 characters (~60%) appear verbatim in the 1507 mod. The differences:

  • the Windows 8.1 Update 3 look (purple background, Metro palette, flat tiles, Windows 8-style popups);
  • Settings and file search, ported from the Start Screen mod;
  • the app-catalog snapshot cache;
  • the helper-process architecture.

The two mods can't run together (README: "Disable the regular Start menu mod and other Start replacements"). Neither the PR nor the README says why this is a separate mod. Two ways forward:

  • Add the Update 3 look as a style option of the 1507 mod. The search and helper-process work would then benefit both.
  • Or explain in the PR why it needs to be a separate mod. Whether that's enough is the maintainer's decision.

2. Mod storage can't hold some of what the mod writes. Portable Windhawk keeps mod storage in an INI file; a regular install keeps it in the registry.

  • App snapshot. AppSnapshot::Write (1834–1847) stores the catalog cache: each app's name, path and AUMID plus a 48×48 icon (9,216 bytes). That is usually a few MB, and up to 16 MB in each of two banks.

    • It is written as Wh_SetBinaryValue chunks of 65,536 bytes (kChunk, line 1800), and rewritten after every full scan (5263), i.e. on each helper start and on refreshes.
    • In portable mode a binary value is limited to 16,383 bytes. A 64 KB chunk becomes 131,072 hex characters and reads back empty, so the snapshot never loads, while the INI file grows by megabytes.
    • In a regular install, it puts megabytes of icon data into the registry.
    • Chunks past the new chunk count are never deleted.

    Fix: write the snapshot to a file under Wh_GetModStoragePath. The two-bank scheme becomes a temporary file plus a rename.

  • Launch counts. startMenuLaunchCounts (2087–2101) is a list joined with \n.

    • In portable mode on 1.7.3, the line breaks are stored as spaces, so LoadLaunchCounts reads back a single garbage entry and Most used resets.
    • Newer Windhawk versions reject the write.

    Use a separator that can't appear in a path or AUMID and isn't a line break (\t works), or one value per entry with numbered names and a count, like deviceCount/Device%dId in audioswap.

  • Tile layout. startMenuLayout (4724–4729) has no size cap. Around 150 tiles with typical paths pass 32,767 characters. Past that, portable mode reads back a truncated value, ParseV2 fails, and the menu shows the default tiles and saves them over the layout. Cap the layout, or store it in a file as well.

3. Heap and stack overflow when converting search-result icons (4210–4216). For icons without alpha, the AND mask is read with a 1-bpp GetDIBits into mk.

  • mk's row stride is WORD-aligned (((w + 15) / 16) * 2), but DIB rows are DWORD-aligned (((w + 31) / 32) * 4). For any width that isn't a multiple of 32, GetDIBits writes past the end of mk, and the loop reads rows at the wrong offsets. Examples: 40 or 48 px large icons at 125%/150% scaling, 16 px small icons. For a 48 px icon the overrun is 96 bytes.
  • mi is a plain BITMAPINFO with one RGBQUAD, but a 1-bpp GetDIBits writes a two-entry color table, so it also writes 4 bytes past mi on the stack.

This runs on the icon worker for file search results, so it can corrupt memory or crash the helper. CreateGdiplusBitmapFromIcon already does this correctly at lines 562–581 (DWORD stride, and a header plus RGBQUAD[2] struct); reuse that code here.

4. An invalid tileLayout value overwrites the user's saved layout on every start. Settings::Load (1346–1353) loads either the pasted import string or the stored startMenuLayout, never both.

  • If the pasted string doesn't parse (a truncated or mistyped paste), ApplySettings (4607–4619) logs "keeping current layout".
  • But at that point the current layout is the default one, and PersistTileLayout() writes it over startMenuLayout.
  • tileLayoutImported isn't updated, so this repeats on every helper start until the setting is cleared. The user's own tiles are lost.

Fall back to the stored layout when the import fails:

bool ok = layout_.Deserialize(settings_.tileLayout, catalog_);
if (!ok && settings_.tileLayoutImportPending && !layoutApplied_)
    ok = layout_.Deserialize(ReadStorageString(L"startMenuLayout"), catalog_);

5. README: development notes, the helper process isn't explained, no screenshot.

  • Untested paths. "The hybrid startup, elevation, Explorer restart and shutdown require testing on real Windows; the bridge is not crash-isolated from Explorer." (lines 36–37) reads like a development note and suggests these paths weren't tested. Please test them and confirm in the PR:

    • startup;
    • Explorer restart;
    • an elevated window in the foreground;
    • disabling, re-enabling and updating the mod;
    • sign-out and shutdown.

    Then replace the paragraph with what users need to know.

  • The helper process. Users need to know that:

    • the menu runs in a second explorer.exe process, which shows as a second "Windows Explorer" in Task Manager and is relaunched by the shell Explorer if it exits;
    • on Windhawk 1.7.3, every other enabled explorer.exe mod that isn't a tool mod also loads into that process.

    Also say why the host is explorer.exe rather than the usual windhawk.exe tool host (presumably because windhawk.exe is 32-bit). See desktop-icon-dock and net-speed-taskbar for examples.

  • Conflicting mods. "Disable the regular Start menu mod" should name the mods it conflicts with (e.g. Windows 10 1507 Start Menu Recreation).

  • Screenshot. There's no screenshot, and for a full Start menu replacement a screenshot or GIF in the README matters. Host it on i.imgur.com or raw.githubusercontent.com, as the 1507 mod does.

Optional improvements

Minor polish — none of this affects users, so it's your call.

  • The bridge runs in every explorer.exe process (9918–9925, 9748–9768). This includes processes that never become the shell, such as separate folder-window processes (/factory,{...} -Embedding). In those, Wh_ModInit still loads twinui.pcshell.dll and installs the symbol hook, and the launcher thread stays in WaitForMainExplorerReady forever, waking every 100 ms. Wait on an event instead of the Sleep(100) ×10 loop, and skip the bridge in processes started with /factory.
  • A settings change made while a popup menu is open is lost (3529–3533). StartScreenPopup::Track runs its own message loop, which passes the window-less WM_APP_SETTINGS_CHANGED thread message to DispatchMessageW, which discards it. g_settingsChangedPending is only rechecked at startup (9641). Handle that message in the popup loop too, or post it to the menu window instead of the thread.
  • privacyMode data race. ProfilePhotoWorker reads g_settings.privacyMode (9165) while g_settings.Load() (9677) rewrites it, before the old worker is joined (9679). Pass the flag to the worker by value.
  • TrackImmersiveMenu (8616–8618). GetModuleHandleExW(FROM_ADDRESS | UNCHANGED_REFCOUNT) returns the same value as GetModInstance().
  • Code that looks left over. Please check whether these are intentional:
    • g_swallowPickUp, g_swallowPickRightUp and g_swallowPickTick are set but never read, so the 800 ms "safety net" described near line 3317 doesn't exist;
    • g_settingsBuilt is never set to true;
    • RenderFlyoutAvatar (8740) is never called;
    • TrackImmersiveMenu's compact and style parameters are ignored.
  • Settings descriptions. They carry implementation details: TileUpdateManager.CreateTileUpdaterForApplication, "#0A5BC4, from the reference palette", and the 267 + 266 px arithmetic. Users only need to know what each option does.
  • Translations:
    • Persian "Sleep" (3612) is "استنبات" ("germination"); Windows uses "خواب".
    • GetUiLanguageIndex maps all Chinese (primary ID 0x04) to the Simplified strings, so Traditional Chinese users get Simplified text.
    • TranslateTileCaption (3628–3636) matches the Italian default captions on any tile, so a user's tile literally named "Foto" or "Meteo" gets renamed.
  • @architecture x86-64 with "Windows 10" in the README. This drops 32-bit Windows 10. If that's intended, say "64-bit only" in the README.

Functionality notes

Non-critical observations and ideas about the feature behavior itself.

  • Pin to Start can overlap tiles. PinAppInGroup's cellFree (5163–5171) uses an old size model (Medium 1×1, Wide 2×1, Large 2×2) and checks one cell, but the new tile is Medium, which is 2×2 everywhere else (GetTileFootprint, 4751–4755). It also allows column 3, so the tile can stick out of the group. Use FindTilePlacement(..., TileSize::Medium, ...) as the resize path does.
  • Popup stays open after a keyboard app switch. MenuDeactivated (3224–3228) ignores deactivation when to == NULL, which is what you get when activation moves to another thread (Alt+Tab). The topmost popup and the menu then stay over the other app until the next click.
  • Enter launches unavailable tiles. The keyboard path (6268–6276) launches a tile without checking tile.available; the mouse path does (5852).
  • A failed first catalog scan is never retried. If the first worker returns no catalog (5289), catalogReady_ stays false, and RefreshCatalog/ApplySettings refuse to run from then on (4600, 4715). The menu stays empty until the helper restarts.
  • Some saved window sizes are rejected. Resizing allows widths down to 420 px (5530–5531), but loading rejects saved widths under 540 (4448), so those sizes are lost on the next start.
  • Shutdown bypasses Fast Startup. ExitWindowsEx(EWX_SHUTDOWN) (2990–2992) has no EWX_HYBRID_SHUTDOWN, unlike the native menu when Fast Startup is on.
  • New files never appear in search. The search index is built once, on the first query of the helper's lifetime (4336), so files created later don't appear until the helper restarts.
  • UI-thread stalls. IsUsableTileFileTarget (2337–2367) runs IShellLink::Resolve (up to 400 ms) and GetFileAttributesW (no timeout on offline UNC targets) on the UI thread, for every tile on each catalog publish and on drops.
  • Repaint cost. SelectClipRgn(hdc, nullptr) at line 7583 drops the paint clip that Render set. Every partial invalidation, including the 530 ms search caret blink, therefore repaints the whole tile grid through DrawTextG, which creates a GDI+ Graphics/Font/StringFormat per string.
  • Possible simplification of the Win key handling. The bridge already hooks XamlLauncher::ShowStartView (method 1 = keyboard). Relaying every keyboard Start through it, not only when the foreground window is elevated or the helper's own, could replace the system-wide WH_KEYBOARD_LL hook and the VK 0xE8 injection. taskbar-auto-hide-keyboard-only uses this hook to block the keyboard Start.

Code overview

For the maintainer: a map of the mod and what it touches outside its own process. Descriptive only — anything that needs a change is listed above. Line numbers refer to the mod source at commit 0bfb9e1. This mod is new, so everything below is new.

The mod runs in two roles. In the shell explorer.exe it is a small "bridge" that launches and supervises a helper explorer.exe -tool-mod <id> -hybrid-parent <pid> and hooks ShowStartView. In the helper (whose entry point is hooked, as in the tool-mod snippet) it runs the menu UI, the input hooks and the workers.

Code regions

  • Line 1–20: metadata (explorer.exe, x86-64).
  • Line 22–105: README.
  • Line 106–285: settings (accent, background, tile colors/shading, Calendar flip, width override, profile picture path, privacy mode, one-time layout import).
  • Line 286–320: design overview comment.
  • Line 322–775: includes, the GDI+ text helper, message and command IDs, RAII handle wrappers, icon → GDI+ bitmap conversion, icon color sampling and icon drawing.
  • Line 776–1276: profile-photo globals, the embedded default avatar PNG (791–1196), GDI/COM scope helpers.
  • Line 1278–1360: ReadStorageString and Settings::Load.
  • Line 1362–1720: DPI metrics, colors, the Metro tile palette, the app/tile data model.
  • Line 1722–1899: shortcut/PIDL icon extraction; AppSnapshot, a chunked binary catalog cache (with 48×48 icons) in mod storage.
  • Line 1901–2374: AppCatalog: scans the Programs folders and AppsFolder; snapshot load/save; launch counts in mod storage; letter sections.
  • Line 2376–2723: TileLayout: default tiles, WHSM2#/legacy parsing, serialization.
  • Line 2725–3006: Start-button anchoring (Win32 child, UI Automation, geometric fallback), menu placement, the Start-rect cache for the hook thread, launch helpers, power actions.
  • Line 3008–3546: StartScreenPopup, an owner-drawn popup menu with its own modal message loop.
  • Line 3549–3637: UI string table (11 languages) and tile caption translation.
  • Line 3640–4362: StartScreenSearch. On the first query, a worker indexes Settings (AllSystemSettings XML, Control Panel, Admin Tools, God Mode) and files in the user folders. Also the icon worker and Settings launching.
  • Line 4364–8899: StartMenuWindow:
    • 4368–4480: window creation and teardown;
    • 4485–4729: show/hide, applying settings, persistence;
    • 4731–5230: tile placement, drag and pin;
    • 5232–5414: catalog worker;
    • 5415–6650: window procedure and input;
    • 6650–8432: rendering;
    • 8434–8897: hit-testing, launching, and the tile, app, account and power menus.
  • Line 8913–9228: hook/hybrid globals; the profile photo and display-name worker.
  • Line 9240–9319: toggle debounce. Bridge: hook on XamlLauncher::ShowStartView in twinui.pcshell.dll, which relays keyboard Start to the helper when the foreground window is elevated or the helper's own.
  • Line 9321–9474: Start-rect refresh, and the hook procedures:
    • WH_KEYBOARD_LL: an isolated Win tap → VK 0xE8 injection + toggle;
    • WH_MOUSE_LL: swallows Start-button clicks; light dismiss;
    • WH_GETMESSAGE: drops SC_TASKLIST.
  • Line 9476–9625: the hook thread, shell-thread message hooks, the Programs folder watcher.
  • Line 9626–9768: helper UI thread (GDI+, menu, hooks, message loop, teardown); the wait for the shell to be ready.
  • Line 9770–9891: hybrid runtime: helper start/stop, supervisor, entry-point hook, and the launcher loop in the shell Explorer that starts and restarts the helper.
  • Line 9892–9967: Windhawk callbacks for both roles.

Side effects of interest

  • External file read
    • Line 1906–1922, 2171–2215: recursive scan of FOLDERID_Programs and FOLDERID_CommonPrograms (.lnk load/resolve, icon extraction) and AppsFolder enumeration. Runs on the catalog worker at helper start and on each refresh. Read-only.
    • Line 9572–9609: change notifications on the same two Programs folders (watcher thread).
    • Line 3672–3716: on the first search query, a recursive listing of Desktop, Documents, Downloads, Pictures, Music and Videos (≤8 levels, ≤80,000 entries, skipping hidden/system entries and reparse points). Names are kept in memory only.
    • Line 3739–3761, 3881–3905: reads %WINDIR%\ImmersiveControlPanel\Settings\AllSystemSettings_*.xml (search worker).
    • Line 8958–9124, 9161–9200: profile picture: the configured profilePicturePath, the files named by the registry values below, %APPDATA%\Microsoft\Windows\AccountPictures, and FOLDERID_AccountPictures (≤32 MB each; profile worker at start and on settings change).
  • Registry read
    • Line 8978–9040: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AccountPicture\Users\<SID>, values Image1080…Image48 (profile worker). There are no registry writes outside Windhawk storage.
  • IPC
    • Line 8944, 9816, 9906–9908: the named event Local\Win81Update3StartMenuTool.Stop.v1 and the mutex windhawk-tool-mod_win81-rt-update3-start-menu coordinate the shell Explorer and the helper.
    • Line 9277–9291, 9871–9873: the shell Explorer finds the helper's window by class (Win81_Update3_StartMenu_WndClass), reads its Win81Update3StartMenuTool.Ready.v1 property, and posts WM_APP+108 to it.
    • Line 2757–2869: the helper reads the taskbar Start button through UI Automation, cross-process into Explorer. Runs on menu open, on display changes, and at most every 600 ms while the pointer is over a taskbar.
    • Line 2944–2960, 4140–4146: IApplicationActivationManager::ActivateApplication (out-of-process COM) to launch Store apps and Settings pages.
  • Other reach outside the process
    • Line 9809–9891: the shell Explorer launches a second explorer.exe -tool-mod "win81-rt-update3-start-menu" -hybrid-parent <pid> via CreateProcessInternalW (falling back to CreateProcessW) once the shell is ready, and relaunches it with a 1–30 s backoff whenever it exits.
    • Line 9307–9319: LoadLibraryExW(L"twinui.pcshell.dll", …, LOAD_LIBRARY_SEARCH_SYSTEM32) plus a symbol hook, in every non-helper explorer.exe at init.
    • Line 9262–9274: OpenProcess/OpenProcessToken on the foreground window's process to read its elevation, each time Explorer's keyboard Start path runs.
    • Line 9478–9517, 9401–9409: global WH_KEYBOARD_LL/WH_MOUSE_LL hooks in the helper; SendInput injects VK 0xE8 on each isolated Win tap.
    • Line 9519–9543: WH_GETMESSAGE hooks on Explorer's own Progman and taskbar threads (in-process, bridge).
    • Line 2944–2976, 4108–4147, 8541–8553, 8888: user-initiated launches:
      • ShellExecuteW with open/runas for apps and files;
      • explorer.exe /select,;
      • CreateProcessW for Settings deep links taken from the system settings XML;
      • ms-settings:yourinfo.
    • Line 2978–2995, 8889–8890: user-initiated SetSuspendState, ExitWindowsEx (shutdown, restart, sign-out; SeShutdownPrivilege enabled then restored) and LockWorkStation.


Next steps:

  • /ai-review - after pushing fixes, to get a review of the updated code. You can repeat this as many times as you need, but each review is thorough and usually there's no need for more than 2-3 iterations.
  • /ready-for-reviewer - once you're satisfied with the state of the pull request, to hand it over to a human reviewer. If some findings above are left unaddressed, add a short note explaining why.

See the review process for details.

Important: Each reply that was generated by AI must be disclosed by including the following text in the reply: "Generated by AI. Model: (ai-model-name)".

@windhawk-reviewer windhawk-reviewer Bot added waiting-for-author The author's turn: request an AI review, or respond to one that was posted. and removed waiting-for-ai-review An AI review was requested and is being prepared. labels Nov 17, 2026
@babamohammed2022

Copy link
Copy Markdown
Contributor Author

Thank you for the review. Regarding the overlap with Windows 10 1507 Start Menu Recreation, I would prefer to keep this as a separate mod.

The two menus have a similar underlying structure and interaction model, so reusing substantial parts of the implementation is intentional. However, this mod recreates the Windows 8.1 Update 3 Metro appearance, which is visually distinct from the Windows 10 1507 menu. Combining both into one mod could make its purpose and settings confusing for users looking for one specific design.

This mod also has its own search, cache, and helper-process implementation. Some of those improvements could be considered for the 1507 mod separately, but they are not essential to choosing its visual style.

I understand that the amount of shared code is a maintenance concern, and I’m open to the maintainer’s decision on whether this justification is sufficient. I will address the other review points separately
Generated by AI. Model: Claude

Updated documentation and settings descriptions for clarity and consistency. Adjusted layout handling and storage mechanisms for tile layouts.
@babamohammed2022

Copy link
Copy Markdown
Contributor Author

/ai-review

@windhawk-reviewer windhawk-reviewer Bot added waiting-for-ai-review An AI review was requested and is being prepared. and removed waiting-for-author The author's turn: request an AI review, or respond to one that was posted. labels Nov 17, 2026
@windhawk-reviewer

Copy link
Copy Markdown

Submission review

Note: This review was done by Claude. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding.

Remember: The AI reviewer can be wrong - it may misread code, flag correct code as broken, or suggest changes that make things worse. Treat its findings as suggestions to verify, not instructions to follow blindly. You're responsible for the code you submit, so if a finding doesn't hold up, say so instead of changing working code to satisfy it.

Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them.


Thanks for the fixes. These all check out:

  • the snapshot and large layouts now go to per-user files under Wh_GetModStoragePath, written through a temporary file and a rename;
  • launch counts are tab-separated, and the old format is still read;
  • the import marker is now a fingerprint;
  • search icons use the shared converter;
  • a bad tileLayout paste falls back to the saved layout;
  • the README now explains the helper process and the conflicting mods, and has a screenshot.

Two things remain:

1. Substantial overlap with your own win10-1507-start-menu-recreation mod. This is still a second custom Start window built the same way as the merged Windows 10 1507 Start Menu Recreation. The two share:

  • the left column (Most used, Recently added, All apps with folders, type-to-search);
  • the tile grid, with the same drag, resize and pin model;
  • the same WH_KEYBOARD_LL/WH_MOUSE_LL way of opening the menu;
  • the same storage values and the same WHSM2# layout format.

About 60% of the file's lines longer than 25 characters appear verbatim in the 1507 mod. The differences:

  • the Windows 8.1 Update 3 look;
  • Settings and file search;
  • the catalog snapshot cache;
  • the helper-process architecture.

The two can't run together; the README now lists the 1507 mod as a conflict.

Your reason for a separate mod, from your PR comment: the Update 3 Metro look is visually distinct, and combining both designs in one mod could make its purpose and settings confusing for users who want one specific design. You also note that the search, cache and helper-process work could be brought to the 1507 mod separately, and that you leave the decision to the maintainer.

The consolidation path would be the Update 3 look as a style option of the 1507 mod. Whether a separate mod is justified is the maintainer's decision.

2. Please confirm the hybrid paths were tested. The removed README note said the startup, elevation, Explorer restart and shutdown paths still "require testing on real Windows". The note is gone, but neither the PR nor your comment says they were tested. They are the riskiest parts of the mod: the shell Explorer relaunches the helper, and the bridge runs inside Explorer. Please say in the PR which of these you checked:

  • startup at sign-in;
  • Explorer restart;
  • the Win key with an elevated window in the foreground;
  • disabling, re-enabling and updating the mod;
  • sign-out and shutdown.
Optional improvements

Minor polish — none of this affects users, so it's your call.

  • The bridge runs in every explorer.exe process (10088–10095, 9918–9938). This includes processes that never become the shell, such as separate folder-window processes (/factory,{...} -Embedding). In those, Wh_ModInit still loads twinui.pcshell.dll and installs the symbol hook, and the launcher thread stays in WaitForMainExplorerReady forever, waking every 100 ms (9935). Wait on an event instead of the Sleep(100) ×10 loop, and skip the bridge in processes started with /factory.
  • A settings change made while a popup menu is open is lost (3696–3700). StartScreenPopup::Track runs its own message loop, which passes the window-less WM_APP_SETTINGS_CHANGED thread message to DispatchMessageW, which discards it. g_settingsChangedPending is only rechecked at startup (9811). Handle that message in the popup loop too, or post it to the menu window instead of the thread.
  • privacyMode data race. ProfilePhotoWorker reads g_settings.privacyMode (9335) while g_settings.Load() (9847) rewrites it, before the old worker is joined in RestartProfilePhotoWorker (9849). Pass the flag to the worker by value.
  • TrackImmersiveMenu (8786–8788). GetModuleHandleExW(FROM_ADDRESS | UNCHANGED_REFCOUNT) returns the same value as GetModInstance().
  • Code that looks left over. Please check whether these are intentional:
    • g_swallowPickUp, g_swallowPickRightUp and g_swallowPickTick (3216–3217) are set but never read, so the "safety net" described at 3484 doesn't exist;
    • g_settingsBuilt (4237) is never set to true;
    • RenderFlyoutAvatar (8910) is never called;
    • TrackImmersiveMenu's compact and style parameters (8781) are ignored.
  • Translations:
    • Persian "Sleep" (3779) is "استنبات" ("germination"); Windows uses "خواب".
    • GetUiLanguageIndex (3730) maps all Chinese (primary ID 0x04) to the Simplified strings, so Traditional Chinese users get Simplified text.
    • TranslateTileCaption (3795–3803) matches the Italian default captions on any tile, so a user's tile literally named "Foto" or "Meteo" gets renamed.

Functionality notes

Non-critical observations and ideas about the feature behavior itself.

  • Pin to Start can overlap tiles. PinAppInGroup's cellFree (5333–5341) uses an old size model (Medium 1×1, Wide 2×1, Large 2×2) and checks one cell, but the new tile is Medium, which is 2×2 everywhere else (GetTileFootprint, 4916–4926). It also allows column 3, so the tile can stick out of the group. Use FindTilePlacement(..., TileSize::Medium, ...) as the resize path does.
  • Popup stays open after a keyboard app switch. MenuDeactivated (3391–3395) ignores deactivation when to == NULL, which is what you get when activation moves to another thread (Alt+Tab). The topmost popup and the menu then stay over the other app until the next click.
  • Enter launches unavailable tiles. The keyboard path (6438–6446) launches a tile without checking tile.available; the mouse path does (6022).
  • A failed first catalog scan is never retried. If the first worker returns no catalog (5459), catalogReady_ stays false, and RefreshCatalog/ApplySettings refuse to run from then on (4881, 4755). The menu stays empty until the helper restarts.
  • Some saved window sizes are rejected. Resizing allows widths down to 420 px (5700–5701), but loading rejects saved widths under 540 (4603), so those sizes are lost on the next start.
  • Shutdown bypasses Fast Startup. ExitWindowsEx(EWX_SHUTDOWN) (3158–3159) has no EWX_HYBRID_SHUTDOWN, unlike the native menu when Fast Startup is on.
  • New files never appear in search. The search index is built once, on the first query of the helper's lifetime (4491), so files created later don't appear until the helper restarts.
  • UI-thread stalls. IsUsableTileFileTarget (2504–2534) runs IShellLink::Resolve (up to 400 ms) and GetFileAttributesW (no timeout on offline UNC targets) on the UI thread, for every tile on each catalog publish and on drops.
  • Repaint cost. SelectClipRgn(hdc, nullptr) at line 7753 drops the paint clip that Render set. Every partial invalidation, including the 530 ms search caret blink, therefore repaints the whole tile grid through DrawTextG, which creates a GDI+ Graphics/Font/StringFormat per string.
  • Possible simplification of the Win key handling. The bridge already hooks XamlLauncher::ShowStartView (method 1 = keyboard). Relaying every keyboard Start through it, not only when the foreground window is elevated or the helper's own, could replace the system-wide WH_KEYBOARD_LL hook and the VK 0xE8 injection. taskbar-auto-hide-keyboard-only uses this hook to block the keyboard Start.

Code overview

For the maintainer: a map of the mod and what it touches outside its own process. Descriptive only — anything that needs a change is listed above. Line numbers refer to the mod source at commit 74ecfb7. This mod is new, so everything below is new.

The mod runs in two roles. In the shell explorer.exe it is a small "bridge" that launches and supervises a helper explorer.exe -tool-mod <id> -hybrid-parent <pid> and hooks ShowStartView. In the helper (whose entry point is hooked, as in the tool-mod snippet) it runs the menu UI, the input hooks and the workers.

Code regions

  • Line 1–20: metadata (explorer.exe, x86-64).
  • Line 22–113: README.
  • Line 114–293: settings (accent, background, tile colors/shading, Calendar flip, width override, profile picture path, privacy mode, one-time layout import).
  • Line 294–328: design overview comment.
  • Line 330–783: includes, the GDI+ text helper, message and command IDs, RAII handle wrappers, icon → GDI+ bitmap conversion, icon color sampling and icon drawing.
  • Line 785–1284: profile-photo globals, the embedded default avatar PNG (799–1204), GDI/COM scope helpers.
  • Line 1286–1402: ModStorageFiles: per-user (SID-named) files under Wh_GetModStoragePath, with atomic write via a temporary file and a rename.
  • Line 1404–1537: ReadStorageString; tile-layout storage (a string value up to 30K chars, otherwise a file plus a marker value); the import fingerprint; Settings::Load.
  • Line 1539–1897: DPI metrics, colors, the Metro tile palette, the app/tile data model.
  • Line 1899–2065: shortcut/PIDL icon extraction; AppSnapshot, the catalog cache (with 48×48 icons) stored as a file in mod storage.
  • Line 2067–2541: AppCatalog: scans the Programs folders and AppsFolder; snapshot load/save; tab-separated launch counts in mod storage; letter sections.
  • Line 2543–2890: TileLayout: default tiles, WHSM2#/legacy parsing, serialization.
  • Line 2892–3173: Start-button anchoring (Win32 child, UI Automation, geometric fallback), menu placement, the Start-rect cache for the hook thread, launch helpers, power actions.
  • Line 3175–3713: StartScreenPopup, an owner-drawn popup menu with its own modal message loop.
  • Line 3716–3804: UI string table (11 languages) and tile caption translation.
  • Line 3807–4517: StartScreenSearch. On the first query, a worker indexes Settings (AllSystemSettings XML, Control Panel, Admin Tools, God Mode) and files in the user folders. Also the icon worker and Settings launching.
  • Line 4519–9069: StartMenuWindow:
    • 4523–4635: window creation and teardown;
    • 4640–4895: show/hide, applying settings (with the import fallback), persistence;
    • 4897–5400: tile placement, drag and pin;
    • 5402–5584: catalog worker;
    • 5585–6820: window procedure and input;
    • 6820–8602: rendering;
    • 8604–9067: hit-testing, launching, and the tile, app, account and power menus.
  • Line 9083–9398: hook/hybrid globals; the profile photo and display-name worker.
  • Line 9410–9489: toggle debounce. Bridge: hook on XamlLauncher::ShowStartView in twinui.pcshell.dll, which relays keyboard Start to the helper when the foreground window is elevated or the helper's own.
  • Line 9491–9644: Start-rect refresh, and the hook procedures:
    • WH_KEYBOARD_LL: an isolated Win tap → VK 0xE8 injection + toggle;
    • WH_MOUSE_LL: swallows Start-button clicks; light dismiss;
    • WH_GETMESSAGE: drops SC_TASKLIST.
  • Line 9646–9795: the hook thread, shell-thread message hooks, the Programs folder watcher.
  • Line 9796–9938: helper UI thread (GDI+, menu, hooks, message loop, teardown); the wait for the shell to be ready.
  • Line 9940–10061: hybrid runtime: helper start/stop, supervisor, entry-point hook, and the launcher loop in the shell Explorer that starts and restarts the helper.
  • Line 10062–10137: Windhawk callbacks for both roles.

Side effects of interest

  • External file read
    • Line 2072–2088, 2338–2382: recursive scan of FOLDERID_Programs and FOLDERID_CommonPrograms (.lnk load/resolve, icon extraction) and AppsFolder enumeration. Runs on the catalog worker at helper start and on each refresh. Read-only.
    • Line 9742–9779: change notifications on the same two Programs folders (watcher thread).
    • Line 3839–3883: on the first search query, a recursive listing of Desktop, Documents, Downloads, Pictures, Music and Videos (≤8 levels, ≤80,000 entries, skipping hidden/system entries and reparse points). Names are kept in memory only.
    • Line 3906–3928, 4048–4072: reads %WINDIR%\ImmersiveControlPanel\Settings\AllSystemSettings_*.xml (search worker).
    • Line 9128–9294, 9331–9370: profile picture: the configured profilePicturePath, the files named by the registry values below, %APPDATA%\Microsoft\Windows\AccountPictures, and FOLDERID_AccountPictures (≤32 MB each; profile worker at start and on settings change).
  • Registry read
    • Line 9148–9210: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AccountPicture\Users\<SID>, values Image1080…Image48 (profile worker). There are no registry writes outside Windhawk storage.
  • IPC
    • Line 9114, 9986, 10076–10078: the named event Local\Win81Update3StartMenuTool.Stop.v1 and the mutex windhawk-tool-mod_win81-rt-update3-start-menu coordinate the shell Explorer and the helper.
    • Line 9447–9461, 10041–10043: the shell Explorer finds the helper's window by class (Win81_Update3_StartMenu_WndClass), reads its Win81Update3StartMenuTool.Ready.v1 property, and posts WM_APP+108 to it.
    • Line 2924–3036: the helper reads the taskbar Start button through UI Automation, cross-process into Explorer. Runs on menu open, on display changes, and at most every 600 ms while the pointer is over a taskbar.
    • Line 3111–3127, 4307–4313: IApplicationActivationManager::ActivateApplication (out-of-process COM) to launch Store apps and Settings pages.
  • Other reach outside the process
    • Line 9979–10061: the shell Explorer launches a second explorer.exe -tool-mod "win81-rt-update3-start-menu" -hybrid-parent <pid> via CreateProcessInternalW (falling back to CreateProcessW) once the shell is ready, and relaunches it with a 1–30 s backoff whenever it exits.
    • Line 9477–9489: LoadLibraryExW(L"twinui.pcshell.dll", …, LOAD_LIBRARY_SEARCH_SYSTEM32) plus a symbol hook, in every non-helper explorer.exe at init.
    • Line 9432–9444: OpenProcess/OpenProcessToken on the foreground window's process to read its elevation, each time Explorer's keyboard Start path runs.
    • Line 9648–9687, 9571–9579: global WH_KEYBOARD_LL/WH_MOUSE_LL hooks in the helper; SendInput injects VK 0xE8 on each isolated Win tap.
    • Line 9689–9713: WH_GETMESSAGE hooks on Explorer's own Progman and taskbar threads (in-process, bridge).
    • Line 3111–3143, 4275–4314, 8711–8723, 9058: user-initiated launches:
      • ShellExecuteW with open/runas for apps and files;
      • explorer.exe /select,;
      • CreateProcessW for Settings deep links taken from the system settings XML;
      • ms-settings:yourinfo.
    • Line 3145–3162, 9059–9060: user-initiated SetSuspendState, ExitWindowsEx (shutdown, restart, sign-out; SeShutdownPrivilege enabled then restored) and LockWorkStation.


Next steps:

  • /ai-review - after pushing fixes, to get a review of the updated code. You can repeat this as many times as you need, but each review is thorough and usually there's no need for more than 2-3 iterations.
  • /ready-for-reviewer - once you're satisfied with the state of the pull request, to hand it over to a human reviewer. If some findings above are left unaddressed, add a short note explaining why.

See the review process for details.

Important: Each reply that was generated by AI must be disclosed by including the following text in the reply: "Generated by AI. Model: (ai-model-name)".

@windhawk-reviewer windhawk-reviewer Bot added waiting-for-author The author's turn: request an AI review, or respond to one that was posted. and removed waiting-for-ai-review An AI review was requested and is being prepared. labels Nov 17, 2026
@babamohammed2022

babamohammed2022 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

After an explorer.exe restart the mod's start menu appears after a few seconds (the same applies when re-enabling the mod); at startup it seems to work. I can't confirm if it works with an update, as the mod has not been approved on the catalog, so there isn't an update to receive. I have tested it with taskmgr.exe and cmd.exe as administrator, and the mod's start menu opens. For shutdown, I don't think there is anything major to test, as the computer is shut down so there isn't a mod to test. However, I have restarted the PC (and shut it down and started it normally) to check for problems, and the mod's start menu started after 5-10 seconds. On the elevated Windows case, the mod seems to function correctly with both WIN and the click on the start menu after the update. If the mod is tried on another Windows environment and problems are found, please inform me.
If there is anything else to fix, please let me know.
Simplified Logs:

[StartMenu] isolated Win tap detected
[Toggle] request from Win key posted=1
[StartMenu] WM_APP_TOGGLE received (visible=0)
[StartMenu] Show: pos=(0,364) size=676x668 anchorMethod=3 edge=3
[StartMenu] SetForegroundWindow=1, foreground is menu=1

[StartMenu] isolated Win tap detected
[Toggle] request from Win key posted=1
[StartMenu] WM_APP_TOGGLE received (visible=1)
[StartMenu] Hide

[StartMenu] isolated Win tap detected
[Toggle] request from Win key posted=1
[StartMenu] WM_APP_TOGGLE received (visible=0)
[StartMenu] Show: pos=(0,364) size=676x668 anchorMethod=3 edge=3
[StartMenu] SetForegroundWindow=1, foreground is menu=1
[StartMenu] Hide

[StartMenu] isolated Win tap detected
[Toggle] request from Win key posted=1
[StartMenu] WM_APP_TOGGLE received (visible=0)
[StartMenu] Show: pos=(0,364) size=676x668 anchorMethod=3 edge=3
[StartMenu] SetForegroundWindow=1, foreground is menu=1

[StartMenu] isolated Win tap detected
[Toggle] request from Win key posted=1
[StartMenu] WM_APP_TOGGLE received (visible=1)
[StartMenu] Hide
[Toggle] Win key ignored (debounce, 140 ms)

[Toggle] request from Explorer bridge posted=1
[StartMenu] WM_APP_TOGGLE received (visible=0)
[StartMenu] Show: pos=(0,364) size=676x668 anchorMethod=3 edge=3
[StartMenu] SetForegroundWindow=1, foreground is menu=1

[StartMenu] isolated Win tap detected
[Toggle] request from Win key posted=1
[StartMenu] WM_APP_TOGGLE received (visible=1)
[StartMenu] Hide

Regarding the overlap, there are various additional reasons for which keeping it as a separate mod is useful:

  • The visual style is heavily distinct (Windows 8.1's Metro interface vs Windows 10's Metro interface)
  • Discoverability (A user who wants to make Windows 10/11 resemble Windows 8.1 without a Start Screen is less likely to find the mod if kept inside the 1507 recreation as the context is distinct because Windows 10 1507/RTM represents a major rewrite compared to 8.1, not a minor OS change)
  • Windows 8.1 is a distinct product generation, not a skin of 1507
  • Having the mod as separate could avoid a settings surface that confuses both audiences. (A merged mod would need a top-level style switch plus settings that only apply to one style, and users would have to reason about which options affect which look. Two focused mods keep each settings page coherent and reduce the chance of users misconfiguring a design they did not intend to use)
    On code reuse vs. duplication:

I'd also like to offer a different perspective on the shared code, though I understand this is ultimately the maintainer's call.

Reusing the existing implementation seemed safer than rewriting it. The parts shared with the 1507 mod are the delicate ones — the WH_KEYBOARD_LL/WH_MOUSE_LL hooks, the tile drag/resize/pin model, and the WHSM2# layout parsing. Since that code is already merged and tested, I chose to build on it rather than start from scratch, partly because a mistake in those paths can crash Explorer. That said, I realize this is a trade-off, not an obvious win.

The similarity is mostly structural, not accidental. Both mods recreate the same interaction model because they target the same OS APIs and user expectations. The parts that differ are the ones I'd expect to differ: the visual style, search, and helper-process architecture.

I understand the maintenance concern is real. If the two copies diverge over time, a fix applied to one might not reach the other. Extracting a shared module would address that, but it would also mean designing an abstraction, testing it against both designs, and maintaining it — which felt like a lot for a single volunteer contributor. I'm open to doing that work if the maintainer thinks it's worth it, but I didn't want to block this PR on it.

So I see the duplication as a reasonable trade-off rather than a flaw, but I'm happy to defer to the maintainer on whether it's acceptable.

Generated by AI. Model: Claude

@babamohammed2022

Copy link
Copy Markdown
Contributor Author

/ai-review

@windhawk-reviewer windhawk-reviewer Bot added waiting-for-ai-review An AI review was requested and is being prepared. and removed waiting-for-author The author's turn: request an AI review, or respond to one that was posted. labels Nov 17, 2026
@windhawk-reviewer

Copy link
Copy Markdown

Submission review

Note: This review was done by Claude. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding.

Remember: The AI reviewer can be wrong - it may misread code, flag correct code as broken, or suggest changes that make things worse. Treat its findings as suggestions to verify, not instructions to follow blindly. You're responsible for the code you submit, so if a finding doesn't hold up, say so instead of changing working code to satisfy it.

Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them.


Thanks for the test report. It covers what the last round asked for: startup, Explorer restart, re-enabling, elevated windows in the foreground (Task Manager and an admin cmd.exe) with both the Win key and a Start-button click, and restart/shutdown. The change that relays non-keyboard ShowStartView calls from the bridge looks right: the helper's LL hooks don't see input while an elevated window is in the foreground, and a click the LL mouse hook already swallowed never reaches the native path.

One item remains:

1. Substantial overlap with your own win10-1507-start-menu-recreation mod. This is still a second custom Start window built the same way as the merged Windows 10 1507 Start Menu Recreation. The two share:

  • the left column (Most used, Recently added, All apps with folders, type-to-search);
  • the tile grid, with the same drag, resize and pin model;
  • the same WH_KEYBOARD_LL/WH_MOUSE_LL way of opening the menu;
  • the same storage values and the same WHSM2# layout format.

About 60% of the file's lines longer than 25 characters appear verbatim in the 1507 mod. The differences:

  • the Windows 8.1 Update 3 look;
  • Settings and file search;
  • the catalog snapshot cache;
  • the helper-process architecture.

The two can't run together; the README lists the 1507 mod as a conflict.

Your reasons for a separate mod, from your two PR comments:

  • the Windows 8.1 look is heavily distinct, and Windows 8.1 is a separate product generation rather than a skin of 1507;
  • users who want a Windows 8.1 look without a Start Screen are unlikely to look inside a 1507 recreation;
  • a merged mod would need a top-level style switch, plus settings that apply to only one style, which could confuse both audiences.

On the shared code, you write that:

  • reusing the merged, already-tested code for the hooks, the tile model and layout parsing was deliberate, and safer than a rewrite;
  • the similarity follows from both mods recreating the same interaction model;
  • you're open to extracting a shared module if the maintainer wants it.

The consolidation path would be the Update 3 look as a style option of the 1507 mod. Whether a separate mod is justified is the maintainer's decision.

Optional improvements

Minor polish — none of this affects users, so it's your call.

  • The bridge runs in every explorer.exe process (10113–10120, 9943–9963). This includes processes that never become the shell, such as separate folder-window processes (/factory,{...} -Embedding). In those, Wh_ModInit still loads twinui.pcshell.dll and installs the symbol hook, and the launcher thread stays in WaitForMainExplorerReady forever, waking every 100 ms (9960). Wait on an event instead of the Sleep(100) ×10 loop, and skip the bridge in processes started with /factory.
  • A settings change made while a popup menu is open is lost (3696–3700). StartScreenPopup::Track runs its own message loop, which passes the window-less WM_APP_SETTINGS_CHANGED thread message to DispatchMessageW, which discards it. g_settingsChangedPending is only rechecked at startup (9836). Handle that message in the popup loop too, or post it to the menu window instead of the thread.
  • privacyMode data race. ProfilePhotoWorker reads g_settings.privacyMode (9335) while g_settings.Load() (9872) rewrites it, before the old worker is joined in RestartProfilePhotoWorker (9874). Pass the flag to the worker by value.
  • TrackImmersiveMenu (8786–8788). GetModuleHandleExW(FROM_ADDRESS | UNCHANGED_REFCOUNT) returns the same value as GetModInstance().
  • Code that looks left over. Please check whether these are intentional:
    • g_swallowPickUp, g_swallowPickRightUp and g_swallowPickTick (3216–3217) are set but never read, so the "safety net" described at 3484 doesn't exist;
    • g_settingsBuilt (4237) is never set to true;
    • RenderFlyoutAvatar (8910) is never called;
    • TrackImmersiveMenu's compact and style parameters (8781) are ignored.
  • Translations:
    • Persian "Sleep" (3779) is "استنبات" ("germination"); Windows uses "خواب".
    • GetUiLanguageIndex (3730) maps all Chinese (primary ID 0x04) to the Simplified strings, so Traditional Chinese users get Simplified text.
    • TranslateTileCaption (3795–3803) matches the Italian default captions on any tile, so a user's tile literally named "Foto" or "Meteo" gets renamed.

Functionality notes

Non-critical observations and ideas about the feature behavior itself.

  • Clicking Start to close the menu may reopen it when the Start button wasn't identified reliably. This is new with the relay change (9462–9493); your logs show anchorMethod=3 on your own machine, so it applies there. Likely sequence:

    1. The LL mouse hook doesn't swallow the click (reliable is false for method 3).
    2. The light-dismiss path (9636–9643) and the deactivation handler (5855–5861) hide the menu.
    3. The native Start path then reaches ShowStartViewHook with a non-keyboard method and is relayed as a toggle. More than 250 ms have passed since the last toggle, so it isn't debounced, and the menu opens again.

    Treating a bridge relay that arrives within a few hundred ms of a hide as "close" (no reopen) would avoid it.

  • Pin to Start can overlap tiles. PinAppInGroup's cellFree (5333–5341) uses an old size model (Medium 1×1, Wide 2×1, Large 2×2) and checks one cell, but the new tile is Medium, which is 2×2 everywhere else (GetTileFootprint, 4916–4926). It also allows column 3, so the tile can stick out of the group. Use FindTilePlacement(..., TileSize::Medium, ...) as the resize path does.

  • Popup stays open after a keyboard app switch. MenuDeactivated (3391–3395) ignores deactivation when to == NULL, which is what you get when activation moves to another thread (Alt+Tab). The topmost popup and the menu then stay over the other app until the next click.

  • Enter launches unavailable tiles. The keyboard path (6438–6446) launches a tile without checking tile.available; the mouse path does (6022).

  • A failed first catalog scan is never retried. If the first worker returns no catalog (5459), catalogReady_ stays false, and RefreshCatalog/ApplySettings refuse to run from then on (4881, 4755). The menu stays empty until the helper restarts.

  • Some saved window sizes are rejected. Resizing allows widths down to 420 px (5700–5701), but loading rejects saved widths under 540 (4603), so those sizes are lost on the next start.

  • Shutdown bypasses Fast Startup. ExitWindowsEx(EWX_SHUTDOWN) (3158–3159) has no EWX_HYBRID_SHUTDOWN, unlike the native menu when Fast Startup is on.

  • New files never appear in search. The search index is built once, on the first query of the helper's lifetime (4491), so files created later don't appear until the helper restarts.

  • UI-thread stalls. IsUsableTileFileTarget (2504–2534) runs IShellLink::Resolve (up to 400 ms) and GetFileAttributesW (no timeout on offline UNC targets) on the UI thread, for every tile on each catalog publish and on drops.

  • Repaint cost. SelectClipRgn(hdc, nullptr) at line 7753 drops the paint clip that Render set. Every partial invalidation, including the 530 ms search caret blink, therefore repaints the whole tile grid through DrawTextG, which creates a GDI+ Graphics/Font/StringFormat per string.

  • The bridge could take over more of the opening logic. It now relays every non-keyboard XamlLauncher::ShowStartView call, and keyboard calls when the foreground window is elevated or the helper's own. Relaying keyboard calls every time could replace the system-wide WH_KEYBOARD_LL hook and the VK 0xE8 injection, and would make Start-button capture independent of how reliably the button is located. taskbar-auto-hide-keyboard-only uses the same hook for the keyboard case.

Code overview

For the maintainer: a map of the mod and what it touches outside its own process. Descriptive only — anything that needs a change is listed above. Line numbers refer to the mod source at commit beccb64. This mod is new, so everything below is new.

The mod runs in two roles. In the shell explorer.exe it is a small "bridge" that launches and supervises a helper explorer.exe -tool-mod <id> -hybrid-parent <pid> and hooks ShowStartView. In the helper (whose entry point is hooked, as in the tool-mod snippet) it runs the menu UI, the input hooks and the workers.

Code regions

  • Line 1–20: metadata (explorer.exe, x86-64).
  • Line 22–113: README.
  • Line 114–293: settings (accent, background, tile colors/shading, Calendar flip, width override, profile picture path, privacy mode, one-time layout import).
  • Line 294–328: design overview comment.
  • Line 330–783: includes, the GDI+ text helper, message and command IDs, RAII handle wrappers, icon → GDI+ bitmap conversion, icon color sampling and icon drawing.
  • Line 785–1284: profile-photo globals, the embedded default avatar PNG (799–1204), GDI/COM scope helpers.
  • Line 1286–1402: ModStorageFiles: per-user (SID-named) files under Wh_GetModStoragePath, with atomic write via a temporary file and a rename.
  • Line 1404–1537: ReadStorageString; tile-layout storage (a string value up to 30K chars, otherwise a file plus a marker value); the import fingerprint; Settings::Load.
  • Line 1539–1897: DPI metrics, colors, the Metro tile palette, the app/tile data model.
  • Line 1899–2065: shortcut/PIDL icon extraction; AppSnapshot, the catalog cache (with 48×48 icons) stored as a file in mod storage.
  • Line 2067–2541: AppCatalog: scans the Programs folders and AppsFolder; snapshot load/save; tab-separated launch counts in mod storage; letter sections.
  • Line 2543–2890: TileLayout: default tiles, WHSM2#/legacy parsing, serialization.
  • Line 2892–3173: Start-button anchoring (Win32 child, UI Automation, geometric fallback), menu placement, the Start-rect cache for the hook thread, launch helpers, power actions.
  • Line 3175–3713: StartScreenPopup, an owner-drawn popup menu with its own modal message loop.
  • Line 3716–3804: UI string table (11 languages) and tile caption translation.
  • Line 3807–4517: StartScreenSearch. On the first query, a worker indexes Settings (AllSystemSettings XML, Control Panel, Admin Tools, God Mode) and files in the user folders. Also the icon worker and Settings launching.
  • Line 4519–9069: StartMenuWindow:
    • 4523–4635: window creation and teardown;
    • 4640–4895: show/hide, applying settings (with the import fallback), persistence;
    • 4897–5400: tile placement, drag and pin;
    • 5402–5584: catalog worker;
    • 5585–6820: window procedure and input;
    • 6820–8602: rendering;
    • 8604–9067: hit-testing, launching, and the tile, app, account and power menus.
  • Line 9083–9398: hook/hybrid globals; the profile photo and display-name worker.
  • Line 9410–9506: toggle debounce. Bridge: hook on XamlLauncher::ShowStartView in twinui.pcshell.dll. It relays every non-keyboard Start invocation to the helper, and keyboard ones when the foreground window is elevated or the helper's own.
  • Line 9508–9671: Start-rect refresh, and the hook procedures:
    • WH_KEYBOARD_LL: an isolated Win tap → VK 0xE8 injection + toggle;
    • WH_MOUSE_LL: swallows Start-button clicks; light dismiss;
    • WH_GETMESSAGE: relays SC_TASKLIST.
  • Line 9673–9820: the hook thread, shell-thread message hooks, the Programs folder watcher.
  • Line 9821–9963: helper UI thread (GDI+, menu, hooks, message loop, teardown); the wait for the shell to be ready.
  • Line 9965–10086: hybrid runtime: helper start/stop, supervisor, entry-point hook, and the launcher loop in the shell Explorer that starts and restarts the helper.
  • Line 10087–10162: Windhawk callbacks for both roles.

Side effects of interest

  • External file read
    • Line 2072–2088, 2338–2382: recursive scan of FOLDERID_Programs and FOLDERID_CommonPrograms (.lnk load/resolve, icon extraction) and AppsFolder enumeration. Runs on the catalog worker at helper start and on each refresh. Read-only.
    • Line 9767–9804: change notifications on the same two Programs folders (watcher thread).
    • Line 3839–3883: on the first search query, a recursive listing of Desktop, Documents, Downloads, Pictures, Music and Videos (≤8 levels, ≤80,000 entries, skipping hidden/system entries and reparse points). Names are kept in memory only.
    • Line 3906–3928, 4048–4072: reads %WINDIR%\ImmersiveControlPanel\Settings\AllSystemSettings_*.xml (search worker).
    • Line 9128–9294, 9331–9370: profile picture: the configured profilePicturePath, the files named by the registry values below, %APPDATA%\Microsoft\Windows\AccountPictures, and FOLDERID_AccountPictures (≤32 MB each; profile worker at start and on settings change).
  • Registry read
    • Line 9148–9210: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AccountPicture\Users\<SID>, values Image1080…Image48 (profile worker). There are no registry writes outside Windhawk storage.
  • IPC
    • Line 9114, 10011, 10101–10103: the named event Local\Win81Update3StartMenuTool.Stop.v1 and the mutex windhawk-tool-mod_win81-rt-update3-start-menu coordinate the shell Explorer and the helper.
    • Line 9447–9461, 10066–10068: the shell Explorer finds the helper's window by class (Win81_Update3_StartMenu_WndClass), reads its Win81Update3StartMenuTool.Ready.v1 property, and posts WM_APP+108 to it.
    • Line 2924–3036: the helper reads the taskbar Start button through UI Automation, cross-process into Explorer. Runs on menu open, on display changes, and at most every 600 ms while the pointer is over a taskbar.
    • Line 3111–3127, 4307–4313: IApplicationActivationManager::ActivateApplication (out-of-process COM) to launch Store apps and Settings pages.
  • Other reach outside the process
    • Line 10004–10086: the shell Explorer launches a second explorer.exe -tool-mod "win81-rt-update3-start-menu" -hybrid-parent <pid> via CreateProcessInternalW (falling back to CreateProcessW) once the shell is ready, and relaunches it with a 1–30 s backoff whenever it exits.
    • Line 9494–9506: LoadLibraryExW(L"twinui.pcshell.dll", …, LOAD_LIBRARY_SEARCH_SYSTEM32) plus a symbol hook, in every non-helper explorer.exe at init.
    • Line 9432–9444: OpenProcess/OpenProcessToken on the foreground window's process to read its elevation, on each ShowStartView call in Explorer and (for logging) on SC_TASKLIST.
    • Line 9673–9712, 9588–9596: global WH_KEYBOARD_LL/WH_MOUSE_LL hooks in the helper; SendInput injects VK 0xE8 on each isolated Win tap.
    • Line 9714–9738: WH_GETMESSAGE hooks on Explorer's own Progman and taskbar threads (in-process, bridge).
    • Line 3111–3143, 4275–4314, 8711–8723, 9058: user-initiated launches:
      • ShellExecuteW with open/runas for apps and files;
      • explorer.exe /select,;
      • CreateProcessW for Settings deep links taken from the system settings XML;
      • ms-settings:yourinfo.
    • Line 3145–3162, 9059–9060: user-initiated SetSuspendState, ExitWindowsEx (shutdown, restart, sign-out; SeShutdownPrivilege enabled then restored) and LockWorkStation.


Next steps:

  • /ai-review - after pushing fixes, to get a review of the updated code. You can repeat this as many times as you need, but each review is thorough and usually there's no need for more than 2-3 iterations.
  • /ready-for-reviewer - once you're satisfied with the state of the pull request, to hand it over to a human reviewer. If some findings above are left unaddressed, add a short note explaining why.

See the review process for details.

Important: Each reply that was generated by AI must be disclosed by including the following text in the reply: "Generated by AI. Model: (ai-model-name)".

@windhawk-reviewer windhawk-reviewer Bot added waiting-for-author The author's turn: request an AI review, or respond to one that was posted. and removed waiting-for-ai-review An AI review was requested and is being prepared. labels Nov 17, 2026
@babamohammed2022

babamohammed2022 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Note for the maintainer on the 1507 overlap

The AI review has passed the remaining design question to you, so here is the case in one place.

The internal base is shared on purpose. The two mods share the same technical foundation — the low-level keyboard/mouse hooks, the tile drag/resize/pin model, and the WHSM2# layout parsing. These are the delicate parts of a Start replacement: a mistake there can crash Explorer. That code is already merged and tested in the 1507 mod, so I reused it instead of rewriting it. Reinventing the wheel here would have added risk, not value, and would have delayed the parts that are actually new.

For the end user, the two mods are completely different. The shared code is invisible to the person using the mod. What they see and interact with is a different product:

Different visual generation. This mod recreates the Windows 8.1 Update 3 Metro look — the purple background, the flat tiles, the Windows 8-style popups. The 1507 mod recreates the Windows 10 1507 design. These are two distinct Metro generations, not a skin on top of the same interface. Windows 8.1 is a separate product generation, not a variant of 1507.

Different target audience. Someone who wants Windows 10/11 to look like Windows 8.1 is looking for a specific, recognizable design. That user is unlikely to find it inside a mod titled "Windows 10 1507 Start Menu Recreation", because 1507 represents a major rewrite compared to 8.1, not a minor OS change. Keeping the mod separate makes it discoverable by the audience it is actually for.

Different settings surface. A merged mod would need a top-level style switch plus options that apply to only one of the two designs. Users would have to reason about which settings affect which look, and the risk of misconfiguring a design they did not intend to use would grow. Two focused mods keep each settings page coherent for its own audience.

On the duplication trade-off. I understand the maintenance concern: if the two copies diverge, a fix applied to one might not reach the other. I see three ways forward, and I am open to whichever you prefer:

A — Consolidate: add the Update 3 look as a style option of the 1507 mod. The search, cache and helper-process work would then benefit both. I can do this if you think it is the right call.

B — Keep them separate, with an explicit commitment to keep critical fixes in sync (for example, a tracking issue or a comment in both files pointing to the shared logic).

I did not want to block this PR on a refactor you may not consider necessary, which is why I am deferring the choice to you rather than deciding unilaterally.

What is already done. The technical findings from the first review are fixed and verified: storage moved to per-user files with temp+rename, tab-separated launch counts, fingerprint import marker, shared icon converter, fallback for invalid tileLayout pastes, and the README now documents the helper process, the conflicting mods and a screenshot. The hybrid paths have been tested and reported (startup, Explorer restart, re-enabling, elevated windows in the foreground with both the Win key and a Start-button click, restart/shutdown). The rest of the PR is ready for your review.

Generated by AI. Model: Claude

/ready-for-reviewer

@windhawk-reviewer windhawk-reviewer Bot added waiting-for-reviewer Ready for a human reviewer, and in the queue for one. and removed waiting-for-author The author's turn: request an AI review, or respond to one that was posted. labels Nov 17, 2026
@m417z

m417z commented Nov 17, 2026

Copy link
Copy Markdown
Member

These are two distinct Metro generations, not a skin on top of the same interface

Why not? Is it not like "Windows 7/8/8.1 Taskbar Recreation" where you can select the skin?

@babamohammed2022

Copy link
Copy Markdown
Contributor Author

These are two distinct Metro generations, not a skin on top of the same interface

Why not? Is it not like "Windows 7/8/8.1 Taskbar Recreation" where you can select the skin?

Thanks for the question. The discussed point is partially true. It is indeed doable to add a skin, but having it as a separate mod in this distinct case is useful especially for the final user because the mods have almost the same internal code but the interface is entirely different, and from a final user perspective it would be harder to find a mod that combines both skins together. In the case of the taskbar recreation, the name itself is explanatory, but something like "Windows 8.1 Update 3/Windows 10 1507 Start Menu Recreation" reads awkwardly from my perspective. The taskbar recreation name works because "7/8/8.1" is a compact list of variants of the same object: the taskbar looks broadly similar across those versions. In this case, "Windows 8.1 Update 3" and "Windows 10 1507" are two complete product names describing two different Start menu designs, not variants of one. A combined name would read like two products stapled together, not like a list of skins for the same product. That is why the "skin option" pattern fits the taskbar recreation but is awkward here. At least, this is my opinion. If it is specifically required to combine them, I'll do it, but it might make discoverability worse as standard Windows 8.1 did not include a Start Menu. Additionally, I planned to add more Windows 8.1-related features in future updates for it, making the mod more distinct than the 1507 one.

@m417z

m417z commented Nov 17, 2026

Copy link
Copy Markdown
Member

I'd use a less specific name such as "Windows 8.1/10 Start Menu Recreation", and then name the specific revisions in the description or the readme. Otherwise, we can end up with dozens of mods for various Windows revisions, that's unlikely to be more convenient for users.

@m417z m417z added waiting-for-author The author's turn: request an AI review, or respond to one that was posted. and removed waiting-for-reviewer Ready for a human reviewer, and in the queue for one. labels Nov 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-for-author The author's turn: request an AI review, or respond to one that was posted.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants