fix(toolbar): prevent unhandled UI exception on disabled editor hover #32

Open
opened 2026-10-12 10:35:43 +00:00 by KofTwentyTwo · 3 comments
KofTwentyTwo commented 2026-10-12 10:35:43 +00:00 (Migrated from github.com)

Report

The owner saw an unhandled UI NullReferenceException while testing the local latest review build. The stack reaches ToolTip.set_IsOpen in the disabled-editor hover timer in MainWindow.Toolbar.cs (line36 in de70220).

The timer opens a standalone ToolTip while ToolTipService holds a different tooltip containing the reason. The native owner/lifecycle of the object being opened needs correction; no current runtime fix is claimed.

Acceptance

  • Hovering disabled Open in editor shows the real reason and Settings route.
  • Use the same attached native ToolTip for service ownership and timed opening.
  • Do not open for an unloaded/closed target; state changes and mouse exit close/cancel the tooltip.
  • Add physical-hover acceptance that requires the visible explanation and checks for unhandled UI errors, preserving all existing editor/printing assertions.
  • Validate hosted native/published/installed builds and a fresh local review build; preserve the currently running owner instance.

Related: #28, #18, #21 and PR #3. Substantial AI assistance: Codex (GPT-6).

## Report The owner saw an unhandled UI `NullReferenceException` while testing the local latest review build. The stack reaches `ToolTip.set_IsOpen` in the disabled-editor hover timer in `MainWindow.Toolbar.cs` (line36 in de70220). The timer opens a standalone ToolTip while ToolTipService holds a different tooltip containing the reason. The native owner/lifecycle of the object being opened needs correction; no current runtime fix is claimed. ## Acceptance - Hovering disabled Open in editor shows the real reason and Settings route. - Use the same attached native ToolTip for service ownership and timed opening. - Do not open for an unloaded/closed target; state changes and mouse exit close/cancel the tooltip. - Add physical-hover acceptance that requires the visible explanation and checks for unhandled UI errors, preserving all existing editor/printing assertions. - Validate hosted native/published/installed builds and a fresh local review build; preserve the currently running owner instance. Related: #28, #18, #21 and PR #3. Substantial AI assistance: Codex (GPT-6).
KofTwentyTwo commented 2026-10-12 10:55:24 +00:00 (Migrated from github.com)

Signed/DCO 321816c is pushed. The hover timer now opens the same native ToolTip object registered with ToolTipService, and only for a loaded target with a current XamlRoot. The prior standalone object was never attached. Microsoft's native ToolTipService implementation explicitly sets the ToolTip owner/container during registration.

The existing editor/printing test now performs actual disabled-editor hover, requires the visible explanation and accessible HelpText, verifies closure on mouse exit and checks for unhandled UI log errors. All prior literal-target/printing assertions and case counts/deadlines remain. It is also included in the focused suite (29 cases).

Isolated full Release, formatting, direct2-file Markdown lint, actionlint/zizmor and signed commit hooks pass. A separate self-contained local1.0.0-dev candidate is prepared for owner review. Runtime acceptance of the correction is still pending in CI38238385482; no passing hover result or production release is claimed. Completed temporary timing diagnostics are removed, with original all-channelde70220 evidence retained.

Signed/DCO `321816c` is pushed. The hover timer now opens the same native ToolTip object registered with ToolTipService, and only for a loaded target with a current XamlRoot. The prior standalone object was never attached. Microsoft's [native ToolTipService implementation](https://github.com/microsoft/microsoft-ui-xaml/blob/main/dxaml/xcp/dxaml/lib/ToolTipService_Partial.cpp) explicitly sets the ToolTip owner/container during registration. The existing editor/printing test now performs actual disabled-editor hover, requires the visible explanation and accessible HelpText, verifies closure on mouse exit and checks for unhandled UI log errors. All prior literal-target/printing assertions and case counts/deadlines remain. It is also included in the focused suite (29 cases). Isolated full Release, formatting, direct2-file Markdown lint, actionlint/zizmor and signed commit hooks pass. A separate self-contained local1.0.0-dev candidate is prepared for owner review. Runtime acceptance of the correction is still pending in CI38238385482; no passing hover result or production release is claimed. Completed temporary timing diagnostics are removed, with original all-channelde70220 evidence retained.
KofTwentyTwo commented 2026-10-12 11:01:00 +00:00 (Migrated from github.com)

Exact 321816c runtime evidence is now available: focused29/29 and full native111/111 pass with zero failures/skips. The strengthened Toolbar_EditorAndPrint_UsesLiteralTargetsAndOwnedDialogs case passes in9.3076s, including actual physical hover, visible native explanation, HelpText, mouse exit, and checks for unhandled UI errors; all original literal-editor/printing assertions also pass. Retained actual TRX and disabled-editor-native-tooltip screenshot in reader-regressions-38238385482.

The corrected self-contained local1.0.0-dev candidate is open for the owner as Tooltip-fix-review.md, using its separate profile. Earlier review windows/settings are preserved. Published/installed job remains live; no production1.0 release or signed artifact claim is made.

Exact `321816c` runtime evidence is now available: focused29/29 and full native111/111 pass with zero failures/skips. The strengthened `Toolbar_EditorAndPrint_UsesLiteralTargetsAndOwnedDialogs` case passes in9.3076s, including actual physical hover, visible native explanation, HelpText, mouse exit, and checks for unhandled UI errors; all original literal-editor/printing assertions also pass. Retained actual TRX and disabled-editor-native-tooltip screenshot in reader-regressions-38238385482. The corrected self-contained local1.0.0-dev candidate is open for the owner as Tooltip-fix-review.md, using its separate profile. Earlier review windows/settings are preserved. Published/installed job remains live; no production1.0 release or signed artifact claim is made.
KofTwentyTwo commented 2026-10-12 14:03:47 +00:00 (Migrated from github.com)

Completed exact-head distributed acceptance for the tooltip correction 321816c: CI 38238385482 is terminal success. Actual retained TRXs show published 111/111, installed stable 110/110 and dev 110/110, zero failures/skips, in addition to focused 29/native 111.

The strengthened physical-hover/editor/print case passes in all three distributed variants with the actual native explanation and no unhandled UI log errors (published 7.116s, stable 8.231s, dev 7.791s). Original assertions/cases/deadlines remain unchanged. Actual lifecycle/update receipts also pass. Fixed owner review build is already open with its separate profile; prior previews preserved. Awaiting owner confirmation of local hover behavior before closing this report. Documentation checkpoint pushed in 313d258; it does not change the tested application code.

Completed exact-head distributed acceptance for the tooltip correction `321816c`: [CI 38238385482](https://github.com/KofTwentyTwo/MarkdownViewr.Windows/actions/runs/38238385482) is terminal success. Actual retained TRXs show published 111/111, installed stable 110/110 and dev 110/110, zero failures/skips, in addition to focused 29/native 111. The strengthened physical-hover/editor/print case passes in all three distributed variants with the actual native explanation and no unhandled UI log errors (published 7.116s, stable 8.231s, dev 7.791s). Original assertions/cases/deadlines remain unchanged. Actual lifecycle/update receipts also pass. Fixed owner review build is already open with its separate profile; prior previews preserved. Awaiting owner confirmation of local hover behavior before closing this report. Documentation checkpoint pushed in `313d258`; it does not change the tested application code.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/MarkdownViewr.Windows#32