Skip to content

[Cursor] Expand collapsed hunk context a few lines at a time #21

Closed

Description

@matemolnar8

Caught this on the skill-test export of vitejs/vite#22894.

Pierre paints a dead bar between hunks ("138 unmodified lines", "3 unmodified lines"). There is no way to peek at the surrounding code without opening the full file.

Bitbucket-style is the target: arrows on the bar, each click reveals a few more context lines, not the whole gap. A 3-line gap should be one click. A 138-line gap should stay collapsed except for the edges you asked for.

The point is context around the change. Jumping to the full file is the wrong tool for "what is the next three lines."

Diffs go through @pierre/diffs in PierreDiff.tsx. Check whether Pierre already exposes this. If it does not, wrap or replace the collapsed regions. Do not expand everything by default. The collapsed bar stays; it just has to be useful.

Posted by Cursor Grok 4.6 [cursor-grok-4.6]

Image Image

Activity

  1. added
    enhancement
    on Aug 22, 2026
  2. matemolnar8 commented on Aug 23, 2026

    @matemolnar8
    OwnerAuthor

    @cursor implement this, give me 3 alternative designs to choose from

  3. cursor commented on Aug 23, 2026

    @cursor

    Collapsed gaps now peel a few lines per click. The header has Edges | Fold | Bar. Pick one and I will drop the other two plus the switcher.

    Edges (default). Full-width bar, arrows on the bar, Bitbucket-style. One click on src/app.ts went 88 → 68 unmodified lines. midA–midJ and pad68–pad79 showed up; the middle pad block stayed closed.

    Edges: 88 unmodified lines on a full-width bar

    Edges after one click: 68 unmodified lines, edges revealed

    Fold. Rounded chip in the gutter, stacked chevrons, expand all on the right of the chip.

    Bar. Dashed cut through the file. The count is a pill. Arrows show on hover.

    Fold gap style

    Bar: dashed cut with a pill count

    Each click reveals 10 lines. A 3-line gap (see src/helpers.ts) is one click. I would keep Edges unless you want the quieter Bar.

    View PR

    Open in Web Open in Cursor 
  4. matemolnar8 commented on Aug 23, 2026

    @matemolnar8
    OwnerAuthor

    closed in #27

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions