Every previously-reported bug from the three QA rounds is now addressed (BUG-11 and BUG-15 mitigated rather than fully solved — see spec for why). Verified end-to-end on talkhub/matrix after each change. Security: - BUG-21: @fastify/helmet registered, CORS origin allowlist (APP_BASE_URL + localhost:5173) replaces `origin: true`. Verified: own origin gets CORS + HSTS/nosniff/X-Frame-Options headers, foreign origins get none. - BUG-13: GET /api/teams only returns matrixRoomId for teams the requester actually belongs to (was leaking every team's room id to any org member). Verified with/without team membership. - BUG-14: leftJoin now filters scope='team'; new partial unique index chat_rooms_team_id_team_scope_unique enforces one room per team at the DB level, not just in the query (migration 0002). Reliability: - BUG-5: use-team-chat.ts's setup poll now backs off exponentially (5s->60s) instead of a fixed 15s; SyncState.Error stops the client and reconnects with backoff instead of letting matrix-js-sdk retry against Synapse forever. - BUG-6: one-off backfill script (src/scripts/backfill-history-visibility.ts) sets history_visibility=shared on rooms created before that fix; run against talkhub/matrix. - BUG-9: route rate limit on GET /api/chat/room, unified 404 for nonexistent-team vs not-a-member (was a cross-org existence oracle), LRU-correct eviction order in matrix-token-cache.ts, scroll position preserved on "load older messages", and eslint.config.js added (lint never ran on this feature before — flat config was simply missing). - BUG-15 (mitigated): a small module-level credential cache in lib/matrix.ts lets useTeamChat and useTeamUnreadCounts share one fetched token instead of each hitting POST /api/chat/token independently. Reduces but doesn't eliminate rate-limit risk under rapid team switching (no in-flight dedup between the two hooks). - BUG-16: refreshCounts() checks `cancelled` before setCounts. - BUG-17: use-team-chat.ts uses getRoomUnreadNotificationCount() instead of the deprecated getUnreadNotificationCount(); left unchanged in use-team-unread-counts.ts on purpose, since importing NotificationCountType there would undo BUG-11's bundle-splitting fix. Cleanup: - BUG-10: new POST /api/chat/logout invalidates the cached token and calls Synapse's logout_all admin endpoint; frontend calls it best-effort on logout and clears its own credential cache. - BUG-22: trim() on displayName construction (trailing space with an empty last name); the reported trailing-dot localpart is moot after BUG-20 since localparts are random now, not name-derived. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0143yYvjesjHndBACoweyK67
66 lines
1.9 KiB
JSON
66 lines
1.9 KiB
JSON
{
|
|
"name": "talktime-frontend",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"lint": "eslint ."
|
|
},
|
|
"dependencies": {
|
|
"@hookform/resolvers": "^5.2.2",
|
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
"@radix-ui/react-avatar": "^1.1.11",
|
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
"@radix-ui/react-collapsible": "^1.1.12",
|
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
"@radix-ui/react-label": "^2.1.8",
|
|
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
"@radix-ui/react-popover": "^1.1.15",
|
|
"@radix-ui/react-progress": "^1.1.8",
|
|
"@radix-ui/react-radio-group": "^1.3.8",
|
|
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
"@radix-ui/react-select": "^2.2.6",
|
|
"@radix-ui/react-separator": "^1.1.8",
|
|
"@radix-ui/react-slot": "^1.2.4",
|
|
"@radix-ui/react-switch": "^1.2.6",
|
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
"@radix-ui/react-toast": "^1.2.15",
|
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.0",
|
|
"cmdk": "^1.1.1",
|
|
"lucide-react": "^0.562.0",
|
|
"matrix-js-sdk": "^42.3.0",
|
|
"next-themes": "^0.4.6",
|
|
"react": "^19.0.0",
|
|
"react-dom": "^19.0.0",
|
|
"react-hook-form": "^7.71.1",
|
|
"react-router-dom": "^7.1.1",
|
|
"sonner": "^2.0.7",
|
|
"tailwind-merge": "^2.2.0",
|
|
"zod": "^4.3.5"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.39.5",
|
|
"@types/node": "^20",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@vitejs/plugin-react": "^4.3.4",
|
|
"autoprefixer": "^10.0.1",
|
|
"eslint": "^9",
|
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
"eslint-plugin-react-refresh": "^0.4.26",
|
|
"globals": "^15.15.0",
|
|
"postcss": "^8",
|
|
"tailwindcss": "^3.4.1",
|
|
"typescript": "^5",
|
|
"typescript-eslint": "^8.70.0",
|
|
"vite": "^6.0.7"
|
|
}
|
|
}
|