Skip to content

Bug: breadcrumb-capturecurrentortests-silently-degrades-in-production #475

Description

@drmoisan
  • Work Mode: full-bug

Summary

BreadcrumbPopupUiOperations.CaptureCurrentOrTests() inverts a deliberate fail-fast guard into a
silent degradation. When no SynchronizationContext is present it falls back to a test-mode
dispatcher whose documented contract is to report cross-thread work rather than schedule it. Four
production call sites use this method, so on any thread without a synchronization context the
breadcrumb popup silently never opens: no exception, no user-visible error, only a log line.

Environment

  • OS/version: Windows 11 Pro 10.0.26200
  • Runtime: .NET Framework 4.8.1 WinForms VSTO add-in with Microsoft WebView2
  • Affected path: QuickFiler breadcrumb folder-selector drop-down construction

Steps to Reproduce

  1. Construct the breadcrumb drop-down host from a thread where SynchronizationContext.Current is
    null - for example a thread-pool continuation, a background worker, or any path that has lost
    the WinForms context.
  2. Request the drop-down open.
  3. Observe that no popup appears, no exception is raised, and the only trace is a reported failure
    through the dispatcher's error sink.

Expected Behavior

Production construction off the owning UI synchronization context is a programming error and should
fail fast with the InvalidOperationException that CaptureCurrent() already defines. The
test-mode dispatcher should not be reachable from production call sites.

Actual Behavior

The construction succeeds, the drop-down is wired to a dispatcher that reports rather than
marshals, and the feature silently does nothing.

Logs / Screenshots

(not provided in potential file)

Impact / Severity

  • Blocker
  • High
  • Medium
  • Low

Severity is High because the failure mode is silent and user-facing: the folder selector simply
does not open, with no diagnostic surfaced to the user and no exception to correlate in a crash
report. It also violates CLAUDE.md § "Error Handling" ("fail fast and explicitly; do not silently
ignore errors") and .claude/rules/general-code-change.md § "Error Handling and Logging".

There is a secondary design concern: a test-only affordance is reachable from production code. The
repository's determinism guidance expects test seams to be injected by the test, not selected at
runtime by probing ambient state.

Source

From: docs/features/potential/2026-08-07-breadcrumb-capturecurrentortests-silently-degrades-in-production.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions