Merge remote-tracking branch 'origin/main' into duncan/workspace-scoped-agent-store-merge

* origin/main: (24 commits)
  fix(reactions): support max-length custom emoji (#3833)
  feat(desktop): allow leaving your final community (#3621)
  fix(buzz-agent): recover from context-window 400s instead of sticking (#4946)
  docs(persona-pack): fix stale desktop import instructions (#4500)
  fix(desktop): route macos notification clicks (#4799)
  feat(mobile): sync themes per community (#3767)
  feat(desktop): sync themes per community (#3653)
  feat(desktop): cap OpenClaw agent parallelism at 5 (#4019)
  fix(buzz-agent): scope handoff cap per turn, not per session lifetime (#4805)
  Fix mobile message timeline bounce (#4862)
  Polish mobile bottom sheets and profile cards (#4911)
  Fix media attachment actions (#4849)
  fix(desktop): remove join API token control (#4897)
  fix(desktop): allow shared agent mentions (#4913)
  Polish mobile top navigation (#4778)
  fix(release): tag immutable desktop candidates (#4811)
  fix(channels): restrict private-channel invitations (#4612)
  fix(acp): reject unattended permission requests (#4609)
  fix(workflow): bind trigger author to the signed event (#4607)
  fix(git): revoke access for banned relay members (#4608)
  ...

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>

# Conflicts:
#	desktop/src-tauri/src/managed_agents/runtime.rs
This commit is contained in:
Duncan
2026-08-05 17:32:58 -04:00
220 changed files with 17677 additions and 2634 deletions

View File

@@ -98,6 +98,7 @@ export function useCommunityInit(
activeCommunity: Community | null,
communityKey: string,
isSharedIdentity: boolean,
suppressAutoConnect = false,
): CommunityInitResult {
const [result, setResult] = useState<CommunityInitResult>({
isReady: false,
@@ -123,6 +124,15 @@ export function useCommunityInit(
async function init() {
if (!activeCommunity) {
if (hasInitializedRef.current) {
if (prevCommunityIdRef.current) {
saveActiveAgentTurnsForCommunity(prevCommunityIdRef.current);
prevCommunityIdRef.current = null;
}
resetCommunityState({ resetAvatarState: true });
appliedRelayUrlRef.current = null;
hasInitializedRef.current = false;
}
try {
const defaultRelayUrl = await getDefaultRelayUrl();
const autoConnectDefaultRelay =
@@ -132,9 +142,10 @@ export function useCommunityInit(
// relay as the first community. Public builds retain community
// selection even when BUZZ_RELAY_URL is overridden at runtime.
if (
isSharedIdentity ||
(autoConnectDefaultRelay &&
shouldAutoConnectDefaultRelay(defaultRelayUrl))
!suppressAutoConnect &&
(isSharedIdentity ||
(autoConnectDefaultRelay &&
shouldAutoConnectDefaultRelay(defaultRelayUrl)))
) {
const identity = await getIdentity();
if (cancelled) return;
@@ -326,6 +337,7 @@ export function useCommunityInit(
activeCommunity?.token,
activeCommunity?.reposDir,
isSharedIdentity,
suppressAutoConnect,
communityKey,
]);