Skip to content

Bug: breadcrumb-dropdown-coordinator-stale-closepending-drops-reopen #462

Description

@drmoisan
  • Work Mode: full-bug

Summary

BreadcrumbDropDownOpenCoordinator.CloseCore never clears its _closePending flag on the
successful close path. The flag latches true after the first close that actually closes the
host and is never reset. RequestOpen consults that stale flag and can silently return a
already-closed sentinel task instead of opening the drop-down, dropping a legitimate reopen
request with no error and no log.

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 item folder-selector breadcrumb drop-down open/close lifetime

Steps to Reproduce

  1. Open the breadcrumb drop-down so _host.IsOpen is true.
  2. Close it through a path that reaches CloseCore and where _host.Close(reason) returns true.
    _closePending is now permanently true.
  3. Cause the host to become open again through a path that does not route through
    CloseCore/RequestOpen - for example SetDroppedDown(true) at :108-112, where
    _openSelector() reports no change and _isSelectorOpen() is true.
  4. Call RequestOpen.
  5. Observe that the guard at :92 is satisfied (_closePending stale-true and _host.IsOpen
    true) and ClosedTask is returned. The open request is discarded silently.

Expected Behavior

_closePending describes an in-flight close. Once _host.Close has completed successfully the
close is no longer pending, so a subsequent RequestOpen should proceed and open the drop-down.

Actual Behavior

_closePending remains true for the remaining lifetime of the coordinator, so RequestOpen can
short-circuit to ClosedTask whenever the host is open.

Logs / Screenshots

(not provided in potential file)

Impact / Severity

  • Blocker
  • High
  • Medium
  • Low

The user-visible symptom is a folder-selector drop-down that intermittently refuses to reopen until
the viewer is recycled. The failure is silent - no exception, no log line - which makes it
expensive to diagnose from a bug report. Severity is Medium because reaching the state requires the
specific reopen path in step 3 rather than the common open/close cycle.

Source

From: docs/features/potential/2026-08-07-breadcrumb-dropdown-coordinator-stale-closepending-drops-reopen.md

Activity

  1. added a commit that references this issue on Aug 28, 2026
  2. drmoisan commented on Aug 31, 2026

    @drmoisan
    OwnerAuthor

    Closing as completed. Delivered under the sibling feature breadcrumb-coordinator-hub-defects-501, commit 2434f07f ("fix(breadcrumb): enforce close, lifetime, broadcast and lease invariants"), merged via PR #659 (merge commit 4cb709db), an ancestor of origin/main. The commit body names this issue directly: "#462: replace the single _closePending flag with _closeInFlight and _closeCompleted so a reopened host can close again, without weakening the repeated-close suppression the two must-pass tests encode."

    Confirmed directly against origin/main:QuickFiler/Viewers/BreadcrumbDropDownOpenCoordinator.cs: _closePending has zero occurrences — split into _closeInFlight and _closeCompleted. RequestOpen now guards on _closeInFlight && _host.IsOpen (not a latched completed flag) and clears _closeCompleted, so a legitimate reopen after a successful close is no longer discarded, while the repeated-close suppression the issue required not be weakened is preserved in CloseCore (early returns, a finally-cleared in-flight latch, and _closeCompleted set only on the success path).

    All 32 acceptance criteria in docs/features/active/breadcrumb-coordinator-hub-defects-501/spec.md are checked [x], including the invariants this issue specifically drove (AC-01/AC-02/AC-03) and the regression test in QuickFiler.Test/Viewers/BreadcrumbDropDownOpenCoordinatorTests.Part2.cs.

    Verified via /parallel-add 462 against the bugs-638-644-647 parallel run (2026-09-01). No branch or PR remains to ship; this was left open only as bookkeeping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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