chore: gitignore installers and include pending web changes
Add installers/ to .gitignore and remove from tracking — binaries should not be in git. Also includes: - Re-push Electron activities after WebSocket reconnect (sleep/wake) - Merge activity map instead of replacing to preserve local state - Nori mascot design plan
This commit is contained in:
@@ -5,6 +5,7 @@ node_modules/
|
|||||||
# Build output
|
# Build output
|
||||||
dist/
|
dist/
|
||||||
dist-electron/
|
dist-electron/
|
||||||
|
installers/
|
||||||
packages/web/dist/
|
packages/web/dist/
|
||||||
packages/server/dist/
|
packages/server/dist/
|
||||||
packages/shared/dist/
|
packages/shared/dist/
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { useChatStore } from '../stores/chatStore';
|
|||||||
import { useVoiceStore } from '../stores/voiceStore';
|
import { useVoiceStore } from '../stores/voiceStore';
|
||||||
import { useSocialStore } from '../stores/socialStore';
|
import { useSocialStore } from '../stores/socialStore';
|
||||||
import { useSettingsStore } from '../stores/settingsStore';
|
import { useSettingsStore } from '../stores/settingsStore';
|
||||||
import type { ServerEvent, ClientEvent, ActiveCallInfo } from '@backspace/shared';
|
import type { ServerEvent, ClientEvent, ActiveCallInfo, Activity } from '@backspace/shared';
|
||||||
import { resolveAssetUrl, normalizeUserAssets, normalizeMessageAssets } from '../utils/assetUrls';
|
import { resolveAssetUrl, normalizeUserAssets, normalizeMessageAssets } from '../utils/assetUrls';
|
||||||
import { broadcastVoiceStatus, broadcastDeafenViaLiveKit } from '../utils/voice';
|
import { broadcastVoiceStatus, broadcastDeafenViaLiveKit } from '../utils/voice';
|
||||||
import { registerSelfId } from '../utils/identity';
|
import { registerSelfId } from '../utils/identity';
|
||||||
@@ -214,6 +214,17 @@ function handleEvent(origin: string, event: ServerEvent): void {
|
|||||||
useActivityStore.setState({ showActivity: event.user.showActivity });
|
useActivityStore.setState({ showActivity: event.user.showActivity });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Re-push local Electron activities after reconnect (sleep/wake, network blip, etc.)
|
||||||
|
// The process scanner keeps running but onActivityDetected only fires on change,
|
||||||
|
// so if the same app was active before and after sleep, nothing would re-push.
|
||||||
|
if (isHome && window.backspace?.getCurrentActivity) {
|
||||||
|
window.backspace.getCurrentActivity().then((activity: unknown) => {
|
||||||
|
if (activity) {
|
||||||
|
useActivityStore.getState().pushActivities([activity as Activity]);
|
||||||
|
}
|
||||||
|
}).catch(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
// Populate voice user statuses (mute/deafen/camera/screenshare) from server
|
// Populate voice user statuses (mute/deafen/camera/screenshare) from server
|
||||||
if (event.voiceUserStates) {
|
if (event.voiceUserStates) {
|
||||||
for (const [uid, status] of Object.entries(event.voiceUserStates)) {
|
for (const [uid, status] of Object.entries(event.voiceUserStates)) {
|
||||||
|
|||||||
@@ -41,13 +41,17 @@ export const useActivityStore = create<ActivityState>((set, get) => ({
|
|||||||
},
|
},
|
||||||
|
|
||||||
initActivities: (activityMap) => {
|
initActivities: (activityMap) => {
|
||||||
const next = new Map<string, Activity[]>();
|
set((state) => {
|
||||||
|
const next = new Map(state.userActivities);
|
||||||
for (const [userId, activities] of Object.entries(activityMap)) {
|
for (const [userId, activities] of Object.entries(activityMap)) {
|
||||||
if (activities.length > 0) {
|
if (activities.length > 0) {
|
||||||
next.set(userId, activities);
|
next.set(userId, activities);
|
||||||
|
} else {
|
||||||
|
next.delete(userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set({ userActivities: next });
|
return { userActivities: next };
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
setShowActivity: (show) => {
|
setShowActivity: (show) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user