Skip to content

Add regression coverage for stale findController callbacks after editor disposal #108

@SebTardif

Description

@SebTardif

Problem

The current test added for the findController swap bug verifies that stale controllers no longer trigger rebuilds after a swap, but it does not cover the disposed-editor failure mode. Before the fix, a swapped-out findController could still call setState on a disposed CodeEditor after the editor was removed from the tree.

Why this matters

This is the more severe user-visible consequence of the listener leak. Without a regression test for the disposed-editor path, future refactors could accidentally reintroduce a setState() called after dispose() failure while still passing the current rebuild-focused test.

Success criteria

  • Add a widget test that swaps the findController, disposes the editor, then triggers the stale controller
  • The test fails without the production fix and passes with it
  • The test does not rely on protected members like hasListeners

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions