Skip to content

fix(ui): dashboard refresh races panel mounting and fails the worker #519

Closed

Description

@dan-petty

Problem

tests/test_ui_dashboard.py::test_textual_dashboard_app_lifecycle fails intermittently under the full parallel suite (uv run devops ci --force) and passes in isolation (4 of 4):

textual.worker.WorkerFailed: Worker raised exception: NoMatches("No nodes match 'Static' on DomainPanel(id='panel-telemetry')")

Root cause

DashboardApp._refresh_worker (src/devops_cli/ui/dashboard.py:225, a thread worker) refreshes a domain panel, whose update calls self.query_one(Static).update(...) (src/devops_cli/ui/widgets.py:99, 178, 249). When the refresh lands before the panel has composed and mounted its Static child (the test switches tabs immediately, and a loaded machine delays composition), the query raises NoMatches and the worker fails. The same race can fail the dashboard itself on a slow machine; it is not only a test problem.

Acceptance criteria

  • A panel update before the panel is mounted is deferred or dropped, never an exception.
  • A test drives a refresh before mount and asserts no worker failure.

Activity

  1. added this to the v0.2.24 milestone on Sep 24, 2026
  2. added
    type/bug
    scope/cli
    priority/p2-medium
    on Sep 24, 2026
  3. modified the milestones: v0.2.24, v0.2.25 on Sep 30, 2026
  4. dan-petty commented on Sep 30, 2026

    @dan-petty
    OwnerAuthor

    Moved from v0.2.25 to the backlog. v0.2.25 is capped at 12 items (#740), and only the next two planned releases keep a milestone (#739), so P2 items wait in the backlog until reprioritization pulls them in.

  5. dan-petty commented on Oct 2, 2026

    @dan-petty
    OwnerAuthor

    This race recurred on 2026-10-02 and failed a pre-push devops ci gate (#588's branch): WorkerFailed: Worker raised exception: NoMatches("No nodes match '#k8s-namespace' on K8sPanel(id='panel-k8s')") in tests/test_ui_dashboard.py::test_textual_dashboard_app_lifecycle, 1 failed / 6891 passed. The branch touches no UI code, and the test then passed 3 of 3 alone. It ran while another branch's gate was running, so the machine was loaded. That is the trigger described above, now on the K8s panel's #k8s-namespace query as well as Static.

    A flaky gate test costs a whole gate rerun, so this is raised to P1 and placed in v0.2.28, the pre-v0.3.0 release for gate and safety work. It displaces #885, the lowest-ranked item there (P1, Value Medium, Effort Medium; #408 is a person's placement and stays). The fix must cover every panel query that a refresh can reach before mount, not only Static.

  6. added
    priority/p1-high
    and removed
    priority/p2-medium
    on Oct 2, 2026
  7. added this to the v0.2.28 milestone on Oct 2, 2026
  8. dan-petty-bot commented on Oct 6, 2026

    @dan-petty-bot
    Collaborator

    What changed

    #1263, merged into release/v0.2.28 as 347b3e9.

    Description

    Defend dashboard domain panels against mounting race conditions by deferring snapshot rendering when unmounted or during child query races, preventing NoMatches worker failures.

    7 file(s) changed.

    How it was verified

    Check runs at 9e62ca5:

    • Prune PR DevContainer Images: pass
    • CodeQL: pass
    • Dependency Freshness: skipping
    • Static Analysis: pass
    • Analyze (actions): pass
    • Analyze (python): pass
    • Tests & Coverage: pass
    • DevContainer Image: skipping
    • Service Image: skipping

    Acceptance Criteria of docs/agent/tasks/task-519-dashboard-refresh-races-panel-mounting.md:

    No Acceptance Criteria section.

  9. added a commit that references this issue on Oct 7, 2026
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

    priority/p1-highscope/clitype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions