Skip to content

Support Github "Viewed" behavior in hunk #646

Open

Description

@webmonarch

What do you want to change?

Add a "file viewed" type option (how Github has) to allow a file that has already been reviewed (and not changed) to be collapsed by default

Why?

My PR review workflow is: look at a file, check if it makes sense, mark it as viewed, continue. This give me a measure of progress and see what remains, and reduces the noise when I need to review additions made to the branch.

How? (optional)

I have not reviewed the codebase, but it seems like it slots into a larger these of state between runs: #113 #504

Also tricky: in the context of a PR, what has been "viewed" is hear (the PR is a single context evolving over time), running hunk diff would need some way to correlate this run of hunk with a previous one in which the file was marked as viewed.

Activity

  1. iloveitaly commented on Jul 31, 2026

    @iloveitaly

    I like this idea, but I would prefer if hunk stored the state locally instead of being tied to GH for this.

  2. webmonarch commented on Jul 31, 2026

    @webmonarch
    Author

    @iloveitaly agreed! My wording might be ambiguous. The GH version is the desired UX, I expect all state to live in hunk only. No GitHub coupling.

  3. tenitski commented on Aug 20, 2026

    @tenitski

    Remembering state is great, but even the ability to collapse files and hunks would be a massive quality of life improvement when examining large diffs.

  4. bpshaver commented on Aug 24, 2026

    @bpshaver

    I would also like this. Is this something that could be accomplished by an extension?

  5. matt-heindel-gl commented on Aug 28, 2026

    @matt-heindel-gl

    Plus one. Collapsing files and hunks is a big missing feature IMO. Even better if state is persisted locally but not strictly necessary. I'm coming from using fugitive in NeoVim and this is what I miss the most.

  6. bpshaver commented on Aug 28, 2026

    @bpshaver

    @matt-heindel-gl I made this extension for myself: https://github.com/bpshaver/hunk-mark-viewed

    When I went back to the extensions community hub, I saw that someone else had beaten me to the punch by pushing a similar extension: https://github.com/evantravers/hunk-mark-as-reviewed

    Maybe one or the other of them will meet your needs!

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions