Create win-vista-and-7-welcome-center.wh.cpp - #5146
Conversation
|
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 See the pull request review process for the full details. |
|
/ai-review |
Submission reviewNote: 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. This is an impressive amount of work, and there's no existing mod that overlaps with it — nothing in 1. The embedded prebuilt executable has to go ( The mod carries a compiled x64 PE as base64 and writes it to You already have the mechanism to replace it. That costs one short-lived process instead of a shipped binary. Please also drop the 2. The mod isn't reversible — it leaves state behind when disabled. A core Windhawk principle is that a mod's effects disappear when it is disabled.
On top of that, Teardown should remove every file, folder, shortcut and registry key the mod created, on every path that can create them. 3. Drop The mod installs no function hooks in Explorer. In the Explorer branch it just spawns a thread, registers two window classes, creates its own windows, adds a tray icon and registers a hotkey — all of which work from any process. That's precisely the case the "Mods as tools" page describes, and it lists exactly the symptoms this mod has: multiple
Tray icons and 4. const DWORD wr = WaitForSingleObject(g.uiThread, 4000);
if (wr == WAIT_TIMEOUT) {
Wh_Log(L"UI thread did not exit in time; continuing unload");
}When This isn't theoretical — The wait has to be unconditional. Signal properly and then block indefinitely, e.g.: g_quitting = true; // std::atomic<bool>, checked by WaitForDesktop's loop
PostThreadMessageW(g.uiThreadId, WM_QUIT, 0, 0); // in addition to the WM_CLOSE post
WaitForSingleObject(g.uiThread, INFINITE);
CloseHandle(g.uiThread);Note the timeout path has a second consequence: 5.
[[clang::no_destroy]] static App g;See https://github.com/ramensoftware/windhawk/wiki/Global-objects-and-process-shutdown for the two teardown paths and the case-by-case rules. 6. const Item& it = items[static_cast<size_t>(g.selectedIndex)];
...
LaunchTask(hwnd, it.settingsUri.c_str(), it.classicFile.c_str(),
it.classicParams.c_str(), g.settings.preferClassicCpl);
const std::wstring uri = it.settingsUri, file = it.classicFile, params = it.classicParams;
const bool oem = it.oem;
...7. Add a screenshot to the README. The mod is a pixel-accurate visual recreation with two skins, and the README has no image at all. Please add at least one screenshot of the Vista appearance and one of the Windows 7 Getting Started skin ( Optional improvements
Minor polish — none of this affects users, so it's your call.
Functionality notes
Non-critical observations and ideas about the feature behavior itself.
Next steps:
See the review process for details. |
|
/ai-review |
Submission reviewNote: 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. This is an impressive amount of work — the Vista/Win7 recreation itself is detailed and the artwork pipeline (user files override embedded Base64) follows the Win7 Network Flyout precedent well. The problems are almost entirely in how the mod integrates with Windhawk and the system, not in the recreation. 1. The mod ships a prebuilt executable as a Base64 blob and writes it to disk.
Windhawk mods are distributed and reviewed as source. An opaque compiled binary can't be read, diffed, or rebuilt by a reviewer or by a user — the import table ( The good news is that the mod already contains the plumbing to do without it. 2. The mod leaves persistent files behind when it is disabled. Reversibility is a core Windhawk principle: everything the mod does should disappear when it's turned off.
After uninstalling the mod the user is left with Start Menu and Desktop shortcuts pointing at a stale helper executable that nothing maintains any more. 3. const DWORD wr = WaitForSingleObject(g.uiThread, 4000);
if (wr == WAIT_TIMEOUT) {
Wh_Log(L"UI thread did not exit in time; continuing unload");
}When This isn't a theoretical timeout. The teardown relies on
Fix: make the thread interruptible and then wait unconditionally. Set a stop flag checked by 4. This should be a pure tool mod — drop The mod installs no function hooks in Explorer. Everything it does — Running the UI in Explorer as well costs you:
Recommend removing 5. Heavy COM / shell / filesystem work runs inside
Initializing COM and creating shell objects that early in Explorer's lifetime is a startup hang/crash risk, and broadcasting 6.
Worse, each UniqueHandle f(CreateFileW(exePath, GENERIC_WRITE, 0, nullptr,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr));
7. The README has no screenshot. The whole point of the mod is a pixel-accurate window, in two skins. Please add at least one screenshot (ideally one per appearance) — Optional improvements
Minor polish — none of this affects users, so it's your call.
Functionality notes
Non-critical observations and ideas about the feature behavior itself.
Next steps:
See the review process for details. |
|
/ai-review |
Submission reviewNote: 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. Impressive amount of work, and the artwork/localization effort shows. The blocking problems are all about how the mod integrates with the system rather than about the recreation itself: it ships a prebuilt binary, leaves files behind after it is disabled, injects a full UI into 1. The mod embeds a prebuilt
Windhawk mods are distributed as source that Windhawk compiles on the user's machine — that is what makes them auditable. An opaque machine-code blob bypasses that entirely: nobody reviewing this PR (or the mod page) can tell what those 2,560 bytes do. On top of that, a shell process writing an executable into Related, Please drop the launcher entirely. The tray icon and the hotkey already cover opening the window, and both work from any process. If you want to keep the Start Menu / Control Panel entries, they need a target that isn't a binary the mod carries — otherwise the honest simplification is to remove those two integrations. 2. The mod isn't fully reversible A core Windhawk principle is that a mod's effects disappear when it is disabled. Right now
So after disabling the mod the user is left with a Start Menu entry that launches a leftover executable that does nothing. Delete every file and shortcut the mod created in 3. Hosting the UI inside The mod declares Two concrete consequences of the current design:
The README's stated reason ("UI is hosted in Please drop 4. const DWORD wr = WaitForSingleObject(g.uiThread, 4000);
if (wr == WAIT_TIMEOUT) {
Wh_Log(L"UI thread did not exit in time; continuing unload");
}When 4 seconds is not a safe margin, because several UI-thread paths block for longer:
Please make the wait unconditional ( 5. In the Explorer branch, Additionally, 6.
[[clang::no_destroy]] std::optional<App> g_app; // engage in UiThread, reset in ReleaseUiResources/uninit
7. Double-clicking "More about this PC" launches the target three times
8. Add a screenshot to the README This is a purely visual mod with two skins and 14 languages, and the README has no image at all. Users pick mods from the catalog largely on the screenshot. Please add at least one screenshot (ideally one per skin); only Optional improvements
Minor polish — none of this affects users, so it's your call.
Functionality notes
Non-critical observations and ideas about the feature behavior itself.
Next steps:
See the review process for details. |
|
/ai-review |
|
/ai-review |
|
@Cips35 |
Submission reviewNote: 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. Nice work overall — the tool-mod boilerplate is a verbatim copy of the wiki snippet, the 1. Unloading the mod can hang forever.
The robust fix is to post static HANDLE g_uiReadyEvent; // created in WhTool_ModInit
static DWORD WINAPI UiThread(LPVOID) {
g.uiThreadId = GetCurrentThreadId();
MSG dummy;
PeekMessageW(&dummy, nullptr, WM_USER, WM_USER, PM_NOREMOVE); // create the queue
SetEvent(g_uiReadyEvent);
...
}
static void RequestUiShutdown() {
if (g_stopEvent) SetEvent(g_stopEvent);
if (g_uiReadyEvent) WaitForSingleObject(g_uiReadyEvent, 5000);
if (g.uiThreadId) PostThreadMessageW(g.uiThreadId, WM_QUIT, 0, 0);
}Also worth checking the stop event once more right before 2. ~2,100 lines of dead embedded assets — 3. 4. The readme describes behaviour the code doesn't implement. These will confuse users who go looking for the features:
5. The window won't follow per-monitor DPI. The mod handles SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);6. A custom OEM link with a query string is silently dropped. Optional improvements
Minor polish — none of this affects users, so it's your call.
Functionality notes
Non-critical observations and ideas about the feature behaviour itself.
Next steps:
See the review process for details. |
|
/ai-review |
Submission reviewNote: 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 lot of care clearly went into this — the localization, the artwork pipeline and the layout work are impressive. The problems below are mostly about how the mod integrates with Windhawk (where it runs, what it drops on disk, and how it unloads) rather than the recreation itself. 1. Drop The mod already carries the full tool-mod boilerplate and
The README's justification ("UI is hosted in 2. Remove the embedded prebuilt
If the Start Menu shortcut and Control Panel entry can't be built without a helper executable, they should be dropped — the tray icon and the hotkey cover the same need and require no on-disk binary. 3. The mod is not fully reversible — it leaves files behind when disabled.
A mod's effects must disappear when it's disabled. Please delete all of these in Related: 4. const DWORD wr = WaitForSingleObject(g.uiThread, 4000);
if (wr == WAIT_TIMEOUT) {
Wh_Log(L"UI thread did not exit in time; continuing unload");
}
CloseHandle(g.uiThread);When The secondary damage in that path is just as bad: The wait must not be bounded in a way that lets the unload proceed. In a dedicated tool process the accepted fallback is 5. Double-clicking "More about this PC" fires the action three times. The 6. The host window exists but pumps no messages for up to 15 seconds at logon. In 7. The tool-mod boilerplate has been modified in several places. The convention is to paste the wiki snippet verbatim so it stays maintainable. Current deviations, beyond the Explorer host: the 8. They're created in 9. The README has no screenshot. The whole mod is a visual recreation with two distinct skins, so a screenshot (or GIF) of the Vista appearance and the Windows 7 "Getting Started" appearance would help a lot. Optional improvements
Minor polish — none of this affects users, so it's your call.
Functionality notes
Non-critical observations and ideas about the feature behavior itself.
Next steps:
See the review process for details. |
Changelog
If this pull request updates an existing mod, describe the changes below:
Mod authorship
If this pull request introduces a new mod, please complete the section below.
This mod was created by:
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.