Skip to content

Add a files-only overview for narrow terminals #923

Description

@maxbeizer

What do you want to change?

Add a files-only review mode that temporarily replaces the diff workspace with the changed-file list.

Users should be able to:

  • Open the overview with a keyboard shortcut or View menu action.
  • Navigate and filter changed files.
  • Press Enter or click a file to return to the diff at that file.
  • Return to the overview without losing the current file selection or filter.

This should work when the terminal is too narrow to display the existing files pane beside the diff.

Why?

Hunk’s files pane provides a useful changeset overview on wide terminals, but responsive layout hides it when the window cannot fit both the pane and the minimum-width diff.

In narrow panes, users therefore cannot start from the changed-file list and drill into the file they want. The available alternatives are moving through files one at a time with , / ., filtering for a filename they already know, or leaving Hunk to run git diff --name-only.

I explored whether this could be implemented as an extension. Custom panes can replace hunk:files, but Hunk always reserves minimum space for the central review: side panes preserve its minimum width, while top and bottom panes preserve its minimum height. Extensions therefore cannot provide a true files-only workspace. ctx.dialogs.select() could approximate a file picker, but it would not reuse Hunk’s existing file-list and filtering experience.

A native files-only mode would preserve Hunk’s file-first review workflow in narrow terminals, multiplexer panes, and small screens.

How? (optional)

Treat the files pane as a workspace that can be temporarily maximized, rather than requiring it to remain docked beside the diff.

One possible interaction:

  1. Invoke View → Files overview or its shortcut.
  2. Render the existing files pane across the review workspace.
  3. Preserve its normal filtering and keyboard navigation.
  4. Press Enter or click a file to restore the diff and reveal that file.
  5. Invoke the action again to return to the overview.

This could potentially be implemented as a host-level “maximize pane” capability. If exposed through the extension API, it could also support full-workspace views from custom panes.

Related issues:

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions