You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a split-view layout, closing a tab in one split pane or removing a split pane does not reliably refresh the context note badge. The badge continues to show the closed or no-longer-focused note instead of reflecting the new active state.
Possibly related to #265 (stale badge after closing last markdown note), but the mechanism may be distinct — this involves transitioning between focused panes rather than closing the last markdown file. Root cause not fully confirmed; filing as a separate issue so the repro is captured while investigation continues.
Repro scenarios
Multiple variants observed. All show the same stale-badge symptom.
Variant A: Split with two markdown tabs, close one.
Open the ACP chat panel.
Split the editor (e.g., Cmd+Shift+\ or drag a tab) so two markdown panes are visible side by side, each with its own markdown note.
Close the tab in one of the split panes (via tab ×, Cmd+W, or context menu).
Observe the context badge.
Expected: Badge updates to reflect the surviving pane's active note.
Actual: Badge may continue to show the closed pane's note, or stay on whichever note was focused prior to the close.
Variant B: Split pane is collapsed.
Set up a split with two markdown panes as above.
Close all tabs in one of the panes, causing that entire split pane to disappear.
Observe the context badge.
Expected: Badge reflects the remaining pane's active note.
Actual: Badge stays on the previous note from the removed pane.
Suspected mechanism
The active-leaf-change event behavior may differ when a leaf is destroyed (via pane/tab close) versus when focus moves between existing leaves. Possibilities under investigation:
Event may fire with the wrong target leaf, or not fire at all on pane-collapse.
The listener in attachToView may be invoked with the old view during the destroy phase, before the new active leaf is resolved.
I haven't yet confirmed whether the two-part fix proposed in #265 addresses these cases — I plan to test once the #265 fix is cherry-picked into a local build.
Summary
In a split-view layout, closing a tab in one split pane or removing a split pane does not reliably refresh the context note badge. The badge continues to show the closed or no-longer-focused note instead of reflecting the new active state.
Possibly related to #265 (stale badge after closing last markdown note), but the mechanism may be distinct — this involves transitioning between focused panes rather than closing the last markdown file. Root cause not fully confirmed; filing as a separate issue so the repro is captured while investigation continues.
Repro scenarios
Multiple variants observed. All show the same stale-badge symptom.
Variant A: Split with two markdown tabs, close one.
Cmd+Shift+\or drag a tab) so two markdown panes are visible side by side, each with its own markdown note.×,Cmd+W, or context menu).Expected: Badge updates to reflect the surviving pane's active note.
Actual: Badge may continue to show the closed pane's note, or stay on whichever note was focused prior to the close.
Variant B: Split pane is collapsed.
Expected: Badge reflects the remaining pane's active note.
Actual: Badge stays on the previous note from the removed pane.
Suspected mechanism
The
active-leaf-changeevent behavior may differ when a leaf is destroyed (via pane/tab close) versus when focus moves between existing leaves. Possibilities under investigation:attachToViewmay be invoked with the old view during the destroy phase, before the new active leaf is resolved.I haven't yet confirmed whether the two-part fix proposed in #265 addresses these cases — I plan to test once the #265 fix is cherry-picked into a local build.
Next steps
fix/context-note-stale-on-closebranch to determine whether bug: context note does not update when the active note is closed (stays stale) #265's fix already covers these cases.Filing now so the symptoms are captured and discoverable.
Environment
dev(b57ab6cat time of report)