Skip to content

Narrow window: context and review panels squeeze side by side, text clips at panel edges #1985

Done

Description

@xiyeming

Summary

With the window resized very narrow (portrait, ~330 px wide), the context panel (上下文, the details plugin) and the review panel (Git 变更) render side by side, each squeezed to ~165 px. Text in both panels clips mid-character at the panel edges instead of wrapping or scrolling.

Reproduce

  1. Open a session.
  2. Open the context panel (上下文) and the review panel (Git 变更) so they show side by side.
  3. Resize the window narrow (~330 px wide, well below the 768 px narrow breakpoint).

What happens

  • Both panels stay side by side, splitting the width equally.
  • Panel content clips at the edges: e.g. the review empty-state "项目变更将显示在此处" is cut off mid-character at the right edge; the context panel's "No changed files. Use Open file to browse the workspace." wraps awkwardly in the ~165 px column.
  • The top toolbar's icons also crowd together.

Expected

At widths below the narrow breakpoint (768 px), the window should use the narrow single-view layout (one view at a time, switchable via the tab bar — per features/narrow), rather than splitting two panels side by side below their usable width. Alternatively, panels should enforce a minimum width and let the overflow scroll, never clipping text mid-character.

Environment

  • OS: Linux (CachyOS/Arch, Wayland/Hyprland)
  • Window width at the time: ~330 px (portrait)

(Screenshot available on request.)

Activity

  1. Hona commented on Dec 1, 2026

    @Hona
    Member

    Fixed in #1997 (merged to dev at f8f50245).

    What changed:

    • ui.panelSidebar (used by the Review and Files side panels) now switches to a single full-width pane when the panel width drops below 420 pt instead of squeezing its 200 pt file sidebar and main pane side by side, while preserving the wide-window sidebarOpened preference across resizes and returning to the main pane when picking a file.
    • Added clipping (.clip_soft(0.0)) on ui.panelSidebar body, sidebar, and main containers to prevent content bleeding across pane edges.
    • Added explicit text wrapping on empty, loading, error, and stat labels across Review, Files, Context, Details, narrow Changes, and empty side panes, and made Review's source picker and toolbar shrink cleanly with tighter spacing in narrow panels.

    Verification:

    • Verified locally with pwsh scripts/guardrails.ps1 (11/11 passed), cargo check -p opencode-feature-review -p opencode-feature-panels -p opencode-desktop --lib --bins, and cargo clippy on the touched crates/files.
    • Interactive GUI resizing on Linux (Wayland/Hyprland) was not run on this machine. Please reopen if you still see panels squeezing or text clipping after updating to f8f50245 or later.
  2. added a commit that references this issue on Dec 1, 2026
    f8f5024
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions