Skip to content

Support hierarchical Diff lenses for multi-part changes #622

Description

@DCjanus

Problem

Diff lenses make a large change easier to review by grouping related parts of the diff. Today, the lenses appear in a flat list. For a PR with several capabilities, each built from smaller implementation and test changes, that list does not show how the parts fit together. A reviewer has to infer the hierarchy from lens names and switch between several lenses to see the scope of one capability.

For example, Sarama PR #3419 adds two related Kafka admin operations: ListOffsets and AlterConsumerGroupOffsets. Each has its own API, implementation, and tests, while some changes are shared. A useful review outline would look like this:

KIP-396 offset management
├── ListOffsets
│   ├── API and result model
│   ├── Broker fan-out and errors
│   └── Unit and functional tests
├── AlterConsumerGroupOffsets
│   ├── API and protocol version
│   ├── Coordinator commit and retry
│   └── Unit and functional tests
└── Shared test setup and imports

ListTopics retry helper change

Possible direction

A collapsible tree in the Diff sidebar could show capability/subfeature relationships while keeping simple changes flat. A reviewer could start with a capability-level overview, then narrow down to an implementation step or its tests without losing the structure of the PR.

The details need more thought: what selecting a parent should show, how counts and review progress should handle overlapping ranges, how shared changes should appear, and when an agent should create a hierarchy. I am opening this issue to discuss the idea rather than to propose a finished design.

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