From b8130c80035abc2b28d0b2f19347d16a40668559 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sat, 29 Aug 2026 12:08:21 +0200 Subject: fix(hub): chat kept stale messages when switching groups on the Chat tab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit App components were keyed by app name only (e.g. 'chat'), so switching groups while staying on the same tab reused the component instance — loadedRef stayed true and messages state was never cleared. Now keyed by app name + groupId, forcing a clean remount on group change. Co-Authored-By: Claude Opus 4.6 --- packages/meshbay-hub/src/meshbay_hub/static/group-page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/meshbay-hub') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js index dac0f45..acfcfc8 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js @@ -577,7 +577,7 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs, ${apps.map(a => tab === a.key && html` - <${a.Component} key=${a.key} ...${commonProps} /> + <${a.Component} key=${a.key + '-' + groupId} ...${commonProps} /> `)} ${tab === 'settings' && html` -- cgit v1.2.3