VS Code extension: controls for edited-file expansion and hover previews

Open 💬 1 comment Opened Aug 13, 2026 by c0ldn3s5

What variant of Codex are you using?

IDE Extension (openai.chatgpt@26.5803.61601) in VS Code 1.133.0 on Linux.

What feature would you like to see?

Please add two independent display controls for edited-file cards:

  • Expand edited-file diffs by default
  • Show diff preview when hovering edited-file cards

Both behaviors should be independently configurable. My preferred defaults are disabled.

When disabled:

  • Edited-file cards remain collapsed until explicitly clicked.
  • Hovering a completed edited-file card does not open a large diff preview.
  • Clicking the filename, manually expanding the card, and using Review continue to work.

Additional information

In edit-heavy conversations, expanded diffs consume substantial vertical space. The hover preview can cover most of the conversation and interrupt reading merely because the pointer crosses the card.

I locally validated both UX changes against extension version 26.5803.61601: collapsed-by-default works, removing the completed-turn diff hover wrapper prevents the large preview, and manual expansion plus Review remain available. No proprietary extension bundles are attached.

A repository issue search for edited file card hover preview expand diff returned no matching report before submission.

View original on GitHub ↗

1 Comment

c0ldn3s5 · 14 days ago

Implementation note / validated fix shape

The installed extension currently renders edited-file details from the patch activity component. The minimal source-level implementation is:

const [expanded, setExpanded] = useState(
  settings.editedFilesExpandedByDefault,
);

The completed-turn card is conditionally wrapped in the single-file diff hover-preview component. Gate that wrapper independently:

const card =
  settings.editedFilesHoverPreviewEnabled && diff && firstChangedFile
    ? (
        <DiffHoverPreview
          diff={diff}
          disabled={disabled}
          displayPath={displayPath}
          linesAdded={firstChangedFile.linesAdded}
          linesRemoved={firstChangedFile.linesDeleted}
          onOpen={(event) => openDiff(firstChangedFile.path, event)}
        >
          {completedTurnCard}
        </DiffHoverPreview>
      )
    : completedTurnCard;

Suggested settings schema:

{
  "chatgpt.editedFiles.expandedByDefault": {
    "type": "boolean",
    "default": false,
    "description": "Expand edited-file diffs automatically in Codex conversations."
  },
  "chatgpt.editedFiles.hoverPreviewEnabled": {
    "type": "boolean",
    "default": false,
    "description": "Show a diff preview when hovering completed edited-file cards."
  }
}

In extension 26.5803.61601, I validated the equivalent compiled changes:

  1. Change the edited-file expansion state initializer from true to false.
  2. Return the completed-turn card directly instead of wrapping it in the diff hover-preview component.

Acceptance checks:

  • A completed edit initially shows only its compact summary.
  • Moving the pointer across the card never opens a preview when hover previews are disabled.
  • Clicking the disclosure still expands/collapses the inline diff.
  • Clicking the filename and Review still opens the normal review surface.
  • Enabling either setting does not implicitly enable the other.

This is the complete behavioral fix; no backend or protocol changes are required.