feat: launch readiness — PWA, API hardening, memory leak fixes, sticker removal

- Add PWA infrastructure: vite-plugin-pwa, manifest, service worker,
  SW update prompt component, placeholder icons, Apple meta tags
- Harden API client: 401 auto-logout, AbortController timeouts
  (30s standard, 120s uploads), onUnauthorized callback
- Fix memory leaks: clear voice user status on leave, clean up all
  Maps (channelToSpaceMap, permissions, etc.) on removeSpace
- Upgrade error boundary to Aether Drift design with Try Again button,
  collapsible stack trace, and componentDidCatch logging
- Configure desktop icon paths in electron-builder.yml
- Remove sticker feature (server routes, schema, types, UI components)
- Fix Docker build: use **/node_modules in .dockerignore to prevent
  COPY from clobbering pnpm-installed workspace dependencies
- Add vite-env.d.ts declarations for noise suppressor wasm imports
- Exclude test files from tsc build via tsconfig
This commit is contained in:
Jannis Braun
2026-03-15 15:41:22 +01:00
parent b08f40feb7
commit 4d230711fc
36 changed files with 2740 additions and 1283 deletions
+31 -4
View File
@@ -408,10 +408,37 @@ export const useSpaceStore = create<SpaceState>((set, get) => ({
},
removeSpace: (spaceId: string) => {
set((state) => ({
spaces: state.spaces.filter(s => s.id !== spaceId),
currentSpaceId: state.currentSpaceId === spaceId ? null : state.currentSpaceId,
}));
set((state) => {
// Collect channel IDs belonging to this space for map cleanup
const channelIdsToRemove = new Set<string>();
for (const [channelId, sid] of state.channelToSpaceMap) {
if (sid === spaceId) channelIdsToRemove.add(channelId);
}
const channelToSpaceMap = new Map(state.channelToSpaceMap);
const channelPermissions = new Map(state.channelPermissions);
const channelOriginMap = new Map(state.channelOriginMap);
const channelLastMessageIds = new Map(state.channelLastMessageIds);
const spacePermissions = new Map(state.spacePermissions);
for (const channelId of channelIdsToRemove) {
channelToSpaceMap.delete(channelId);
channelPermissions.delete(channelId);
channelOriginMap.delete(channelId);
channelLastMessageIds.delete(channelId);
}
spacePermissions.delete(spaceId);
return {
spaces: state.spaces.filter(s => s.id !== spaceId),
currentSpaceId: state.currentSpaceId === spaceId ? null : state.currentSpaceId,
channelToSpaceMap,
channelPermissions,
channelOriginMap,
channelLastMessageIds,
spacePermissions,
};
});
},
updateMemberPresence: (userId: string, status: string) => {