Skip to content

[BUG] [v1.1.0] AuxiliarySidebar: onVisibilityChange runs on mount, not only on visibility changes #39592

@tubel-hi

Description

@tubel-hi

Project

ide

Description

createEffect subscribes to auxiliaryBar.visible() and calls props.onVisibilityChange?.(visible) every time the effect runs, including its first run when the component mounts. That notifies consumers of the initial visibility as if it were a user-driven change, even though nothing toggled yet.

Error Message

Debug Logs

System Information

OS: Ubuntu
Context: Bounty Challenge v1.1.0

Screenshots

9.webm

Steps to Reproduce

Mount AuxiliarySidebar with an onVisibilityChange handler (e.g. log or state update).
Do not change auxiliary bar visibility.
Observe whether the handler runs on first paint.

Expected Behavior

onVisibilityChange runs only when visibility changes after mount (or behavior is documented as including initial sync).

Actual Behavior

Handler runs immediately on mount with the current auxiliaryBar.visible() value.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingideIssues related to IDEvalidValid issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions