mirror of
https://github.com/block/buzz.git
synced 2026-11-02 15:31:27 +00:00
Merge remote-tracking branch 'origin/main' into sandro/mesh-compute-view
* origin/main: fix(buzz-agent): classify read timeouts distinctly in LLM error messages (#4959) Refine agent runtime controls (#5026) test(desktop): await thread scroll anchor (#3174) Improve desktop mobile pairing flow (#5024) feat(desktop): show selected community in rail (#5000) fix(desktop): stop rate-limited reconnect backfill from tearing down the authenticated socket (#4990) fix(desktop): skip native notifications outside app bundles (#5004) ci: prove the relay-driven mesh lifecycle — discover, join, infer, deny — with real nodes (#3862) fix(desktop): virtualize channel member lists (#4991) fix(desktop): enforce owner-only access in internal builds (#4053) test(desktop): match attachment button label (#4993) fix(acp): pace observer telemetry at 1/s with per-channel batch envelopes (#4917) fix(desktop): enable the content security policy (#4614) Signed-off-by: Alessandro Joabar <sandro@squareup.com>
This commit is contained in:
@@ -444,6 +444,8 @@ type E2eConfig = {
|
||||
model: string | null;
|
||||
preferred_runtime?: string | null;
|
||||
};
|
||||
/** Explicit owner-only agent-access capability; independent of baked defaults. */
|
||||
ownerOnlyAccessBuild?: boolean;
|
||||
/** File-layer config returned by runtime id. */
|
||||
runtimeFileConfigs?: Record<string, RuntimeFileConfigSubset | null>;
|
||||
/** Baked build env returned by the display and key-name Tauri commands. */
|
||||
@@ -1209,6 +1211,8 @@ declare global {
|
||||
) => void;
|
||||
/** Inject CLOSED into every active mock live subscription. */
|
||||
__BUZZ_E2E_CLOSE_LIVE_SUBSCRIPTIONS__?: (reason: string) => number;
|
||||
/** Queue CLOSED responses for channel history REQs. */
|
||||
__BUZZ_E2E_QUEUE_CHANNEL_HISTORY_CLOSES__?: (reasons: string[]) => void;
|
||||
__BUZZ_E2E_SET_STALL_WEBSOCKET_SENDS__?: (stall: boolean) => void;
|
||||
__BUZZ_E2E_DISCONNECT_MOCK_WEBSOCKETS__?: () => number;
|
||||
__BUZZ_E2E_RESTART_MOCK_WEBSOCKETS__?: () => number;
|
||||
@@ -2967,6 +2971,7 @@ const mockPersonaEvents: RelayEvent[] = [];
|
||||
let mockRelayMembers: RawRelayMember[] = [];
|
||||
const mockSockets = new Map<number, MockSocket>();
|
||||
const mockAuthResponses: Array<{ success: boolean; message: string }> = [];
|
||||
const mockChannelHistoryCloses: string[] = [];
|
||||
let mockWebsocketUnavailable = false;
|
||||
const relayWebsocketConnectAttemptStarts: number[] = [];
|
||||
let mockWebsocketSendMutexWedged = false;
|
||||
@@ -9709,6 +9714,13 @@ function sendToMockSocket(args: {
|
||||
}
|
||||
|
||||
const channelId = filter["#h"]?.[0];
|
||||
if (channelId && subId.startsWith("history-")) {
|
||||
const closeReason = mockChannelHistoryCloses.shift();
|
||||
if (closeReason) {
|
||||
sendWsText(socket.handler, ["CLOSED", subId, closeReason]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!channelId) {
|
||||
// Aux-backfill filters (reactions/deletions) are `#e`-keyed with no
|
||||
// channel tag — serve them across all channel stores like the relay.
|
||||
@@ -9963,6 +9975,7 @@ export function maybeInstallE2eTauriMocks() {
|
||||
mockClosedChannelLiveSubscription = false;
|
||||
mockWebsocketUnavailable = false;
|
||||
mockAuthResponses.length = 0;
|
||||
mockChannelHistoryCloses.length = 0;
|
||||
relayWebsocketConnectAttemptStarts.length = 0;
|
||||
deferredSendMessageLiveEchoes.length = 0;
|
||||
mockGlobalAgentConfig = config.mock?.globalAgentConfig
|
||||
@@ -10206,6 +10219,9 @@ export function maybeInstallE2eTauriMocks() {
|
||||
window.__BUZZ_E2E_QUEUE_AUTH_RESPONSES__ = (responses) => {
|
||||
mockAuthResponses.push(...responses);
|
||||
};
|
||||
window.__BUZZ_E2E_QUEUE_CHANNEL_HISTORY_CLOSES__ = (reasons) => {
|
||||
mockChannelHistoryCloses.push(...reasons);
|
||||
};
|
||||
window.__BUZZ_E2E_CLOSE_LIVE_SUBSCRIPTIONS__ = (reason) => {
|
||||
let closed = 0;
|
||||
for (const socket of mockSockets.values()) {
|
||||
@@ -12419,6 +12435,8 @@ export function maybeInstallE2eTauriMocks() {
|
||||
}
|
||||
case "get_baked_build_env_keys":
|
||||
return (config?.mock?.bakedBuildEnv ?? []).map((entry) => entry.key);
|
||||
case "agent_access_owner_only":
|
||||
return config?.mock?.ownerOnlyAccessBuild ?? false;
|
||||
case "update_managed_agent":
|
||||
return handleUpdateManagedAgent(
|
||||
payload as Parameters<typeof handleUpdateManagedAgent>[0],
|
||||
|
||||
Reference in New Issue
Block a user