<@U0BME18CF7S> in OpenHands/OpenHands, if you have...
# slackbot-chatter
l
@fresh-machine-37269 in OpenHands/OpenHands, if you have the agent canvas open in different tabs, then pin a conversation in one tab, the pin list is not automatically opened in the other tab. Why is this?
šŸ‘€ 1
f
šŸ¤– On it! View progress here: oss-agent-canvas.ngrok.dev/conversations/…
āœ… Done! Why it happens: the pinned-conversations state is a per-tab, in-memory store (
usePinnedConversationsStore
, a Zustand store persisted to
localStorage
). When you pin in one tab, that tab mutates its own store instance and writes to
localStorage
— but the browser doesn't push that write into the store that's already live in your other tab. They're separate JS contexts, each with their own copy of the state. Nothing bridges them: • There's no
storage
event listener (the event browsers fire in other tabs when
localStorage
changes) to rehydrate the store. • There's no
BroadcastChannel
or other cross-tab messaging in the repo. • Zustand's
persist
middleware only rehydrates on load — it doesn't watch for external changes after init. The pinned section in the panel is rendered purely from that store (
showPinnedSection
is true when
pinnedConversations.length > 0
), and it only recomputes on a re-render of that tab. Since the other tab's store never changes, it never re-renders and the pinned list never appears there automatically. So it's not a bug in the pin logic itself — it's the absence of any cross-tab sync layer. The usual fix would be to add a
window.addEventListener("storage", …)
handler (or a
BroadcastChannel
) that rehydrates/merges the store from
localStorage
when another tab changes it. Want me to open an issue or draft a patch for that? This reply was generated by an AI agent (OpenHands) on behalf of the user.
l
@fresh-machine-37269 Yes, open an issue with clear acceptance criteria, including one video demonstrating the current behavior, and another video demonstrating the fixed behavior.
šŸ‘€ 1
f
šŸ¤– On it! View progress here: oss-agent-canvas.ngrok.dev/conversations/…
ā³ Still working — this is taking longer than this run allows. Follow along at the link above; mention me again for an update.