[Codex Desktop][Windows] Plain code file preview always wraps lines and provides no way to disable it

Open 💬 0 comments Opened Jul 21, 2026 by zhatlas

Summary

The built-in full-file code preview/editor in Codex Desktop always soft-wraps long logical lines, and this specific surface provides no way to turn wrapping off.

This report concerns the plain source-code file tab that shows:

  • a workspace breadcrumb and filename
  • the file-tree/folder button
  • the Open dropdown (for example, Open in VS Code)
  • syntax-highlighted source with line numbers

It is not the Review diff, a chat-embedded diff, or the rendered Markdown document viewer.

Environment

  • Codex Desktop: 26.715.8383.0
  • Platform: native Windows local workspace
  • Windows: Windows 10 Pro 22H2, build 19045.6456, x64
  • Reproduced with: a Java source file (.java)

Steps to reproduce

  1. Open a local repository in Codex Desktop.
  2. Open a source file such as a .java file in the built-in full-file preview/editor tab.
  3. Navigate to a line that is wider than the available preview pane.
  4. Observe that the logical source line is automatically split across multiple visual rows.
  5. Inspect the file header:
  • the file-tree/folder button is present;
  • the Open dropdown is present;
  • there is no file-viewer options (...) button and no word-wrap control.
  1. Right-click directly inside the code area.
  2. Observe that the context menu only exposes the native browser action (for example, Select All). It does not contain Toggle line wrap or a similar command.
  3. Check Codex settings and the documented config.toml options; there is no setting for this viewer's line wrapping.

Actual behavior

  • Long source-code lines always soft-wrap at the pane boundary.
  • Continuation rows appear without a new source line number, confirming that this is visual wrapping rather than a real newline.
  • The file header, context menu, settings, and keyboard shortcuts expose no way to disable wrapping.
  • The behavior differs from the Review diff surface, where code can remain on one logical row and be inspected using horizontal scrolling.

Expected behavior

The plain-code file preview/editor should provide a way to disable line wrapping.

A suitable implementation could include one or more of:

  • a Wrap lines / Do not wrap lines item in the file header;
  • a Toggle line wrap context-menu action;
  • a keyboard shortcut;
  • a documented app setting.

When wrapping is disabled, each logical source line should remain on one visual row and the viewer should provide horizontal scrolling. The selection should ideally persist globally or per workspace.

For source code, no-wrap would be a reasonable default, but a persistent user-controlled toggle would address both preferences.

Diagnostic evidence

A read-only inspection of the frontend bundle shipped with Codex Desktop 26.715.8383.0 suggests that this view uses the CodeMirror-based text-file editor and adds the lineWrapping extension unconditionally.

The same bundle contains word-wrap controls and a persisted wrapCodeDiff.2 state for a separate Review/source-diff renderer. Those controls are not rendered for the plain-code file editor shown here. This explains why searching the bundle reveals a toggle even though the actual UI in this reproduction has neither the ... menu nor the custom diff context menu.

Impact

This makes wide source files significantly harder to inspect in Codex Desktop:

  • indentation and alignment are obscured;
  • long Java/Kotlin method calls and argument lists become difficult to compare;
  • horizontally aligned code and generated source are misleading;
  • reviewing a full file behaves differently from reviewing its diff.

Current workaround

Use the Open dropdown to open the file in VS Code or another editor and disable word wrap there. This leaves the Codex Desktop workflow and is therefore only a workaround, not a fix.

Related issues

  • #33096 requests an independent wrap toggle for the rendered Markdown document viewer. This report is different: it reproduces in the plain source-code file preview/editor with a .java file.
  • #19985 concerns code/text previews inside threads and requested wrapping for previously unwrapped content; it was closed after a toggle appeared on that other surface.
  • #22671 concerns chat-embedded file diffs, not the full-file editor described here.

A current search for plain code, text file editor, CodeMirror lineWrapping, and file preview Disable word wrap did not find an existing issue for this exact surface.

View original on GitHub ↗