Skip to content

Remove dead Win32 constants and refresh stale no-release comments - #29

Merged
TheValiantOne merged 1 commit into
mainfrom
chore/dead-code-stale-docs
Aug 11, 2026
Merged

Remove dead Win32 constants and refresh stale no-release comments#29
TheValiantOne merged 1 commit into
mainfrom
chore/dead-code-stale-docs

Conversation

@TheValiantOne

Copy link
Copy Markdown
Owner

Summary

Cleanup unit from the hardening pass — no behavior changes.

  • Program (WinForms host): MaybeAttachConsole() now runs in the explicit static constructor's body instead of via an unread static readonly bool _consoleAttached field initializer. The field's value was never read — only its initializer's side effect mattered — which both tripped CA1823 on every build and obscured the intent. The beforefieldinit rationale (and its "do not remove without re-verifying the repro" warning) is preserved in the comment.
  • MessageBoxManager / SMTree: removed the unused vendored Win32 constants (WM_DESTROY, WM_TIMER, WM_USER, DM_GETDEFID, TVM_GETEXTENDEDSTYLE). The solution now builds with zero CA1823 warnings.
  • vortex-extension: three files still claimed "no GitHub Release exists on this repo yet" — stale since v0.6.2 went live (2026-08-11) with exactly the asset names buildAssetFileName expects. Reworded to current fact while keeping what's still true: no eager download on startup (that stays an explicit user action by design), tests never touch the network, and ensureWsmToolRegistered returning false is the normal fresh-install state.

Verification

dotnet build (0 CA1823) / dotnet test 128/128 / dotnet format whitespace --verify-no-changes clean; extension typecheck/lint/test (200) clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GXAuGMLB44T5Zv5o5ZzKah

- Program (WinForms): fold MaybeAttachConsole() into the explicit static
constructor instead of an unread `_consoleAttached` field whose
initializer side effect was the whole point (CA1823, and clearer about
what's actually load-bearing - the beforefieldinit rationale is
preserved in the comment).
- MessageBoxManager/SMTree: drop the unused vendored Win32 constants
(WM_DESTROY/WM_TIMER/WM_USER/DM_GETDEFID, TVM_GETEXTENDEDSTYLE) that
produced CA1823 noise on every build. Zero CA1823 warnings remain.
- vortex-extension: the "no GitHub Release exists yet" comments in
githubRelease.ts/index.ts/toolAcquisition.ts predate v0.6.2 (live since
2026-08-11, with exactly the asset names this code expects) - reworded
to reflect that, keeping the still-true parts (no eager startup
download; tests never hit the network; fresh installs return false from
ensureWsmToolRegistered until acquisition is triggered).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXAuGMLB44T5Zv5o5ZzKah
@TheValiantOne
TheValiantOneforce-pushed the chore/dead-code-stale-docs branch from ecc7996 to de7447aCompareAugust 11, 2026 04:02
@TheValiantOne
TheValiantOne merged commit e2d1d07 into mainAug 11, 2026
1 check passed
@TheValiantOne
TheValiantOne deleted the chore/dead-code-stale-docs branch August 21, 2026 13:11
Sign up for freeto 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.

1 participant

@TheValiantOne