Skip to content

Add reversible diff context expansion #320

@omry

Description

@omry

Right now Expand N unchanged lines is one-way because expanding mutates the hunk structure. Add a corresponding collapse action so reviewers can re-fold expanded unchanged sections.

Requirements:

  • Support both leading folded context and gaps between hunks.
  • Restore the original hunk boundaries when collapsed.
  • Work in both split and unified diff views.
  • Preserve comment behavior and avoid breaking open comment forms on expanded lines.

Implementation note:

  • Prefer storing expand/collapse as UI state instead of destructively merging file.diffHunks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions