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
{{ message }}
Repository navigation
[BUG] Title-bar commands act on the wrong provider instance when sidebar and editor tab coexist #1529
Tracking series: vps2 durable per-view state — easonLiangWorldedtech#41 (fix unit F0). Fix: draft PR #1528 (this issue is the issue of record for that PR, created at PR-open time).
Summary
With the Zoo Code sidebar and an "Open in editor" tab open at the same time, the title-bar commands (+ / Settings / History / Marketplace / popout / focus input) do not reliably act on the instance the user clicked. The commands are wired to a single surface-blind "visible" provider, and the panel bookkeeping mutates shared slots.
Repro
Open the Zoo Code sidebar; start a task.
Open a second Zoo Code view via "Open in editor" (or the popout command). A new ClineProvider + WebviewPanel is created.
Click the title-bar buttons (Settings / History / Marketplace / +) on the sidebar and on the editor tab title bars.
Mutual panel wipe: setPanel writes null into the other panel slot on every resolve (and the sidebar's onDidDispose never clears its slot) — the sidebar/tab slot references drift out of sync as the two views coexist.
No tab reuse: every "Open in editor" creates a fresh provider + panel even when a live tracked tab already exists.
Surface-blind targeting: the five title-bar commands are contributed to both view/title and editor/title, yet all of them resolve the target via the insertion-order "last visible" provider — so a click on the tab's title bar can execute against the sidebar instance (or vice versa), posting settings/history/marketplace/plus actions to the wrong webview.
focusPanel: resolves tab-first from the same drifted slots (self-corrects once the wipe is fixed).
Impact
User actions land in the wrong view instance: a Settings click on the tab can open settings on the sidebar, a + on the tab can evict the sidebar's task, and focus commands target the wrong surface. State written by those actions is attributed to the wrong view.
sidebar title-bar handlers target the click-origin provider;
four new *InTab command ids rewire the editor/title menu; tab handlers resolve the owning instance via the new ClineProvider.getInstanceForView(panel);
openClineInNewTab reuses the live tracked tab panel;
focusInput post condition narrowed to sidebarPanel && !tabPanel.
Known limitation documented in the PR: zoo-code.newTask (command palette) stays on the visible-provider path (focus-sidebar fallback).
Activity
fix(activate): scope palette commands to their surface and pin the fo…
style(activate): bring the touched files under the repo format gate