Problem
With Agent Mode's sidebar open and the top-level New Task button enabled, selecting an existing task briefly dims and restores the button. It reproduces on current master; slower session loads make it more visible, and cross-project switches can produce an additional pulse. The behavior predates PR #745.
Cause and impact
Task selection enters the transient session-selection lock. That shared lock temporarily removes the sidebar's New Task callback, causing the button to become disabled with disabled:opacity-50; its opacity returns when loading finishes. This is cosmetic UI flicker rather than data loss or a correctness failure.
Safe direction
Preserve the session-selection lock and stale-load fencing, but decouple this short-lived state from the top button's visual dimming. Do not simply allow New Task during a cross-project transition: the committed project root still points to the previous project until selection finishes, which could create a task under the wrong project unless ownership is explicitly anchored.
Related: #645 covers the distinct Chat-to-Agent initialization flow.
Problem
With Agent Mode's sidebar open and the top-level New Task button enabled, selecting an existing task briefly dims and restores the button. It reproduces on current
master; slower session loads make it more visible, and cross-project switches can produce an additional pulse. The behavior predates PR #745.Cause and impact
Task selection enters the transient session-selection lock. That shared lock temporarily removes the sidebar's New Task callback, causing the button to become disabled with
disabled:opacity-50; its opacity returns when loading finishes. This is cosmetic UI flicker rather than data loss or a correctness failure.Safe direction
Preserve the session-selection lock and stale-load fencing, but decouple this short-lived state from the top button's visual dimming. Do not simply allow New Task during a cross-project transition: the committed project root still points to the previous project until selection finishes, which could create a task under the wrong project unless ownership is explicitly anchored.
Related: #645 covers the distinct Chat-to-Agent initialization flow.