Skip to content

File bar: the viewer's Wrap toggle may be pushed past the bar's edge in a narrow side panel #745

Open

Description

@SSFSKIM

What is suspected

In a file's bar (src/renderer/src/tools/code/viewer/FileViewer.tsx), the group at the bar's end, data-bar-controls, is a flex row that does not wrap and holds two parts: the editor's controls and the viewer's own Controls span (Rendered/Source, Wrap, zoom). The Controls span is flex min-w-0 flex-wrap, so when the bar is short of room it gives up a share of the shortfall, while its Wrap button keeps its own width. The button then reaches past the span, and past the bar's edge, where the pane clips it.

Evidence, and its limit

Seen by the builder of the editor-notice fix (UX wave U1c) in a replica of the bar's CSS classes rendered in a headless browser, with system fonts: the Wrap button reached outside the bar at bars of 460 px or less with the merge view's controls shown, and 300 px or less with the changed-on-disk notice's controls shown. The position was the same before and after the notice fix, so this predates it. In the replica, shrink-0 on the Controls span removed the overflow at every width tried (200 to 600 px) and the notice still wrapped.

Not measured in the app. The file open in the side panel at the panel's narrowest width, with unsaved edits and a changed disk copy, is where it would show.

What done looks like

  • A scene (or an addition to the existing changed-on-disk scenes, which already narrow the panel) that asserts the Wrap toggle's box lies inside the bar at the panel's narrowest width, failing first if the suspicion is right.
  • The layout change that keeps every control of the bar inside it, each whole, with DOM and tab order unchanged and nothing moved at a width where everything fits.
  • If the scene passes on today's code, close this ticket with the measured numbers.

Not in scope

The notice sentences' wrapping (done in U1c); which controls the bar offers.

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P3
    on Nov 17, 2026
  2. SSFSKIM commented on Nov 17, 2026

    @SSFSKIM
    OwnerAuthor

    From the review of the editor-notice fix (U1c, head 3c72dcb): the shared scene helper e2e/support/editor-notice.ts checks that the reason is visible and that its scrollWidth is no more than its clientWidth. For a sentence that wraps, that shows no horizontal overflow inside the element's own box; it does not show that an ancestor does not clip a wrapped line, nor that the element lies inside the bar. When this ticket's scene is written, the helper should also assert that the reason's box and each control's box lie inside the bar's box, at both widths.

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

    bugpriority:P3status:ready-for-implementer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions