Skip to content

Refresh footer validation as signing inputs change - #26

Merged
thefinder808 merged 1 commit into
mainfrom
fix/secret-fields-refresh-footer
Aug 1, 2026
Merged

thefinder808 merged 1 commit into
mainfrom
fix/secret-fields-refresh-footer

Conversation

@thefinder808

Copy link
Copy Markdown
Owner

Bug

Typing the certificate password (or editing any other signing input) didn't refresh the New-package footer: the red "The certificate password is required to sign." stayed up and Package stayed disabled until some unrelated event — e.g. toggling Sign payload off/on — happened to re-run UpdateFlowUi(). Found while staging the README screenshots for #25 (the staging had to toggle Sign payload twice just to get the "ready" footer).

Cause

WireDerivedFields() wired TextChanged → UpdateFlowUi() for the three path fields only. None of the inputs ValidateSigningInputs() reads were wired:

  • TxtPfxPath / TxtSecret (also stale via the browse button, which sets .Text programmatically)
  • TxtPkcs11Module
  • TxtTsEndpoint / TxtTsAccount / TxtTsProfile / TxtTsToken
  • ChkSignAllFiles — no IsCheckedChanged handler at all, despite gating the unsignable-setup rule

Fix

New WireSigningRefresh() (called from the ctor beside WireDerivedFields) wires exactly that set to UpdateFlowUi. No debounce — these checks are cheap and local, unlike the path fields' folder-walk/MSI-parse.

Tests

TDD: SigningRefreshTests (headless, real MainWindow) written first and watched fail on both event kinds:

  • Typing_the_pfx_password_immediately_arms_package — red at the post-typing assert, green after
  • Toggling_sign_all_files_immediately_updates_validation — .cmd setup blocked until sign-all is switched on; red at the post-toggle assert, green after

Full suite: 136 passed (36 Packaging, 11 Cli, 61 App, 28 Signing).

🤖 Generated with Claude Code

Only the three path fields re-ran UpdateFlowUi on TextChanged, so editing
any signing input left the footer stale: typing the PFX password kept the
red "password is required" message and a disabled Package button until an
unrelated event (e.g. flipping the Sign toggle) forced a refresh. The same
staleness applied to every input ValidateSigningInputs reads — the pfx and
PKCS#11 module paths (including browse, which sets .Text with no handler),
the Azure endpoint/account/profile/token, and the "sign all signable
files" switch, which had no IsCheckedChanged handler at all.

New WireSigningRefresh() wires exactly the inputs signing validation
reads to UpdateFlowUi. No debounce: unlike the path fields' folder-walk,
these checks are cheap and local.

Repro'd headlessly first (SigningRefreshTests, red on both controls'
event kinds — TextBox.TextChanged and ToggleSwitch.IsCheckedChanged),
green after. Found 2026-08-01 while staging the README screenshots.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thefinder808
thefinder808 merged commit fdc430f into main Aug 1, 2026
1 check passed
@thefinder808
thefinder808 deleted the fix/secret-fields-refresh-footer branch August 1, 2026 13:29
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.

1 participant