openai / openai/codex

Add Compact and Full response views with collapsible Markdown sections

Open
#42,692 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app enhancement
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What variant of Codex are you using?

App (Desktop)

What feature would you like to see?

Summary

Add two interchangeable presentation modes for long assistant responses:

  1. Compact / Outline view — shows the outcome, section hierarchy, and short section summaries, with detailed content collapsed.
  2. Full view — shows the complete response while still allowing headings, code blocks, logs, and other long sections to be collapsed.

The complete response should remain available in both modes. Switching views should only change how the content is presented and should not require regenerating the answer or making another model call.

Problem

Codex often produces complete, well-structured answers containing implementation details, code, command output, explanations, caveats, and multiple levels of Markdown headings.

The problem is not simply that these answers are long. The interface requires users to visually consume the entire answer in its generated order.

For many tasks, I initially need only:

  • the outcome;
  • the most important conclusions;
  • the overall structure;
  • warnings or decisions requiring attention;
  • the ability to inspect selected details on demand.

I may want the implementation details later, but I do not necessarily want every paragraph, code block, and lower-level section occupying the conversation immediately.

Proposed solution

1. Make Markdown headings collapsible

Treat H1–H4 headings as nested disclosure sections.

  • An H1 toggle controls its content until the next H1.
  • H2 and lower headings become nested toggles.
  • Users can expand or collapse individual sections.
  • Provide Expand all and Collapse all actions.
  • Preserve section state while scrolling or switching views.

The response itself would therefore function as both the document and its outline.

2. Add Compact and Full view modes

Provide a response-level view switch.

Compact / Outline
  • Always show the overall outcome or summary.
  • Show the H1/H2 hierarchy.
  • Show a short summary or status for each major section.
  • Collapse detailed paragraphs and lower-level sections by default.
  • Allow any section to be expanded in place.
Full
  • Display the complete response.
  • Keep section toggles available.
  • Allow long code blocks, logs, diffs, and verbose supporting material to remain collapsed until requested.

Users should be able to switch between the two modes at any time without losing content.

3. Automatically collapse high-volume content

The following content could be collapsed independently, especially in Compact view:

  • long code blocks;
  • command output and logs;
  • large diffs;
  • file contents;
  • long lists;
  • verbose supporting explanations;
  • lower-level implementation details.

Each collapsed block should display a useful preview, such as its type, size, language, status, or a short summary.

Examples:

  • Code · TypeScript · 84 lines
  • Test output · 2 passed · 1 warning
  • Implementation details · 5 subsections
  • Supporting explanation · 12 paragraphs

Intelligent section summaries

For Compact view to be genuinely useful, each major section should expose a concise summary rather than only its heading.

This could be produced as part of the original response structure, without requiring a second model call. The UI would then use that information to render Compact view while preserving the complete underlying response.

The most important outcome should remain visible at the top instead of relying solely on Markdown heading level to determine importance.

Why this is different from #37256

#37256 proposes a clickable outline for navigating a fully displayed response.

That would improve navigation, but it would not reduce the amount of information initially shown. Users would still be presented with the complete body of the response.

This request is about progressive disclosure: keeping the complete answer available while allowing users to begin with its outcome and structure, then selectively expand the details they actually need.

#37256 helps users navigate a fully expanded response. This request helps users avoid full expansion in the first place.

Collapsible headings could also satisfy much of the navigation need described in #37256 because the response itself becomes an interactive outline.

Suggested acceptance criteria

  • Long responses offer Compact and Full presentation modes.
  • Switching modes does not regenerate the response or trigger another model call.
  • H1–H4 sections preserve their correct nesting hierarchy.
  • Sections can be expanded and collapsed independently.
  • Users can expand or collapse the entire response with one action.
  • The overall outcome remains visible in Compact view.
  • Major sections display useful summaries or status indicators.
  • Long code blocks, logs, diffs, and file contents can be collapsed independently.
  • Streaming content does not unexpectedly reset or reorder existing sections.
  • Expansion state is preserved when switching views.
  • All disclosure controls are keyboard accessible.
  • Short responses remain simple and are not unnecessarily converted into an outline.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are identified. Start by locating the desktop response-rendering entry point and existing Markdown handling, then review issue #37256 for related outline behavior. Done means implementing the stated Compact and Full modes, nested collapsible sections, preserved content and state, accessibility, and streaming-safe behavior without another model call.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.