Skip to content

[Feature]: Close sidebars and preview panels when dragged below a width threshold #14330

Description

@lenard-d

Problem or use case

I want to hide a sidebar or preview panel by dragging its resize handle past a close threshold. This should work for the left project/thread sidebar and the right panels used for browser previews, files, Markdown previews, and the file tree.

PR #11371 proposes this interaction for the bottom terminal drawer. This request extends the same interaction to the side panels.

Proposed behavior

  • Keep a useful minimum width while a panel is open.
  • When the user keeps dragging inward past a close threshold, close the panel completely and return its space to the chat.
  • Use the panel's existing open/closed state so its toggle and keyboard shortcut stay consistent.
  • If the user reverses direction during the same drag, reopen the panel. Avoid repeated open/close changes near the threshold.
  • Save the last usable open width. Reopening should restore that width instead of a zero or very narrow width.
  • Hiding a panel should preserve its open tabs and content state.

For the left sidebar, dragging the divider toward the left edge should hide it. For a right-side preview panel, dragging the divider toward the right edge should hide it. Apply the same rule to an independently resizable file-tree pane.

Interaction reference

The ChatGPT desktop app is the reference: dragging a sidebar inward past its minimum width makes it disappear. A close threshold around half the minimum open width would be a useful starting point. The exact value can follow T3 Code's layout constraints.

Smallest useful scope

Add this behavior to the existing left sidebar and right preview panel resize handles. No new pane layout system or settings are needed.

Related work

I searched existing issues, PRs, and discussions and found no exact match for these side panels.

Activity

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