Skip to content

Review comment counts a changed component once per level #169

Open

Description

@Svilen-Stefanov

Problem

The review comment's "N changed components" counts every changed component recursively, ancestors included. One change deep in the tree reads as several separate changes.

Seen on CodeBoarding/crate#1 (run 42718797329, depth 4): the comment says 4 changed components, but all 8 changed production files sit in one leaf, Table and Column Statistics (1.1.3.2). The other three are its parents: Query Plan Generation, SQL Planning and Execution, Database Core Engine.

The count comes from _count_changed_components in scripts/diff_to_mermaid.py (n_changed), rendered by render-review.sh / build-review-comment.sh.

Proposal

Count only the deepest changed components (leaves of the changed set), and name the path when there is just one, e.g. "1 changed component: Database Core Engine › … › Table and Column Statistics".

Done when

The crate#1 comment reports 1 changed component, and the changed= marker matches.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions