Skip to content

fix(cli): the finding detail pane scrolls to the top before the next refresh #834

Closed

Description

@dan-petty

Context & Rationale

87076d5 (#684, PR #830) made the dashboard's finding detail pane open each newly highlighted finding at the top. ReviewPanel._show_finding (src/devops_cli/ui/widgets.py:353-361) calls scroll_home(animate=False) for that. In Textual 8.2.8, scroll_to and scroll_home default to immediate=False, which defers the scroll until after the next screen refresh.

test_another_finding_is_detailed_from_the_top (tests/test_ui_reactive.py:2378) moves the cursor, pauses once, and reads scroll_y. On a slower machine it can read the old offset before that refresh. GitHub's runner did, on PR #833: assert (40, 40, 40, 'Title: Finding 2') == (40, 40, 0, 'Title: Finding 2'). The pane already showed the new finding but was still scrolled 40 lines down. The test passes locally, so CI on release/v0.2.24 fails intermittently. 87076d5 is in no tag.

Scope & Deliverables

  • Deliverable: _show_finding scrolls the pane to the top at once, with immediate=True. Scrolling to the top doesn't depend on the new text's layout.
  • Acceptance criteria:
    • A test calls _show_finding with another finding's key on a pane scrolled down, and reads scroll_y with no pause in between: 0. It fails against 87076d5.
    • test_another_finding_is_detailed_from_the_top passes 20 consecutive runs under -n 8.
    • uv run devops ci passes.
  • Constraint: Tests never touch the network.

Strategic Alignment

Activity

  1. added this to the v0.2.24 milestone on Oct 1, 2026
  2. added
    type/bug
    scope/cli
    priority/p0-critical
    on Oct 1, 2026
  3. dan-petty commented on Oct 1, 2026

    @dan-petty
    OwnerAuthor

    Closed by #835, merged into release/v0.2.24.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

  4. added a commit that references this issue on Oct 1, 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/p0-criticalscope/clitype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions