Skip to content

File explorer visibly shifts left on folder open/close (followup to #112) #118

Description

@tavateva

Followup to #110 / PR #112. Minor, low priority.

Symptom

After PR #112 lands, expanding or collapsing a folder in the file explorer visibly shifts the panel contents to the left. Reported by @den-sq on merge review.

Suspected causes

Two candidates worth checking first:

  1. Chevron visibility rule change. PR feat(file-explorer): lazy per-directory watchers + deferred teardown #112 shows a chevron on every folder (lazy folders start empty until first expand — old visibility rule would have hidden them). If layout logic reserves space based on has-children state, the width can flip when children populate.
  2. Scrollbar reflow. Expanding populates the tree and can push it past the panel height, adding a vertical scrollbar and stealing horizontal pixels; collapsing removes it. Would explain the "shift back" on collapse if overflow: scroll (always reserve) vs overflow: auto (reserve on demand) is set inconsistently.

Repro

Fresh dev run, open the file explorer, expand any non-empty folder, then collapse it. Observe the contents jump horizontally.

Fix direction

Likely a small CSS change in DraggableEntry or the file-explorer panel container: either give the chevron column a fixed width regardless of children, or standardize on overflow-y: scroll / scrollbar-gutter: stable so the scrollbar space is always reserved.

Scope: cosmetic only, doesn't affect functionality. Filing so it doesn't get lost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions